Save the configuration’s working copy
Autosave: stores the editor’s content as the change set’s working copy (Postgres), without a commit and without an audit event; a save point commits it later. The shape is checked (400 otherwise); validation issues come back in meta.issues without refusing it, since a draft may be incomplete. Send meta.version: the version last read or saved (0 for none yet); the answer has the next one. Send meta.baseCommit: the commit the content is based on. Only the change set’s author works on its working copies (403 for anyone else who holds content.read.draft; for anyone else another author’s change set is 404, exactly like a missing one). Needs the change set to be a draft holding the subject’s lock, and the content.edit permission covering the content (and the committed file). Changing the configuration needs content.edit through a role whose scope restricts nothing, and admin.roles (403 otherwise, also for its lock). The whole configuration is sent; a change that would make content on the change set’s branch invalid (a variant attribute or value still used, a language with modules, a module type, audience, facet value, text attribute or safety symbol in use) is refused with the usages (422 config-in-use); archive a variant value (archived: true) instead of removing it. A save point checks it again.
bearerAuthorizationBearer <JWT>A service account's token (ccms_sat_…, issued by POST /service-accounts/{id}/tokens), or, for local use and demo mode, the server's shared CCMS_API_TOKEN.
changeSetId*stringThe change set’s ID (a UUID). One that names no change set, malformed or not, is 404.
uuidX-Ccms-User?stringDemo mode only (CCMS_AUTH_MODE=demo): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400).
application/vnd.api+json- body
data*meta*Saved, at its new version.
application/vnd.api+json- response
data*id is <changeSetId>/module/<lang>/<moduleId>, <changeSetId>/manual/<manualId>, <changeSetId>/config, <changeSetId>/term/<termId>, <changeSetId>/design/<designId> or <changeSetId>/template/<templateId>/<path>.
curl -X PUT 'http://localhost:3000/change-sets/497f6eca-6276-4993-bfeb-53cbbbba6f08/config/working-copy' \ -H 'Content-Type: application/vnd.api+json' \ -d '{ "data": { "type": "WorkingCopy", "attributes": { "content": { "languages": { "source": "string", "targets": [ "string" ] }, "moduleTypes": [ { "id": "string", "label": "string" } ], "audiences": [ { "id": "string", "label": "string" } ] } } }, "meta": { "version": 0, "baseCommit": "string" }}'{ "data": { "type": "WorkingCopy", "id": "string", "attributes": { "subject": { "type": "module", "lang": "string", "moduleId": "string" }, "content": { "languages": { "source": "string", "targets": [ "string" ], "direction": { "property1": "ltr", "property2": "ltr" } }, "moduleTypes": [ { "id": "string", "label": "string", "restricted": false, "snippet": false, "safety": true } ], "audiences": [ { "id": "string", "label": "string" } ], "facets": [], "variantAttributes": [], "textAttributes": [], "safetySymbols": [], "calloutStyles": [ { "id": "string", "label": "string" } ], "translations": { "property1": { "sourceCommit": "string", "blocks": { "property1": "string", "property2": "string" } }, "property2": { "sourceCommit": "string", "blocks": { "property1": "string", "property2": "string" } } }, "outputLabels": {}, "maxHeadingLevel": 3, "codeLanguages": [], "release": { "productFacet": "string", "checkManufacturer": true }, "manufacturer": { "name": "string", "address": [], "contact": "string", "website": "http://example.com" }, "styleGuide": "string", "terminology": { "forbiddenIsBlocking": false }, "styleRules": { "property1": { "maxSentenceWords": 5, "rules": [] }, "property2": { "maxSentenceWords": 5, "rules": [] } }, "pdf": { "standard": "ua-1" }, "delivery": { "access": "signed-in", "missingLanguage": "picker", "pdfQrCode": "none", "manuals": {} }, "iirds": { "baseIri": "string", "documentTypes": [ "AdministratorGuide" ], "manualDocumentTypes": {}, "moduleTypes": {}, "audiences": {}, "facets": {}, "variantAttributes": {}, "lifecyclePhases": { "facet": "string", "values": { "property1": "Acquisition", "property2": "Acquisition" } } }, "dita": { "moduleTypes": {}, "outputclasses": {}, "defaultModuleType": "string", "profiling": {}, "textKeys": {}, "hazardSymbols": {}, "ditavalDefault": "none" } }, "version": 0, "baseCommit": "string", "updatedBy": { "kind": "user", "id": "string" }, "updatedAt": "2019-08-24T14:15:22Z" }, "relationships": { "changeSet": { "data": { "type": "ChangeSet", "id": "string" } } }, "meta": { "saved": true, "issues": [ { "severity": "error", "code": "string", "message": "string", "at": "string" } ] } }}