Unicat API Reference

Up - API Reference - Home


/api/projects/update

Requires JWT.

Rename a project or change the timezone.

Options such as languages, channels, orderings, and fieldlists have other API endpoints.

Request

POST /api/projects/update
Authorization: Bearer <JWT>

{
    "project": "<project gid>",
    "name": "Documentation Project",
    "timezone": "Europe/Amsterdam",
}

project the gid of the project that is modified

optional

name a name for the project
timezone the timezone when entering dates in the UI

Success response

Authorization: <JWT>

{
    "success": true,
    "result": {
        "project": "<project gid>",
    },
    "data": {
        "cc.projects": {
            "<project gid>": {
                "gid": "<project gid>",
                "name": "Project Name",
                "icon": "<project gid>.jpg",
                "owner": "<user gid>",
                "status": "active",
                "options": {
                    "channels": {
                        "__all__": "[all records]",
                        "650ebd0f-eab5-41d7-87c1-1dc5334af872": "Main channel"
                    },
                    "timezone": "Europe/Amsterdam",
                    "languages": [
                        "en",
                        "nl"
                    ],
                    "orderings": {
                        "87b53a4e-359d-45c7-81cb-5e1c3ef444ec": "Main ordering"
                    },
                    "fieldlists": {
                        "31cbd8ac-4f13-4ac3-8924-752ea94d1c65": "Main fieldlist"
                    },
                    "imageserver": {
                        "type": "ccdam",
                        "options": {}
                    },
                    "orderedchannels": [
                        "__all__",
                        "650ebd0f-eab5-41d7-87c1-1dc5334af872"
                    ],
                    "orderedorderings": [
                        "87b53a4e-359d-45c7-81cb-5e1c3ef444ec"
                    ],
                    "orderedfieldlists": [
                        "31cbd8ac-4f13-4ac3-8924-752ea94d1c65"
                    ]
                },
                "build": 1
            }
        }
    }
}

result

project is the project gid you provided.

data

cc.projects is a dictionary with one entry for the project.

Error response

400 Bad request - missing argument
401 Unauthorized - missing or expired JWT
403 Forbidden - not a member of this project
422 Unprocessable Entity - no info for this project for this user

HTTP/1.1 400 Bad request

{
    "success": false,
    "result": {
        "code": 400,
        "message": "Bad request",
        "info": {}
    },
    "data": {}
}
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer realm="JWT access to Unicat."

{
    "success": false,
    "result": {
        "code": 401,
        "message": "Permission denied",
        "info": {}
    },
    "data": {}
}
HTTP/1.1 403 Forbidden

{
    "success": false,
    "result": {
        "code": 403,
        "message": "Forbidden",
        "info": {}
    },
    "data": {}
}
HTTP/1.1 422 Unprocessable Entity

{
    "success": false,
    "result": {
        "code": 422,
        "message": "Unprocessable Entity",
        "info": {}
    },
    "data": {}
}