Take changes out of a change set
Takes modules, manuals, terms or the configuration back out of the change set: one commit on its branch, made as a save point is, that puts each subject's file back as it is at the change set's base commit (a subject the change set created is deleted), then drops their working copies and releases their locks, with a change-set.revert audit event (and the commit's own, and one lock.release per lock). A subject whose file is unchanged and that has only a working copy makes no commit (meta.commit null). Only the change set's author, while it is a draft, and only for subjects whose lock it holds; scope is checked as for deleting the file at the head and changing it at the base. A configuration put back that content kept at the head no longer fits is 422 config-in-use; a page design the change set added, taken out while the configuration or a manual names it, is 409 design-in-use (#554). Needs the content.edit permission.
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*Taken out.
application/vnd.api+json- response
meta*curl -X POST 'http://localhost:3000/change-sets/497f6eca-6276-4993-bfeb-53cbbbba6f08/reverts' \ -H 'Content-Type: application/vnd.api+json' \ -d '{ "data": { "type": "Revert", "attributes": { "subjects": [ { "type": "module", "lang": "string", "moduleId": "string" } ] } }}'{ "meta": { "commit": "string", "head": "string", "restored": [ { "type": "module", "lang": "string", "moduleId": "string" } ], "deleted": [ { "type": "module", "lang": "string", "moduleId": "string" } ], "discarded": [ { "type": "module", "lang": "string", "moduleId": "string" } ] }}