v1

latestOpenAPI 3.0.12026-07-13130168404.3 KB
Content states

Set the content state of a content and publishes a new version of the content.

Sets the content state of the content specified and creates a new version (publishes the content without changing the body) of the content with the new state.

You may pass in either an id of a state, or the name and color of a desired new state. If all 3 are passed in, id will be used. If the name and color passed in already exist under the current user's existing custom states, the existing state will be reused. If custom states are disabled in the space of the content (which can be determined by getting the content state space settings of the content's space) then this set will fail.

You may not remove a content state via this PUT request. You must use the DELETE method. A specified state is required in the body of this request.

Permissions required: Permission to edit the content.

put/wiki/rest/api/content/{id}/state

Path parameters

idstring required

The Id of the content whose content state is to be set.

Query parameters

status'current' | 'draft' required

Status of content onto which state will be placed. If draft, then draft state will change. If current, state will be placed onto a new version of the content with same body as previous version.

Request body

namestring

Name of content state. Maximum 20 characters.

colorstring

Color of state. Must be in 6 digit hex form (#FFFFFF). The default colors offered in the UI are: #ff7452 (red), #2684ff (blue), #ffc400 (yellow), #57d9a3 (green), and #8777d9 (purple)

idinteger

id of state. This can be 0,1, or 2 if you wish to specify a default space state.

Response

Returned if content state is set successfully.

lastUpdatedstring

Timestamp of last publish event where content state changed