Unicat API Reference

Up - API Reference - Home


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

Requires JWT.

Rename a backup. The name cannot look like 'Backup {number}', unless the number is the version of this backup.

Request

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

{
    "version": 3,
    "name": "About to perform a dangerous operation on my data"
}

version specify the backup version to rename
name a new name for the backup - you can't imitate the default name 'Backup {version}' unless the version number matches

Success response

Authorization: <JWT>

{
    "success": true,
    "result": {
        "project": "<project gid>",
        "version": 3,
    },
    "data": {
        "cc.projects": {
            "<project gid>": {
                ,
                "backups": {
                    "versions": [
                        {
                            "version": 3,
                            "name": "About to perform a dangerous operation on my data",
                            "created_by": "Update Catalog module (Unicat Connect)",
                            "timestamp": 1613565541.4195538
                        },
                        
                    ],
                    "next_version": 4
                },
                
            }
        }
    }
}

result

project the current project.
version the version that holds the updated info.

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
422 Unprocessable entity - backup version invalid