trash
In the top account, you can get the list of deleted macro-objects in the trash bin. You can also restore them using the account/trash method:
svc=account/trash¶ms={"callMode":<text>, "guids":[<text>]}
Parameters
The request must contain the following parameters:
Parameter | Description |
---|---|
callMode | Possible values are list and restore. List is used to get the list of deleted objects. To restore the objects, specify the restore value. |
GUIDs | Item GUIDs for restoring. Used for the restore callMode. |
You can restore a deleted item only 20 minutes after it was deleted.
Response
If the request is completed successfully, the response for a list of macro-objects in the trash bin is as follows:
{
"code":<uint>,
"items": [
{
"guid":<text>, /* GUID */
"name":<text>, /* Item name. */
"tm":<uint>, /* Time of deletion. */
"type":<text>, /* Macro-object type (for example, "avl_resource"). */
"creator_id":<text>, /* ID of the creator. */
"tm":<**int**>, /* Deletion time. */
"props":
{
"prop_name":<prop_type>, /* List of public item properties (string, int, long, double). */ ...
}
},
...
]
}
The response for restoring macro-objects from trash:
{
"code":<uint>,
"items": [
{
"name":<text>, /* Item name. */
"result":<bool>, /* Result: 1 — success, 0 — failure. */
"type":<text>, /* Macro-object type. */
"reason":<text> /* Reason for a possible error. */
},
...
]
}
If the object could not be restored, the following reasons can be indicated in the response:
MAX_ITEMS_EXCEEDED
. The limit set for the resource is exceeded.TIMEOUT_20_MIN
. You can restore a deleted item only 20 minutes after it was deleted.INTERNAL_SERVER_ERROR
. A server error occurred.