trash_microelements
In the top account, you can get the list of deleted micro-objects in the trash bin and restore them using the account/trash_microelements method:
svc=account/trash_microelements¶ms={"callMode":<text>}
Set callmode to list to get the list of micro-objects and restore to restore them from the trash bin.
svc=account/trash_microelements¶ms={"callMode":"restore","items":[{"type":<text>,"guid":<text>,"props":["name":<text>,"ids":[<long>]]}]}
Parameters
The request must contain the following parameters:
Parameter | Description |
---|---|
type | Pass the avl_resource value in this parameter. |
guid | Resource GUID. |
name | Micro-object type: “drivers”, “trailers”, “tags” (passengers). |
ids | IDs of the micro-objects (drivers, trailers, passengers). |
Response
If the request is completed successfully, the response for a list of deleted micro-objects is as follows:
{
"code": <uint>,
"items": [
{
"type": <text>, /* avl_resource */
"guid": <text>, /* Resource GUID */
"name": <text>, /* Resource name */
"trailers": [
{
...
}
],
"drivers": [
{
...
}
],
"tags": [
{
...
}
]
}
...
]
}
The response for restoring deleted micro-objects:
{
"code": <uint>,
"items": [
{
"guid": <text>, /* Resource GUID */
"type": <text>, /* avl_resource */
"props": [
{
"name": <text>, /* Micro-object type: "drivers", "trailers", "tags" (passengers). */
"id": <int>, /* ID of the micro-object (driver, trailer, passenger) */
"result": <int> /* Result: 1 — success, 0 — failure. */
}
]
}
...
]
}