Updating a Schema

Scope: Schema
PATCH https://api.lucentcms.com/api/schemas/:key

In order to update an existing Schema, the following headers are required:

Lucent-Channel: {channel-id}
Lucent-User: {sys-user-key}
Authentication: Bearer {sys-user-secret}
Accept-Language: en-US

The API expects the following data:

Field Type Description
name string (min:3, max:120) The name of the Schema
group (optional) string (default:"") The group the Schema belongs to
uri (optional) string (default:null) The preview URI for the Schema
revisionsEnabled (optional) bool (default:false) Whether the Schema will have revisions enabled

Below you can find a demo request and a demo response.

Demo Request

PATCH /api/schemas/taxons

Lucent-Channel: {channel-id}
Lucent-User: {sys-user-key}
Authentication: Bearer {sys-user-secret}
Accept-Language: en-US
{
    "data": {
        "name": "Taxons New",
        "uri": "https://newtestsite.com",
        "group": "New Group",
      	"revisionsEnabled": false
    }
}

Demo Response

200 OK

{
    "data": {
        "key": "taxons",
        "name": "Taxons New",
        "type": "standard",
        "group": "New Group",
        "subtype": "hierarchical",
        "uri": "https://newtestsite.com",
        "fields": [
            {
                "id": "title",
                "name": "Title",
                "type": "text",
                "status": "active",
                "ui": "textarea",
                "help": "",
                "options": {
                    "visible": true,
                    "permanent": true
                },
                "validation": {
                    "required": true
                }
            }
        ],
        "revisionsEnabled": false
    },
    "errors": null,
    "meta": null,
    "links": null,
    "included": null
}