{
  "opencollection": "1.0.0",
  "info": {
    "name": "Atlassian Admin Account Content States API",
    "version": "1.0.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Content States",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Atlassian Bulk Remove Content States From Content",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.atlassian.com/wiki/rest/api/content-states/delete",
            "params": [
              {
                "name": "status",
                "value": "",
                "type": "query",
                "description": "Set status to one of [current,draft]."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a long running task that Removes content state from draft or published versions of pages specified.<br><br>**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**<br>Content Edit Permission for a content to have its state removed via this endpoint."
        },
        {
          "info": {
            "name": "Atlassian Get Update on Long Running Task for Setting of Content State",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.atlassian.com/wiki/rest/api/content-states/task/:taskId",
            "params": [
              {
                "name": "taskId",
                "value": "",
                "type": "path",
                "description": "taskId returned by put or delete requests to /wiki/rest/api/content-states"
              }
            ]
          },
          "docs": "Get Status of long running task that was previously created to set or remove content states from content.<br>User must first create a task by passing in details to /wiki/rest/api/content-states PUT or DELETE endpoints.<br><br>**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**<br>Must have created long running task"
        },
        {
          "info": {
            "name": "Atlassian Get Space Suggested Content States",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.atlassian.com/wiki/rest/api/space/:spaceKey/state",
            "params": [
              {
                "name": "spaceKey",
                "value": "",
                "type": "path",
                "description": "The key of the space to be queried for its content state settings."
              }
            ]
          },
          "docs": "Get content states that are suggested in the space.<br>**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:<br>Space view permission"
        },
        {
          "info": {
            "name": "Atlassian Get Content State Settings for Space",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.atlassian.com/wiki/rest/api/space/:spaceKey/state/settings",
            "params": [
              {
                "name": "spaceKey",
                "value": "",
                "type": "path",
                "description": "The key of the space to be queried for its content state settings."
              }
            ]
          },
          "docs": "Get object describing whether content states are allowed at all, if custom content states or space content states<br>are restricted, and a list of space content states allowed for the space if they are not restricted.<br><br>**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:<br>Space admin permission"
        },
        {
          "info": {
            "name": "Atlassian Get Content in Space With Given Content State",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.atlassian.com/wiki/rest/api/space/:spaceKey/state/content",
            "params": [
              {
                "name": "spaceKey",
                "value": "",
                "type": "path",
                "description": "The key of the space to be queried for its content state settings."
              },
              {
                "name": "state-id",
                "value": "",
                "type": "query",
                "description": "The id of the content state to filter content by"
              },
              {
                "name": "expand",
                "value": "",
                "type": "query",
                "description": "A multi-value parameter indicating which properties of the content to expand.\nOptions include: space, version, history, children, etc.\n\nEx: space,version"
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "Maximum number of results to return"
              },
              {
                "name": "start",
                "value": "",
                "type": "query",
                "description": "Number of result to start returning. (0 indexed)"
              }
            ]
          },
          "docs": "Finds paginated content with <br><br>**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:<br>Space View Permission"
        },
        {
          "info": {
            "name": "Atlassian Get Content State",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.atlassian.com/wiki/rest/api/content/:id/state",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The id of the content whose content state is of interest."
              },
              {
                "name": "status",
                "value": "",
                "type": "query",
                "description": "Set status to one of [current,draft,archived]. Default value is current."
              }
            ]
          },
          "docs": "Gets the current content state of the draft or current version of content. To specify the draft version, set<br>the parameter status to draft, otherwise archived or current will get the relevant published state.<br>**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:<br>Permission to view the content."
        },
        {
          "info": {
            "name": "Atlassian Set The Content State Of A Content And Publishes A New Version Of The Content",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.atlassian.com/wiki/rest/api/content/:id/state",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The Id of the content whose content state is to be set."
              },
              {
                "name": "status",
                "value": "",
                "type": "query",
                "description": "Status of content onto which state will be placed. If draft, then draft state will change.\nIf current, state will be placed onto a new version of the content with same body as previous version."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Sets the content state of the content specified and creates a new version<br>(publishes the content without changing the body) of the content with the new state.<br><br>You may pass in either an id of a state, or the name and color of a desired new state.<br>If all 3 are passed in, id will be used.<br>If the name and color passed in already exist under the current user's existing custom states, the existing state will be reused.<br>If custom states are disabled in the space of the content (which"
        },
        {
          "info": {
            "name": "Atlassian Removes The Content State Of A Content And Publishes A New Version",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.atlassian.com/wiki/rest/api/content/:id/state",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The Id of the content whose content state is to be set."
              },
              {
                "name": "status",
                "value": "",
                "type": "query",
                "description": "status of content state from which to delete state. Can be draft or archived"
              }
            ]
          },
          "docs": "Removes the content state of the content specified and creates a new version<br>(publishes the content without changing the body) of the content with the new status.<br><br>**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:<br>Permission to edit the content."
        },
        {
          "info": {
            "name": "Atlassian Gets Available Content States For Content",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.atlassian.com/wiki/rest/api/content/:id/state/available",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "id of content to get available states for"
              }
            ]
          },
          "docs": "Gets content states that are available for the content to be set as.<br>Will return all enabled Space Content States.<br>Will only return most the 3 most recently published custom content states to match UI editor list.<br>To get all custom content states, use the /content-states endpoint.<br><br>**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:<br>Permission to edit the content."
        },
        {
          "info": {
            "name": "Atlassian Get Custom Content States",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.atlassian.com/wiki/rest/api/content-states"
          },
          "docs": "Get custom content states that authenticated user has created.<br><br>**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**<br>Must have user authentication."
        },
        {
          "info": {
            "name": "Atlassian Bulk Set Content State Of Many Contents",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.atlassian.com/wiki/rest/api/content-states",
            "params": [
              {
                "name": "status",
                "value": "",
                "type": "query",
                "description": "Set status to one of [current,draft]."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a long running task that sets content state of draft or published versions of pages specified.<br><br>**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**<br>Content Edit Permission for a content to have its state set via this endpoint."
        }
      ]
    }
  ],
  "bundled": true
}