Unicat API Reference

Up - API Reference - Home


/api/p/<project gid>/assets/undelete

Requires JWT.

Undeletes a deleted asset and its subtree.

Note: AND its subtree!

A deleted asset can be undeleted unless it was followed by a permanent_delete or its parent is deleted too - you should undelete the parent then.

Request

POST /api/p/<project gid>/assets/undelete
Authorization: Bearer <JWT>

{
    "asset": "<asset gid>"
}

Success response

Authorization: <JWT>

{
    "success": true,
    "result": {
        "asset": "96ec02b2-fb8d-4fb4-b952-fad0c4b88a74"
    },
    "data": {
        "assets": {
            "96ec02b2-fb8d-4fb4-b952-fad0c4b88a74": {
                
            },
            
        }
    }
}

result

asset the undeleted asset

data

assets Asset info with hierarchy, type, name.

Error responses

400 Bad request - missing argument
401 Unauthorized - missing or expired JWT
403 Forbidden - not a member of this project
422 Unprocessable entity - undeletion failed