Confluence.js - Cloud and Server API library
    Preparing search index...

    Class ContentStates

    Index

    Constructors

    Methods

    • 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.

      Type Parameters

      Parameters

      Returns Promise<void>

    • 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.

      Type Parameters

      Parameters

      Returns Promise<T>