Unicat API Reference

Up - API Reference - Home


/api/p/<project gid>/backups/delete

Requires JWT.

Deletes a backup of the project database. This is irreversible.

Request

You can either call this with a single version, or with a list of versions. If you specify both, only version will be used. You cannot delete version 0. Unrecognized versions will be silently skipped.

POST /api/p/<project gid>/backups/delete
Authorization: Bearer <JWT>

{
    "version": 3
}

version specify the backup version to delete

or

POST /api/p/<project gid>/backups/delete
Authorization: Bearer <JWT>

{
    "versions": [1, 3]
}

versions specify the backup versions to delete

Success response

Authorization: <JWT>

{
    "success": true,
    "result": {
        "project": "<project gid>",
    },
    "data": {
        "cc.projects": {
            "<project gid>": {
                ,
                "backups": {
                    "versions": [
                        {
                            "version": 2,
                            "name": "Import/Update pre-upload backup",
                            "created_by": "Import/Update module (Unicat Connect)",
                            "timestamp": 1613565540.4195538
                        },
                        
                    ],
                    "next_version": 4
                },
                
            }
        }
    }
}

result

project the current project.

data

cc.projects Project updated with new backup info.

Error responses

401 Unauthorized - missing or expired JWT
403 Forbidden - not a member of this project