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:

Copied!
svc=account/trash_microelements&params={"callMode":<text>}

Set callmode to list to get the list of micro-objects and restore to restore them from the trash bin.

Copied!
svc=account/trash_microelements&params={"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:

Copied!
{
    "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:

Copied!
{
    "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. */
                        }
                    ]
                },
                ...
    ]
}

If you find a mistake in the text, please select it and press Ctrl+Enter.

Report a mistake

Your message was sent. Thank you!

An error occurred while submitting the form

Download PDF file
Download Word document

See also