Confluence REST API Documentation
This document describes the REST API and resources provided by Confluence. The REST APIs are for developers who want to integrate Confluence into their application and for administrators who want to script interactions with the Confluence server.
Confluence's REST APIs provide access to resources (data entities) via URI paths. To use a REST API, your application will make an HTTP request and parse the response. The response format is JSON. Your methods will be the standard HTTP methods like GET, PUT, POST and DELETE.
Because the REST API is based on open standards, you can use any web development language to access the API.
Structure of the REST URIs
URIs for the Confluence REST API resource have the following structure:
With context: http://host:port/context/rest/api/resource-name
Or without context: http://host:port/rest/api/resource-name
Example with context: http://example.com:8080/confluence/rest/api/space/ds
Example without context: http://confluence.myhost.com:8095/rest/api/space/ds
How to use expansion in the REST APIs
In order to minimise network traffic from the client perspective, our API uses a technique called expansion.
You can use the expand
query parameter to specify a comma-separated list of entities that you want
expanded, identifying each entity by a given identifier. For example, the value space,attachments
requests the expansion of entities for which the expand identifier is space
and
attachments
.
You can use the .
dot notation to specify expansion of entities within another entity. For example
body.view
would expand the content body
and expand the view
rendering of
it.
Resources
Provides Zero Downtime Upgrade capabilities.
Approve upgradePOST /rest/approve
Finalizes the ZDU upgrade and runs specific tasks such as cleanup scripts.
Responses
-
- Status
200 - application/json
Example
{"upgradeModeEnabled":false,"hasFinalizationTasks":true,"state":"STABLE","nodes":[{"id":"7a52c813","name":"node-1","ipAddress":"10.0.0.1","state":"ACTIVE","tasksTotal":5,"activeUserCount":12,"buildNumber":"1234","version":"1.0","local":true,"links":[{"rel":"self","href":"/nodes/7a52c813"}]}],"links":[{"rel":"self","href":"/"},{"rel":"start","href":"/start"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/cluster#","title":"Cluster","type":"object","properties":{"upgradeModeEnabled":{"type":"boolean"},"hasFinalizationTasks":{"type":"boolean"},"state":{"type":"string","enum":["STABLE","READY_TO_UPGRADE","MIXED","READY_TO_RUN_UPGRADE_TASKS","RUNNING_UPGRADE_TASKS","UPGRADE_TASKS_FAILED"]},"originalVersion":{"type":"string"},"nodes":{"type":"array","items":{"title":"Node Info","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"ipAddress":{"type":"string"},"state":{"type":"string","enum":["STARTING","ACTIVE","DRAINING","TERMINATING","OFFLINE","ERROR","RUNNING_FINALIZE_UPGRADE_TASKS","UPGRADE_TASKS_FAILED"]},"tasksTotal":{"type":"integer"},"activeUserCount":{"type":"integer"},"buildNumber":{"type":"string"},"version":{"type":"string"},"local":{"type":"boolean"},"finalization":{"title":"Node Finalization Info","type":"object","properties":{"errors":{"type":"array","items":{"title":"Upgrade Task Error","type":"object","properties":{"clusterUpgradeTask":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}},"exceptionMessage":{"type":"string"}},"additionalProperties":false,"required":["clusterUpgradeTask"]}},"lastRequested":{"type":"string"}},"additionalProperties":false},"links":{"type":"array","items":{"$ref":"#/definitions/link"}}},"additionalProperties":false,"required":["local"]}},"links":{"type":"array","items":{"$ref":"#/definitions/link"}}},"definitions":{"link":{"title":"Link","type":"object","properties":{"rel":{"type":"string"},"href":{"type":"string","format":"uri"}},"additionalProperties":false}},"additionalProperties":false,"required":["upgradeModeEnabled","hasFinalizationTasks"]}
- Status
200 - application/json
-
- Status
401Returned if user is not authenticated
- Status
401
-
- Status
403Returned if the calling user does not have permission to view the content
- Status
403
-
- Status
409Returned if the cluster is not in a valid state
- Status
409
Cancel upgradePOST /rest/cancel
Prohibits the Upgrading of individual Nodes within the Cluster. All Nodes need to be on the same version before performing this request.
Responses
-
- Status
200 - application/json
Example
{"upgradeModeEnabled":false,"hasFinalizationTasks":true,"state":"STABLE","nodes":[{"id":"7a52c813","name":"node-1","ipAddress":"10.0.0.1","state":"ACTIVE","tasksTotal":5,"activeUserCount":12,"buildNumber":"1234","version":"1.0","local":true,"links":[{"rel":"self","href":"/nodes/7a52c813"}]}],"links":[{"rel":"self","href":"/"},{"rel":"start","href":"/start"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/cluster#","title":"Cluster","type":"object","properties":{"upgradeModeEnabled":{"type":"boolean"},"hasFinalizationTasks":{"type":"boolean"},"state":{"type":"string","enum":["STABLE","READY_TO_UPGRADE","MIXED","READY_TO_RUN_UPGRADE_TASKS","RUNNING_UPGRADE_TASKS","UPGRADE_TASKS_FAILED"]},"originalVersion":{"type":"string"},"nodes":{"type":"array","items":{"title":"Node Info","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"ipAddress":{"type":"string"},"state":{"type":"string","enum":["STARTING","ACTIVE","DRAINING","TERMINATING","OFFLINE","ERROR","RUNNING_FINALIZE_UPGRADE_TASKS","UPGRADE_TASKS_FAILED"]},"tasksTotal":{"type":"integer"},"activeUserCount":{"type":"integer"},"buildNumber":{"type":"string"},"version":{"type":"string"},"local":{"type":"boolean"},"finalization":{"title":"Node Finalization Info","type":"object","properties":{"errors":{"type":"array","items":{"title":"Upgrade Task Error","type":"object","properties":{"clusterUpgradeTask":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}},"exceptionMessage":{"type":"string"}},"additionalProperties":false,"required":["clusterUpgradeTask"]}},"lastRequested":{"type":"string"}},"additionalProperties":false},"links":{"type":"array","items":{"$ref":"#/definitions/link"}}},"additionalProperties":false,"required":["local"]}},"links":{"type":"array","items":{"$ref":"#/definitions/link"}}},"definitions":{"link":{"title":"Link","type":"object","properties":{"rel":{"type":"string"},"href":{"type":"string","format":"uri"}},"additionalProperties":false}},"additionalProperties":false,"required":["upgradeModeEnabled","hasFinalizationTasks"]}
- Status
200 - application/json
-
- Status
401Returned if user is not authenticated
- Status
401
-
- Status
403Returned if the calling user does not have permission to view the content
- Status
403
-
- Status
409Returned if the cluster is not in a valid state
- Status
409
Get clusterGET /rest/cluster
Gets an overview of a Cluster including its current state and composition of Nodes.
Responses
-
- Status
200 - application/json
Example
{"upgradeModeEnabled":false,"hasFinalizationTasks":true,"state":"STABLE","nodes":[{"id":"7a52c813","name":"node-1","ipAddress":"10.0.0.1","state":"ACTIVE","tasksTotal":5,"activeUserCount":12,"buildNumber":"1234","version":"1.0","local":true,"links":[{"rel":"self","href":"/nodes/7a52c813"}]}],"links":[{"rel":"self","href":"/"},{"rel":"start","href":"/start"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/cluster#","title":"Cluster","type":"object","properties":{"upgradeModeEnabled":{"type":"boolean"},"hasFinalizationTasks":{"type":"boolean"},"state":{"type":"string","enum":["STABLE","READY_TO_UPGRADE","MIXED","READY_TO_RUN_UPGRADE_TASKS","RUNNING_UPGRADE_TASKS","UPGRADE_TASKS_FAILED"]},"originalVersion":{"type":"string"},"nodes":{"type":"array","items":{"title":"Node Info","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"ipAddress":{"type":"string"},"state":{"type":"string","enum":["STARTING","ACTIVE","DRAINING","TERMINATING","OFFLINE","ERROR","RUNNING_FINALIZE_UPGRADE_TASKS","UPGRADE_TASKS_FAILED"]},"tasksTotal":{"type":"integer"},"activeUserCount":{"type":"integer"},"buildNumber":{"type":"string"},"version":{"type":"string"},"local":{"type":"boolean"},"finalization":{"title":"Node Finalization Info","type":"object","properties":{"errors":{"type":"array","items":{"title":"Upgrade Task Error","type":"object","properties":{"clusterUpgradeTask":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}},"exceptionMessage":{"type":"string"}},"additionalProperties":false,"required":["clusterUpgradeTask"]}},"lastRequested":{"type":"string"}},"additionalProperties":false},"links":{"type":"array","items":{"$ref":"#/definitions/link"}}},"additionalProperties":false,"required":["local"]}},"links":{"type":"array","items":{"$ref":"#/definitions/link"}}},"definitions":{"link":{"title":"Link","type":"object","properties":{"rel":{"type":"string"},"href":{"type":"string","format":"uri"}},"additionalProperties":false}},"additionalProperties":false,"required":["upgradeModeEnabled","hasFinalizationTasks"]}
- Status
200 - application/json
-
- Status
401Returned if user is not authenticated
- Status
401
-
- Status
403Returned if the calling user does not have permission to view the content
- Status
403
Get node by idGET /rest/nodes/{nodeId}
Gets the requested Node's information.
Responses
-
- Status
200 - application/json
Example
{"id":"7a52c813","name":"node-1","ipAddress":"10.0.0.1","state":"ACTIVE","tasksTotal":5,"activeUserCount":12,"buildNumber":"1234","version":"1.0","local":true,"links":[{"rel":"self","href":"/nodes/7a52c813"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/node-info#","title":"Node Info","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"ipAddress":{"type":"string"},"state":{"type":"string","enum":["STARTING","ACTIVE","DRAINING","TERMINATING","OFFLINE","ERROR","RUNNING_FINALIZE_UPGRADE_TASKS","UPGRADE_TASKS_FAILED"]},"tasksTotal":{"type":"integer"},"activeUserCount":{"type":"integer"},"buildNumber":{"type":"string"},"version":{"type":"string"},"local":{"type":"boolean"},"finalization":{"title":"Node Finalization Info","type":"object","properties":{"errors":{"type":"array","items":{"title":"Upgrade Task Error","type":"object","properties":{"clusterUpgradeTask":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}},"exceptionMessage":{"type":"string"}},"additionalProperties":false,"required":["clusterUpgradeTask"]}},"lastRequested":{"type":"string"}},"additionalProperties":false},"links":{"type":"array","items":{"title":"Link","type":"object","properties":{"rel":{"type":"string"},"href":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["local"]}
- Status
200 - application/json
-
- Status
403Returned if the calling user does not have permission to view the content
- Status
403
-
- Status
404Returned if there is no content with the given id
- Status
404
Retry finalizationPOST /rest/retryUpgrade
Reruns any incomplete finalization Upgrade Tasks.
Responses
-
- Status
200 - application/json
Example
{"upgradeModeEnabled":true,"hasFinalizationTasks":true,"state":"READY_TO_UPGRADE","originalVersion":"1.0","nodes":[{"id":"7a52c813","name":"node-1","ipAddress":"10.0.0.1","state":"ACTIVE","tasksTotal":5,"activeUserCount":12,"buildNumber":"1234","version":"1.0","local":true,"links":[{"rel":"self","href":"/nodes/7a52c813"}]}],"links":[{"rel":"self","href":"/"},{"rel":"cancel","href":"/cancel"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/cluster#","title":"Cluster","type":"object","properties":{"upgradeModeEnabled":{"type":"boolean"},"hasFinalizationTasks":{"type":"boolean"},"state":{"type":"string","enum":["STABLE","READY_TO_UPGRADE","MIXED","READY_TO_RUN_UPGRADE_TASKS","RUNNING_UPGRADE_TASKS","UPGRADE_TASKS_FAILED"]},"originalVersion":{"type":"string"},"nodes":{"type":"array","items":{"title":"Node Info","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"ipAddress":{"type":"string"},"state":{"type":"string","enum":["STARTING","ACTIVE","DRAINING","TERMINATING","OFFLINE","ERROR","RUNNING_FINALIZE_UPGRADE_TASKS","UPGRADE_TASKS_FAILED"]},"tasksTotal":{"type":"integer"},"activeUserCount":{"type":"integer"},"buildNumber":{"type":"string"},"version":{"type":"string"},"local":{"type":"boolean"},"finalization":{"title":"Node Finalization Info","type":"object","properties":{"errors":{"type":"array","items":{"title":"Upgrade Task Error","type":"object","properties":{"clusterUpgradeTask":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}},"exceptionMessage":{"type":"string"}},"additionalProperties":false,"required":["clusterUpgradeTask"]}},"lastRequested":{"type":"string"}},"additionalProperties":false},"links":{"type":"array","items":{"$ref":"#/definitions/link"}}},"additionalProperties":false,"required":["local"]}},"links":{"type":"array","items":{"$ref":"#/definitions/link"}}},"definitions":{"link":{"title":"Link","type":"object","properties":{"rel":{"type":"string"},"href":{"type":"string","format":"uri"}},"additionalProperties":false}},"additionalProperties":false,"required":["upgradeModeEnabled","hasFinalizationTasks"]}
- Status
200 - application/json
-
- Status
401Returned if user is not authenticated
- Status
401
-
- Status
403Returned if the calling user does not have permission to view the content
- Status
403
-
- Status
409Returned if the cluster is not in a valid state
- Status
409
Start upgradePOST /rest/start
Enables Upgrading of individual Nodes within the Cluster, allowing a heterogeneous Cluster formation.
Responses
-
- Status
200 - application/json
Example
{"upgradeModeEnabled":true,"hasFinalizationTasks":true,"state":"READY_TO_UPGRADE","originalVersion":"1.0","nodes":[{"id":"7a52c813","name":"node-1","ipAddress":"10.0.0.1","state":"ACTIVE","tasksTotal":5,"activeUserCount":12,"buildNumber":"1234","version":"1.0","local":true,"links":[{"rel":"self","href":"/nodes/7a52c813"}]}],"links":[{"rel":"self","href":"/"},{"rel":"cancel","href":"/cancel"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/cluster#","title":"Cluster","type":"object","properties":{"upgradeModeEnabled":{"type":"boolean"},"hasFinalizationTasks":{"type":"boolean"},"state":{"type":"string","enum":["STABLE","READY_TO_UPGRADE","MIXED","READY_TO_RUN_UPGRADE_TASKS","RUNNING_UPGRADE_TASKS","UPGRADE_TASKS_FAILED"]},"originalVersion":{"type":"string"},"nodes":{"type":"array","items":{"title":"Node Info","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"ipAddress":{"type":"string"},"state":{"type":"string","enum":["STARTING","ACTIVE","DRAINING","TERMINATING","OFFLINE","ERROR","RUNNING_FINALIZE_UPGRADE_TASKS","UPGRADE_TASKS_FAILED"]},"tasksTotal":{"type":"integer"},"activeUserCount":{"type":"integer"},"buildNumber":{"type":"string"},"version":{"type":"string"},"local":{"type":"boolean"},"finalization":{"title":"Node Finalization Info","type":"object","properties":{"errors":{"type":"array","items":{"title":"Upgrade Task Error","type":"object","properties":{"clusterUpgradeTask":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}},"exceptionMessage":{"type":"string"}},"additionalProperties":false,"required":["clusterUpgradeTask"]}},"lastRequested":{"type":"string"}},"additionalProperties":false},"links":{"type":"array","items":{"$ref":"#/definitions/link"}}},"additionalProperties":false,"required":["local"]}},"links":{"type":"array","items":{"$ref":"#/definitions/link"}}},"definitions":{"link":{"title":"Link","type":"object","properties":{"rel":{"type":"string"},"href":{"type":"string","format":"uri"}},"additionalProperties":false}},"additionalProperties":false,"required":["upgradeModeEnabled","hasFinalizationTasks"]}
- Status
200 - application/json
-
- Status
401Returned if user is not authenticated
- Status
401
-
- Status
403Returned if the calling user does not have permission to view the content
- Status
403
-
- Status
409Returned if the cluster is not in a valid state
- Status
409
Get stateGET /rest/state
Gets the State of the Cluster and the responding Node's information.
Responses
-
- Status
200 - application/json
Example
{"state":"STABLE","buildInfo":{"id":"7a52c813","name":"node-1","ipAddress":"10.0.0.1","state":"ACTIVE","tasksTotal":5,"activeUserCount":12,"buildNumber":"1234","version":"1.0","local":true,"links":[{"rel":"self","href":"/nodes/7a52c813"}]}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/cluster-state-response#","title":"Cluster State Response","type":"object","properties":{"state":{"type":"string","enum":["STABLE","READY_TO_UPGRADE","MIXED","READY_TO_RUN_UPGRADE_TASKS","RUNNING_UPGRADE_TASKS","UPGRADE_TASKS_FAILED"]},"buildInfo":{"title":"Node Info","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"ipAddress":{"type":"string"},"state":{"type":"string","enum":["STARTING","ACTIVE","DRAINING","TERMINATING","OFFLINE","ERROR","RUNNING_FINALIZE_UPGRADE_TASKS","UPGRADE_TASKS_FAILED"]},"tasksTotal":{"type":"integer"},"activeUserCount":{"type":"integer"},"buildNumber":{"type":"string"},"version":{"type":"string"},"local":{"type":"boolean"},"finalization":{"title":"Node Finalization Info","type":"object","properties":{"errors":{"type":"array","items":{"title":"Upgrade Task Error","type":"object","properties":{"clusterUpgradeTask":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}},"exceptionMessage":{"type":"string"}},"additionalProperties":false,"required":["clusterUpgradeTask"]}},"lastRequested":{"type":"string"}},"additionalProperties":false},"links":{"type":"array","items":{"title":"Link","type":"object","properties":{"rel":{"type":"string"},"href":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["local"]}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
401Returned if user is not authenticated
- Status
401
-
- Status
403Returned if the calling user does not have permission to view the content
- Status
403
accessmode
Resource for plugins to check the access mode set on Confluence.
Get access mode statusGET /rest/accessmode
Returns the access mode status for Confluence.
http://example.com/confluence/rest/api/accessmode
Responses
-
- application/json
audit
Store recordPOST /rest/audit
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/audit-record#","title":"Audit Record","type":"object","properties":{"author":{"title":"User","type":"object","properties":{"profilePicture":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"remoteAddress":{"type":"string"},"creationDate":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"sysAdmin":{"type":"boolean"},"affectedObject":{"$ref":"#/definitions/affected-object"},"changedValues":{"type":"array","items":{"title":"Changed Value","type":"object","properties":{"name":{"type":"string"},"oldValue":{"type":"string"},"newValue":{"type":"string"}},"additionalProperties":false}},"associatedObjects":{"type":"array","items":{"$ref":"#/definitions/affected-object"}}},"definitions":{"affected-object":{"title":"Affected Object","type":"object","properties":{"name":{"type":"string"},"objectType":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["sysAdmin"]}
Responses
-
- application/json
Get audit recordsGET /rest/audit
Fetch a paginated list of AuditRecord instances dating back to a certain time
Request
query parameters
parameter | type | description |
---|---|---|
startDate |
string | |
endDate |
string | |
start |
int |
where to start within results set |
limit |
int Default: 1000 |
the maximum results to fetch |
searchString |
string |
Responses
-
- application/json
ExportGET /rest/audit/export
Request
query parameters
parameter | type | description |
---|---|---|
startDate |
string | |
endDate |
string | |
searchString |
string | |
format |
string Default: csv |
Responses
-
- application/zip
- text/csv
Get retention periodGET /rest/audit/retention
Fetches the current retention period
Responses
-
- application/json
Set retention periodPUT /rest/audit/retention
Set the retention period to a new value. Can throw ServiceException if the retention period is too long
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/retention-period#","title":"Retention Period","type":"object","properties":{"units":{"type":"string","enum":["Nanos","Micros","Millis","Seconds","Minutes","Hours","HalfDays","Days","Weeks","Months","Years","Decades","Centuries","Millennia","Eras","Forever"]},"number":{"type":"integer"}},"additionalProperties":false,"required":["number"]}
Responses
-
- application/json
Get audit recordsGET /rest/audit/since
Fetch a paginated list of AuditRecord instances dating back to a certain time
Request
query parameters
parameter | type | description |
---|---|---|
number |
long Default: 3 |
the amount of time periods |
units |
string |
the units to use for the time periods eg. 'days', 'months' etc |
start |
int |
where to start within results set |
limit |
int Default: 1000 |
the maximum results to fetch |
searchString |
string |
Responses
-
- application/json
content
Create contentPOST /rest/content
Creates a new piece of Content or publishes the draft if the content id is present.
For the case publishing draft, a new piece of content will be created and all metadata from the draft will be transferred into the newly created content.
Request
query parameters
parameter | type | description |
---|---|---|
status |
string Default: current |
|
expand |
string Default: body.storage,history,space,container.history,container.version,version,ancestors |
A comma separated list of properties to expand on the content. Default value: |
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/content#","title":"Content","type":"object","properties":{"id":{"$ref":"#/definitions/content-id"},"type":{"$ref":"#/definitions/content-type"},"status":{"$ref":"#/definitions/content-status"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"$ref":"#/definitions/history"}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"$ref":"#/definitions/operation-check-result"}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"$ref":"#/definitions/container"}},"body":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-body"}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"container":{"title":"Container","type":"object"},"content":{"title":"Content","type":"object","properties":{"id":{"$ref":"#/definitions/content-id"},"type":{"$ref":"#/definitions/content-type"},"status":{"$ref":"#/definitions/content-status"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"$ref":"#/definitions/history"}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"$ref":"#/definitions/operation-check-result"}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"$ref":"#/definitions/container"}},"body":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-body"}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"additionalProperties":false},"content-body":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"content-id":{"title":"Content Id","type":"object"},"content-representation":{"title":"Content Representation","type":"object"},"content-restriction":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false},"content-status":{"title":"Content Status","type":"object"},"content-type":{"title":"Content Type","type":"object"},"history":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-check-result":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
Responses
-
- application/json
Get contentGET /rest/content
Returns a paginated list of Content.
Example request URI(s):
http://example.com/confluence/rest/api/content?spaceKey=TST&title=Cheese&expand=space,body.view,version,container
http://example.com/confluence/rest/api/content?type=blogpost&spaceKey=TST&title=Bacon&postingDay=2014-02-13&expand=space,body.view,version,container
Request
query parameters
parameter | type | description |
---|---|---|
type |
string Default: page |
the content type to return. Default value: |
spaceKey |
string |
the space key to find content under. |
title |
string |
the title of the page to find. Required for |
status |
string |
list of statuses the content to be found is in. Defaults to current is not specified. If set to 'any', content in 'current' and 'trashed' status will be fetched. Does not support 'historical' status for now. |
postingDay |
string |
the posting day of the blog post. Required for |
expand |
string Default: |
a comma separated list of properties to expand on the content. Default value: |
start |
int |
the start point of the collection to return |
limit |
int Default: 25 |
the limit of the number of items to return, this may be restricted by fixed system limits |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a list of content
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-response-of-content#","title":"Page Response of Content","type":"array","items":{"$ref":"#/definitions/content"},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}}}
- Status
200 - application/json
-
- Status
404Returned if the calling user does not have permission to view the content.
- Status
404
UpdatePUT /rest/content/{contentId}
Updates a piece of Content, including changes to content status
To update a piece of content you must increment the version.number, supplying the number of the version you are creating. The title property can be updated on all content, body can be updated on all content that has a body (not attachments). For instance to update the content of a blogpost that currently has version 1:
PUT /rest/api/content/456
{
"version":{
"number": 2
},
"title":"My new title",
"type":"page",
"body":{
"storage":{
"value":"<p>New page data.</p>",
"representation":"storage"
}
}
}
To update a page and change its parent page, supply the ancestors property with the request with the parent as the first ancestor i.e. to move a page to be a child of page with ID 789:
PUT /rest/api/content/456
{
"version":{
"number": 2
},
"ancestors": [{"id":789}],
"type":"page",
"body":{
"storage":{
"value":"<p>New page data.</p>",
"representation":"storage"
}
}
}
Changing status
To restore a piece of content that has the status of trashed the content must have it's version incremented, and status set to current. No other field modifications will be performed when restoring a piece of content from the trash.
Request example to restore from trash: {"id": "557059","status": "current","version": {"number": 2}}
If the content you're updating has a draft, specifying status=draft will delete that draft and the body of the content will be replaced with the body specified in the request.
Request example to delete a draft:
PUT: http://localhost:9096/confluence/rest/api/content/2149384202?status=draft
{
"id":"2149384202",
"status":"current",
"version":{
"number":4
},
"space":{
"key":"TST"
},
"type":"page",
"title":"page title",
"body":{
"storage":{
"value":"<p>New page data.</p>",
"representation":"storage"
}
}
}
Updating a draft is not currently supported.
Request
query parameters
parameter | type | description |
---|---|---|
status |
string |
the existing status of the content to be updated. |
conflictPolicy |
string Default: abort |
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/content#","title":"Content","type":"object","properties":{"id":{"$ref":"#/definitions/content-id"},"type":{"$ref":"#/definitions/content-type"},"status":{"$ref":"#/definitions/content-status"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"$ref":"#/definitions/history"}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"$ref":"#/definitions/operation-check-result"}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"$ref":"#/definitions/container"}},"body":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-body"}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"container":{"title":"Container","type":"object"},"content":{"title":"Content","type":"object","properties":{"id":{"$ref":"#/definitions/content-id"},"type":{"$ref":"#/definitions/content-type"},"status":{"$ref":"#/definitions/content-status"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"$ref":"#/definitions/history"}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"$ref":"#/definitions/operation-check-result"}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"$ref":"#/definitions/container"}},"body":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-body"}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"additionalProperties":false},"content-body":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"content-id":{"title":"Content Id","type":"object"},"content-representation":{"title":"Content Representation","type":"object"},"content-restriction":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false},"content-status":{"title":"Content Status","type":"object"},"content-type":{"title":"Content Type","type":"object"},"history":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-check-result":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a piece of content
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/content#","title":"Content","type":"object","properties":{"id":{"$ref":"#/definitions/content-id"},"type":{"$ref":"#/definitions/content-type"},"status":{"$ref":"#/definitions/content-status"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"$ref":"#/definitions/history"}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"$ref":"#/definitions/operation-check-result"}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"$ref":"#/definitions/container"}},"body":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-body"}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"container":{"title":"Container","type":"object"},"content":{"title":"Content","type":"object","properties":{"id":{"$ref":"#/definitions/content-id"},"type":{"$ref":"#/definitions/content-type"},"status":{"$ref":"#/definitions/content-status"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"$ref":"#/definitions/history"}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"$ref":"#/definitions/operation-check-result"}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"$ref":"#/definitions/container"}},"body":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-body"}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"additionalProperties":false},"content-body":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"content-id":{"title":"Content Id","type":"object"},"content-representation":{"title":"Content Representation","type":"object"},"content-restriction":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false},"content-status":{"title":"Content Status","type":"object"},"content-type":{"title":"Content Type","type":"object"},"history":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-check-result":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
400if no space or no content type, or setup a wrong version type set to content, or status param is not draft and status content is current
- Status
400
-
- Status
404if can not find draft with current content
- Status
404
Get content by idGET /rest/content/{id}
Returns a piece of Content.
Example request URI(s):
http://example.com/confluence/rest/api/content/1234?expand=space,body.view,version,container
http://example.com/confluence/rest/api/content/1234?status=any
Request
query parameters
parameter | type | description |
---|---|---|
status |
string |
list of Content statuses to filter results on. Default value: |
version |
int | |
expand |
string Default: history,space,version |
A comma separated list of properties to expand on the content. Default value: |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a piece of content
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/content#","title":"Content","type":"object","properties":{"id":{"$ref":"#/definitions/content-id"},"type":{"$ref":"#/definitions/content-type"},"status":{"$ref":"#/definitions/content-status"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"$ref":"#/definitions/history"}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"$ref":"#/definitions/operation-check-result"}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"$ref":"#/definitions/container"}},"body":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-body"}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"container":{"title":"Container","type":"object"},"content":{"title":"Content","type":"object","properties":{"id":{"$ref":"#/definitions/content-id"},"type":{"$ref":"#/definitions/content-type"},"status":{"$ref":"#/definitions/content-status"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"$ref":"#/definitions/history"}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"$ref":"#/definitions/operation-check-result"}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"$ref":"#/definitions/container"}},"body":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-body"}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"additionalProperties":false},"content-body":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"content-id":{"title":"Content Id","type":"object"},"content-representation":{"title":"Content Representation","type":"object"},"content-restriction":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false},"content-status":{"title":"Content Status","type":"object"},"content-type":{"title":"Content Type","type":"object"},"history":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-check-result":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
404Returned if there is no content with the given id, or if the calling user does not have permission to view the content.
- Status
404
DeleteDELETE /rest/content/{id}
Trashes or purges a piece of Content, based on its {@link ContentType} and {@link ContentStatus}.
There are three cases:
- If the content is trashable and its status is {@link ContentStatus#CURRENT}, it will be trashed.
- If the content is trashable, its status is {@link ContentStatus#TRASHED} and the "status" query parameter in the request is "trashed", the content will be purged from the trash and deleted permanently.
- If the content is not trashable it will be deleted permanently without being trashed.
Request
query parameters
parameter | type | description |
---|---|---|
status |
string |
the status of the content to be deleted |
Responses
-
- Status
200 - application/jsonReturned if successfully trashed.
- Status
200 - application/json
-
- Status
204Returned if successfully purged.
- Status
204
-
- Status
404Returned if there is no content with the given id, or if the calling user does not have permission to trash or purge the content.
- Status
404
-
- Status
409Returned if there is a stale data object conflict when trying to delete a draft
- Status
409
Get historyGET /rest/content/{id}/history
Returns the history of a particular piece of content
Example request URI(s):
http://example.com/confluence/rest/api/content/1234/history
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string Default: previousVersion,nextVersion,lastUpdated |
the properties on content history to expand |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of the content's history
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/history#","title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"$ref":"#/definitions/contributors"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"$ref":"#/definitions/contributors"}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"contributors":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false,"required":["latest"]}
- Status
200 - application/json
-
- Status
404Returned if there is no content with the given id, or if the calling user does not have permission to view the content.
- Status
404
Get macro body by hash
deprecatedGET /rest/content/{id}/history/{version}/macro/hash/{hash}
Returns the body of a macro (in storage format) with the given hash. This resource is primarily used by connect applications that require the body of macro to perform their work.
The hash is generated by connect during render time of the local macro holder and is usually only relevant during the scope of one request. For optimisation purposes, this hash will usually live for multiple requests.
Collecting a macro by its hash should now be considered deprecated and will be replaced, transparently with macroIds. This resource is currently only called from connect addons which will eventually all use the {@link #getContentById(com.atlassian.confluence.api.model.content.id.ContentId, java.util.List, Integer, String)} resource.
To make the migration as seamless as possible, this resource will match macros against a generated hash or a stored macroId. This will allow add ons to work during the migration period.
Responses
-
- Status
200 - application/jsonReturns a json representation of a macro.
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/macro-instance#","title":"Macro Instance","type":"object","properties":{"name":{"type":"string"},"body":{"type":"string"},"parameters":{"type":"object","patternProperties":{".+":{"title":"Macro Parameter Instance","type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
404Returned if there is no content with the given id, or if the calling user does not have permission to view the content, or there is no macro matching the given hash or id.
- Status
404
Get macro body by macro idGET /rest/content/{id}/history/{version}/macro/id/{macroId}
Returns the body of a macro (in storage format) with the given id. This resource is primarily used by connect applications that require the body of macro to perform their work.
When content is created, if no macroId is specified, then Confluence will generate a random id. The id is persisted as the content is saved and only modified by Confluence if there are conflicting IDs.
To preserve backwards compatibility this resource will also match on the hash of the macro body, even if a macroId is found. This check will become redundant as pages get macroId's generated for them and transparently propagate out to all instances.
Responses
-
- Status
200 - application/jsonReturns a json representation of a macro.
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/macro-instance#","title":"Macro Instance","type":"object","properties":{"name":{"type":"string"},"body":{"type":"string"},"parameters":{"type":"object","patternProperties":{".+":{"title":"Macro Parameter Instance","type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
404Returned if there is no content with the given id, or if the calling user does not have permission to view the content, or there is no macro matching the given id or hash.
- Status
404
Scan contentGET /rest/content/scan
Returns a paginated list of Content.
Example request URI(s):
http://example.com/confluence/rest/api/content/scan?spaceKey=TST&limit=100&expand=space,body.view,version,container
http://example.com/confluence/rest/api/content/scan?limit=100&expand=space,body.view,version,container
Request
query parameters
parameter | type | description |
---|---|---|
spaceKey |
string |
the space key to find content under. |
status |
string |
list of statuses the content to be found is in. Defaults to current is not specified. If set to 'any', content in 'current', 'draft' and 'trashed' status will be fetched. |
expand |
string Default: |
a comma separated list of properties to expand on the content. Default value: |
limit |
int Default: 25 |
the limit of the number of items to return, this may be restricted by fixed system limits |
cursor |
string |
the identifier which is used to skip results from a previous query when paginating. Cursor is empty in first request, to move forward or backward use cursor provided in response. |
Responses
-
- application/json
SearchGET /rest/content/search
Fetch a list of content using the Confluence Query Language (CQL). See: Advanced searching using CQL
For example:
Example request URI(s):
http://localhost:8080/confluence/rest/api/content/search?cql=creator=currentUser()&cqlcontext={%22spaceKey%22:%22TST%22, %22contentId%22:%2255%22}
http://localhost:8080/confluence/rest/api/content/search?cql=space=DEV%20AND%20label=docs&expand=space,metadata.labels&limit=10
Request
query parameters
parameter | type | description |
---|---|---|
cql |
string |
a cql query string to use to locate content |
cqlcontext |
string |
the context to execute a cql search in, this is the json serialized form of SearchContext |
expand |
string Default: |
a comma separated list of properties to expand on the content. |
start |
int |
the start point of the collection to return |
limit |
int Default: 25 |
the limit of the number of items to return, this may be restricted by fixed system limits |
Responses
-
- Status
200 - application/jsonReturns a paginated list of content
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-response-of-content#","title":"Page Response of Content","type":"array","items":{"$ref":"#/definitions/content"},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}}}
- Status
200 - application/json
-
- Status
400Returned if the CQL is invalid or missing
- Status
400
content/{id}/child
REST wrapper for the {@link ChildContentService}.
ChildrenGET /rest/content/{id}/child
Returns a map of the direct children of a piece of Content. Content can have multiple types of children - for example a Page can have children that are also Pages, but it can also have Comments and Attachments.
The {@link ContentType}(s) of the children returned is specified by the "expand" query parameter in the request
- this parameter can include expands for multiple child types.
If no types are included in the expand parameter, the map returned will just list the child types that are available
to be expanded for the {@link Content} referenced by the "id" path parameter.
Example request URI(s):
http://example.com/confluence/rest/api/content/1234/child
http://example.com/confluence/rest/api/content/1234/child?expand=page.body.VIEW
http://example.com/confluence/rest/api/content/1234/child?expand=page&start=20&limit=10
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string Default: |
a comma separated list of properties to expand on the children |
parentVersion |
int Default: 0 |
an int representing the version of the content to retrieve children for |
start |
int | |
limit |
int Default: 25 |
Responses
-
- Status
200 - application/jsonReturns a JSON map representing multiple ordered collections of content children, keyed by content type
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/map-of-content-type#","title":"Map of Content Type","type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
404Returned if there is no content with the given id, or if the calling user does not have permission to view the content.
- Status
404
Children of typeGET /rest/content/{id}/child/{type}
Returns the direct children of a piece of Content, limited to a single child type.
The {@link ContentType}(s) of the children returned is specified by the "type" path parameter in the request.
Example request URI(s):
http://example.com/confluence/rest/api/content/1234/child/page
http://example.com/confluence/rest/api/content/1234/child/comment
http://example.com/confluence/rest/api/content/1234/child/page?expand=body.view
http://example.com/confluence/rest/api/content/1234/child/comment?start=20&limit=10
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string Default: |
a comma separated list of properties to expand on the children |
parentVersion |
int Default: 0 |
an int representing the version of the content to retrieve children for |
start |
int |
(optional, default: 0) the index of the first item within the result set that should be returned |
limit |
int Default: 25 |
(optional, default: site limit) how many items should be returned after the start index |
Responses
-
- Status
200 - application/jsonReturns a JSON map representing multiple ordered collections of content children, keyed by content type
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/rest-list-of-content#","title":"Rest List of Content","type":"array","items":{"$ref":"#/definitions/content"},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}}}
- Status
200 - application/json
-
- Status
404Returned if there is no content with the given id, or if the calling user does not have permission to view the content.
- Status
404
Comments of contentGET /rest/content/{id}/child/comment
Returns the comments of a content
Example request URI(s):
http://example.com/confluence/rest/api/content/1234/child/comment
http://example.com/confluence/rest/api/content/1234/child/comment?expand=body.view
http://example.com/confluence/rest/api/content/1234/child/comment?start=20&limit=10
http://example.com/confluence/rest/api/content/1234/child/comment?location=footer&location=inline&location=resolved
http://example.com/confluence/rest/api/content/1234/child/comment?expand=extensions.inlineProperties,extensions.resolution
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string Default: |
a comma separated list of properties to expand on the children.
We can also specify some extensions such as |
parentVersion |
int Default: 0 |
an int representing the version of the content to retrieve children for |
start |
int |
(optional, default: 0) the index of the first item within the result set that should be returned |
limit |
int Default: 25 |
(optional, default: site limit) how many items should be returned after the start index |
location |
string |
(optional, default: "" means all) the location of the comments. Possible values are: "inline", "footer", "resolved". You can define multiple location params. The results will be the comments matched by any location. |
depth |
string Default: |
(optional, default: "") the depth of the comments. Possible values are: "" (ROOT only), "all" |
Responses
-
- Status
200 - application/jsonReturns a JSON map representing multiple ordered collections of content children, keyed by content type
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/rest-list-of-content#","title":"Rest List of Content","type":"array","items":{"$ref":"#/definitions/content"},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}}}
- Status
200 - application/json
-
- Status
404Returned if there is no content with the given id, or if the calling user does not have permission to view the content.
- Status
404
content/{id}/child/attachment
CRUD operations for Attachments on Content.
Get attachmentsGET /rest/content/{id}/child/attachment
Returns a paginated list of attachment Content entities within a single container.
Example request URI(s):
http://example.com/confluence/rest/api/content/1234/child/attachment?start=0&limit=10
http://example.com/confluence/rest/api/content/1234/child/attachment?filename=myfile.txt&expand=version,container
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string Default: |
a comma separated list of properties to expand on the Attachments returned. Optional. |
start |
int |
the index of the first item within the result set that should be returned. Optional. |
limit |
int Default: 50 |
how many items should be returned after the start index. Optional. |
filename |
string |
(optional) filter parameter to return only the Attachment with the matching file name. Optional. |
mediaType |
string |
(optional) filter parameter to return only Attachments with a matching Media-Type. Optional. |
Responses
-
- Status
200 - application/jsonReturns a JSON representation of a list of attachment Content entities
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/rest-list-of-content#","title":"Rest List of Content","type":"array","items":{"$ref":"#/definitions/content"},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}}}
- Status
200 - application/json
-
- Status
404Returned if there is no content with the given id, or if the calling user does not have permission to view the content.
- Status
404
Create attachmentsPOST /rest/content/{id}/child/attachment
Add one or more attachments to a Confluence Content entity, with optional comments.
Comments are optional, but if included there must be as many comments as there are files, and the comments must be in the same order as the files.
This resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867. Most client libraries have classes that make dealing with multipart posts simple. For instance, in Java the Apache HTTP Components library provides a MultiPartEntity that makes it simple to submit a multipart POST.
In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be blocked.
The name of the multipart/form-data parameter that contains attachments must be "file"
A simple example to attach a file called "myfile.txt" to the container with id "123", with a comment included:
curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" -F "comment=This is my File" http://myhost/rest/api/content/123/child/attachment
A example to attach a file called "myfile.txt" to the container with id "123", with a comment, and set the minorEdits flag to be true:
curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" -F "minorEdit=true" -F "comment=This is my File" http://myhost/rest/api/content/123/child/attachment
An example to attach the same file, with no comment:
curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" http://myhost/rest/api/content/123/child/attachment
Example request URI(s):
http://example.com/confluence/rest/api/content/1234/child/attachment
Request
query parameters
parameter | type | description |
---|---|---|
status |
string Default: current |
a string containing the status of the attachments content container, supports current or draft, defaults to current |
allowDuplicated |
boolean Default: false |
allows to upload an attachment with an existing filename. Optional. |
expand |
string Default: |
a comma separated list of properties to expand on the Attachments returned. Optional. |
Responses
-
- Status
200 - application/json
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/rest-list-of-content#","title":"Rest List of Content","type":"array","items":{"$ref":"#/definitions/content"},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}}}
- Status
200 - application/json
-
- Status
403Returned if attachments is disabled or if you don't have permission to add attachments to this content.
- Status
403
-
- Status
404Returned if the requested content is not found, the user does not have permission to view it, or if the attachments exceeds the maximum configured attachment size.
- Status
404
UpdatePUT /rest/content/{id}/child/attachment/{attachmentId}
Update the non-binary data of an Attachment.
This resource can be used to update an attachment's filename, media-type, comment, and parent container.
Example request URI(s):
http://example.com/confluence/rest/api/content/1234/child/attachment/5678
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/content#","title":"Content","type":"object","properties":{"id":{"$ref":"#/definitions/content-id"},"type":{"$ref":"#/definitions/content-type"},"status":{"$ref":"#/definitions/content-status"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"$ref":"#/definitions/history"}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"$ref":"#/definitions/operation-check-result"}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"$ref":"#/definitions/container"}},"body":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-body"}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"container":{"title":"Container","type":"object"},"content":{"title":"Content","type":"object","properties":{"id":{"$ref":"#/definitions/content-id"},"type":{"$ref":"#/definitions/content-type"},"status":{"$ref":"#/definitions/content-status"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"$ref":"#/definitions/history"}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"$ref":"#/definitions/operation-check-result"}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"$ref":"#/definitions/container"}},"body":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-body"}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"additionalProperties":false},"content-body":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"content-id":{"title":"Content Id","type":"object"},"content-representation":{"title":"Content Representation","type":"object"},"content-restriction":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false},"content-status":{"title":"Content Status","type":"object"},"content-type":{"title":"Content Type","type":"object"},"history":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-check-result":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
Responses
-
- Status
200 - application/json
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/content#","title":"Content","type":"object","properties":{"id":{"$ref":"#/definitions/content-id"},"type":{"$ref":"#/definitions/content-type"},"status":{"$ref":"#/definitions/content-status"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"$ref":"#/definitions/history"}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"$ref":"#/definitions/operation-check-result"}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"$ref":"#/definitions/container"}},"body":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-body"}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"container":{"title":"Container","type":"object"},"content":{"title":"Content","type":"object","properties":{"id":{"$ref":"#/definitions/content-id"},"type":{"$ref":"#/definitions/content-type"},"status":{"$ref":"#/definitions/content-status"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"$ref":"#/definitions/history"}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"$ref":"#/definitions/operation-check-result"}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"$ref":"#/definitions/container"}},"body":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-body"}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"additionalProperties":false},"content-body":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"content-id":{"title":"Content Id","type":"object"},"content-representation":{"title":"Content Representation","type":"object"},"content-restriction":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false},"content-status":{"title":"Content Status","type":"object"},"content-type":{"title":"Content Type","type":"object"},"history":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-check-result":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
400Returned if the attachment id or the attachment version number are invalid.
- Status
400
-
- Status
403Returned if you are not permitted to update or move the attachment to a different container.
- Status
403
-
- Status
404Returned if no attachment is found for the attachmentId.
- Status
404
-
- Status
409Returned if the version of the supplied Attachment does not match the exact version of the Attachment stored in the database.
- Status
409
Update dataPOST /rest/content/{id}/child/attachment/{attachmentId}/data
Update the binary data of an Attachment, and optionally the comment and the minor edit field.
This adds a new version of the attachment, containing the new binary data, filename, and content-type.
When updating the binary data of an attachment, the comment related to it together with the field that specifies if it's a minor edit can be updated as well, but are not required. If an update is considered to be a minor edit, notifications will not be sent to the watchers of that content.
This resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867. Most client libraries have classes that make dealing with multipart posts simple. For instance, in Java the Apache HTTP Components library provides a MultiPartEntity that makes it simple to submit a multipart POST.
In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be blocked.
The name of the multipart/form-data parameter that contains attachments must be "file"
A simple example to upload a file called "myfile.txt" to the Attachment with id "456" in a container with id "123", with the comment updated, and minorEdit set to true:
curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" -F "minorEdit=true" -F "comment=This is my updated File" http://myhost/rest/api/content/123/child/attachment/456/data
An example to upload the same file, with no comment:
curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" http://myhost/rest/api/content/123/child/attachment/456/data
Example request URI(s):
http://example.com/confluence/rest/api/content/1234/child/attachment/5678/data
Responses
-
- Status
200 - application/json
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/content#","title":"Content","type":"object","properties":{"id":{"$ref":"#/definitions/content-id"},"type":{"$ref":"#/definitions/content-type"},"status":{"$ref":"#/definitions/content-status"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"$ref":"#/definitions/history"}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"$ref":"#/definitions/operation-check-result"}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"$ref":"#/definitions/container"}},"body":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-body"}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"container":{"title":"Container","type":"object"},"content":{"title":"Content","type":"object","properties":{"id":{"$ref":"#/definitions/content-id"},"type":{"$ref":"#/definitions/content-type"},"status":{"$ref":"#/definitions/content-status"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"$ref":"#/definitions/history"}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"$ref":"#/definitions/operation-check-result"}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"$ref":"#/definitions/container"}},"body":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-body"}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"additionalProperties":false},"content-body":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"content-id":{"title":"Content Id","type":"object"},"content-representation":{"title":"Content Representation","type":"object"},"content-restriction":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false},"content-status":{"title":"Content Status","type":"object"},"content-type":{"title":"Content Type","type":"object"},"history":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-check-result":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
400Returned if the attachment id is invalid.
- Status
400
-
- Status
404Returned if no attachment is found for the attachmentId.
- Status
404
content/{id}/descendant
REST wrapper for the {@link ChildContentService}, when {@link Depth} is ALL.
DescendantsGET /rest/content/{id}/descendant
Returns a map of the descendants of a piece of Content. Content can have multiple types of descendants - for example a Page can have descendants that are also Pages, but it can also have Comments and Attachments.
The {@link ContentType}(s) of the descendants returned is specified by the "expand" query parameter in the request
- this parameter can include expands for multiple descendant types.
If no types are included in the expand parameter, the map returned will just list the descendant types that are available
to be expanded for the {@link Content} referenced by the "id" path parameter.
Currently the only supported descendants are comment descendants of non-comment Content.
Example request URI(s):
http://example.com/confluence/rest/api/content/1234/descendant
http://example.com/confluence/rest/api/content/1234/descendant?expand=comment.body.VIEW
http://example.com/confluence/rest/api/content/1234/descendant?expand=comment
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string Default: |
a comma separated list of properties to expand on the descendants |
Responses
-
- Status
200 - application/jsonReturns a JSON map representing multiple ordered collections of content descendants, keyed by content type
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/map-of-content-type#","title":"Map of Content Type","type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
404Returned if there is no content with the given id, or if the calling user does not have permission to view the content.
- Status
404
Descendants of typeGET /rest/content/{id}/descendant/{type}
Returns the direct descendants of a piece of Content, limited to a single descendant type.
The {@link ContentType}(s) of the descendants returned is specified by the "type" path parameter in the request.
Currently the only supported descendants are comment descendants of non-comment Content.
Example request URI(s):
http://example.com/confluence/rest/api/content/1234/descendant/comment
http://example.com/confluence/rest/api/content/1234/descendant/comment?expand=body.VIEW
http://example.com/confluence/rest/api/content/1234/descendant/comment?start=20&limit=10
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string Default: |
a comma separated list of properties to expand on the descendants |
start |
int |
(optional, default: 0) the index of the first item within the result set that should be returned |
limit |
int Default: 25 |
(optional, default: site limit) how many items should be returned after the start index |
Responses
-
- Status
200 - application/jsonReturns a JSON map representing multiple ordered collections of content descendants, keyed by content type
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/rest-list-of-content#","title":"Rest List of Content","type":"array","items":{"$ref":"#/definitions/content"},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}}}
- Status
200 - application/json
-
- Status
404Returned if there is no content with the given id, or if the calling user does not have permission to view the content.
- Status
404
content/{id}/label
REST wrapper for the {@link ContentLabelService}.
LabelsGET /rest/content/{id}/label
Returns the list of labels on a piece of Content.
Example request URI(s):
http://example.com/confluence/rest/api/content/1234/label
http://example.com/confluence/rest/api/content/1234/label?prefix=global&start=0&limit=200
Request
query parameters
parameter | type | description |
---|---|---|
prefix |
string |
the prefixes to filter the labels with {@see Label.Prefix} |
start |
int | |
limit |
int Default: 200 |
the limit of the number of labels to return, this may be restricted by fixed system limits |
Responses
-
- Status
200 - application/jsonReturns a JSON representation of the labels on a piece of content
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-response-of-label#","title":"Page Response of Label","type":"array","items":{"title":"Label","type":"object","properties":{"prefix":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false}}
- Status
200 - application/json
-
- Status
404Returned if there is no content with the given id, or if the calling user does not have permission to view the content.
- Status
404
Delete label with query paramDELETE /rest/content/{id}/label
Deletes a labels to the specified content.
Request
query parameters
parameter | type | description |
---|---|---|
name |
string |
the name of the label to be removed from the content |
Responses
-
- Status
204Empty response on successful delete
- Status
204
-
- Status
403Returned if user has view permission, but no edit permission to the content
- Status
403
-
- Status
404Returned if content or label doesn't exist, or calling user doesn't have view permission to the content
- Status
404
Add labelsPOST /rest/content/{id}/label
Adds a list of labels to the specified content.
The body is the json representation of the list.
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/string#","title":"String","type":"string"}
Responses
-
- Status
200 - application/jsonReturns a JSON representation of the labels on a piece of content
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-response-of-label#","title":"Page Response of Label","type":"array","items":{"title":"Label","type":"object","properties":{"prefix":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false}}
- Status
200 - application/json
-
- Status
404Returned if there is no content with the given id, or if the calling user does not have permission to view the content.
- Status
404
Delete labelDELETE /rest/content/{id}/label/{label}
Deletes a labels to the specified content. When calling this method through REST the label parameter doesn't accept "/" characters in label names, because of security constraints. For this case please use the query parameter version of this method (/content/{id}/label?name={label}
Responses
-
- Status
204Empty response on successful delete
- Status
204
-
- Status
400Returned if trying to delete a label with "/" in the name
- Status
400
-
- Status
403Returned if user has view permission, but no edit permission to the content
- Status
403
-
- Status
404Returned if content or label doesn't exist, or calling user doesn't have view permission to the content
- Status
404
content/{id}/property
Find allGET /rest/content/{id}/property
Returns a paginated list of content properties.
Example request URI:
http://example.com/confluence/rest/api/content/1234/property?expand=content,version
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string |
a comma separated list of properties to expand on the content properties. Default value: |
start |
int |
the start point of the collection to return |
limit |
int Default: 10 |
the limit of the number of items to return, this may be restricted by fixed system limits |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of the content property list
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/rest-list-of-json-content-property#","title":"Rest List of Json Content Property","type":"array","items":{"title":"Json Content Property","type":"object","properties":{"key":{"type":"string"},"value":{"title":"Json String","type":"object"},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"id":{"title":"Json Content Property Id","type":"object"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}}}
- Status
200 - application/json
-
- Status
404Returned if there is no content with the given id, or if the calling user does not have permission to view the content.
- Status
404
CreatePOST /rest/content/{id}/property
Creates a new content property.
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/json-content-property#","title":"Json Content Property","type":"object","properties":{"key":{"type":"string"},"value":{"title":"Json String","type":"object"},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"id":{"title":"Json Content Property Id","type":"object"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of the content property
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/json-content-property#","title":"Json Content Property","type":"object","properties":{"key":{"type":"string"},"value":{"title":"Json String","type":"object"},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"id":{"title":"Json Content Property Id","type":"object"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
400Returned if the given property has a different ContentId to the one in the path, or if the content already has a value with the given key, or the value is missing, or the value is too long.
- Status
400
-
- Status
403Returned if the user does not have permission to edit the content with the given ContentId
- Status
403
-
- Status
413Returned if the value is too long.
- Status
413
Find by keyGET /rest/content/{id}/property/{key}
Returns a content property.
Example request URI:
http://example.com/confluence/rest/api/content/1234/property/example-property-key?expand=content,version
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string |
a comma separated list of properties to expand on the content properties. Default value: |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of the content property
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/json-content-property#","title":"Json Content Property","type":"object","properties":{"key":{"type":"string"},"value":{"title":"Json String","type":"object"},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"id":{"title":"Json Content Property Id","type":"object"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
404Returned if there is no content with the given id, or no property with the given key, or if the calling user does not have permission to view the content.
- Status
404
UpdatePUT /rest/content/{id}/property/{key}
Updates a content property.
The body contains the representation of the content property. Must include the property id, and the new version number. Attempts to create a new content property if the given version number is 1, just like {@link #create(com.atlassian.confluence.api.model.content.id.ContentId, String, com.atlassian.confluence.api.model.content.JsonContentProperty)}.
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/json-content-property#","title":"Json Content Property","type":"object","properties":{"key":{"type":"string"},"value":{"title":"Json String","type":"object"},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"id":{"title":"Json Content Property Id","type":"object"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a piece of content
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/json-content-property#","title":"Json Content Property","type":"object","properties":{"key":{"type":"string"},"value":{"title":"Json String","type":"object"},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"id":{"title":"Json Content Property Id","type":"object"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
400Returned if the given property has a different ContentId to the one in the path, or if the property has a different key to the one in the path, or the value is missing, or the value is too long.
- Status
400
-
- Status
403Returned if the user does not have permission to edit the content with the given ContentId
- Status
403
-
- Status
404Returned if there is no content with the given id, or no property with the given key, or if the calling user does not have permission to view the content.
- Status
404
-
- Status
409Returned if the given version is does not match the expected target version of the updated property
- Status
409
-
- Status
413Returned if the value is too long.
- Status
413
DeleteDELETE /rest/content/{id}/property/{key}
Deletes a content property.
Responses
-
- Status
204Returned if successfully deleted.
- Status
204
-
- Status
404Returned if there is no content with the given id, or if the calling user does not have permission to view the content.
- Status
404
CreatePOST /rest/content/{id}/property/{key}
Creates a new content property.
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/json-content-property#","title":"Json Content Property","type":"object","properties":{"key":{"type":"string"},"value":{"title":"Json String","type":"object"},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"id":{"title":"Json Content Property Id","type":"object"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of the content property
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/json-content-property#","title":"Json Content Property","type":"object","properties":{"key":{"type":"string"},"value":{"title":"Json String","type":"object"},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"id":{"title":"Json Content Property Id","type":"object"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
400Returned if the given property has a different ContentId to the one in the path, or if the content already has a value with the given key, or the value is missing, or the value is too long.
- Status
400
-
- Status
403Returned if the user does not have permission to edit the content with the given ContentId
- Status
403
-
- Status
413Returned if the value is too long.
- Status
413
content/{id}/restriction
By operationGET /rest/content/{id}/restriction/byOperation
Returns info about all restrictions by operation
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string Default: update.restrictions.user,read.restrictions.group,read.restrictions.user,update.restrictions.group |
a comma separated list of properties to expand on the content properties. Default value: group. |
Responses
-
- Status
200 - application/jsonReturns a JSON representation of the restrictions group by operations
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/map-of-operation-key-and-content-restriction#","title":"Map of Operation Key-and-Content Restriction","type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"content-restriction":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
For operationGET /rest/content/{id}/restriction/byOperation/{operationKey}
Returns info about all restrictions of given operation
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string Default: restrictions.user,restrictions.group |
a comma separated list of properties to expand on the content properties. Default value: group. |
start |
int |
pagination start |
limit |
int Default: 100 |
pagination limit |
Responses
-
- Status
200 - application/jsonReturns a JSON representation of the restrictions of given operation
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/content-restriction#","title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"$ref":"#/definitions/subject-restrictions"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"$ref":"#/definitions/subject-restrictions"}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"subject-restrictions":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
content/blueprint
Publish legacy draftPOST /rest/content/blueprint/instance/{draftId}
Publishes a legacy draft of a Content created from a ContentBlueprint
Request
query parameters
parameter | type | description |
---|---|---|
status |
string Default: draft |
only support 'draft' status for now. |
expand |
string Default: body.storage,history,space,version,ancestors |
A comma separated list of properties to expand on the content. Default value: |
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/content#","title":"Content","type":"object","properties":{"id":{"$ref":"#/definitions/content-id"},"type":{"$ref":"#/definitions/content-type"},"status":{"$ref":"#/definitions/content-status"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"$ref":"#/definitions/history"}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"$ref":"#/definitions/operation-check-result"}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"$ref":"#/definitions/container"}},"body":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-body"}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"container":{"title":"Container","type":"object"},"content":{"title":"Content","type":"object","properties":{"id":{"$ref":"#/definitions/content-id"},"type":{"$ref":"#/definitions/content-type"},"status":{"$ref":"#/definitions/content-status"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"$ref":"#/definitions/history"}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"$ref":"#/definitions/operation-check-result"}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"$ref":"#/definitions/container"}},"body":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-body"}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"additionalProperties":false},"content-body":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"content-id":{"title":"Content Id","type":"object"},"content-representation":{"title":"Content Representation","type":"object"},"content-restriction":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false},"content-status":{"title":"Content Status","type":"object"},"content-type":{"title":"Content Type","type":"object"},"history":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-check-result":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
Responses
-
- application/json
Publish shared draftPUT /rest/content/blueprint/instance/{draftId}
Publishes a shared draft of a Content created from a ContentBlueprint
Request
query parameters
parameter | type | description |
---|---|---|
status |
string Default: draft |
only support 'draft' status for now. |
expand |
string Default: body.storage,history,space,version,ancestors |
A comma separated list of properties to expand on the content. Default value: |
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/content#","title":"Content","type":"object","properties":{"id":{"$ref":"#/definitions/content-id"},"type":{"$ref":"#/definitions/content-type"},"status":{"$ref":"#/definitions/content-status"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"$ref":"#/definitions/history"}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"$ref":"#/definitions/operation-check-result"}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"$ref":"#/definitions/container"}},"body":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-body"}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"container":{"title":"Container","type":"object"},"content":{"title":"Content","type":"object","properties":{"id":{"$ref":"#/definitions/content-id"},"type":{"$ref":"#/definitions/content-type"},"status":{"$ref":"#/definitions/content-status"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"$ref":"#/definitions/history"}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"$ref":"#/definitions/operation-check-result"}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"$ref":"#/definitions/container"}},"body":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-body"}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/content-restriction"}},"additionalProperties":false}},"additionalProperties":false},"content-body":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"content-id":{"title":"Content Id","type":"object"},"content-representation":{"title":"Content Representation","type":"object"},"content-restriction":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false},"content-status":{"title":"Content Status","type":"object"},"content-type":{"title":"Content Type","type":"object"},"history":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-check-result":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
Responses
-
- application/json
contentbody/convert/{to}
Used for converting ContentBody objects from one format to another.
ConvertPOST /rest/contentbody/convert/{to}
Converts between content body representations.
Not all representations can be converted to/from other formats. Supported conversions:
Source Representation | Destination Representation Supported |
---|---|
storage | view,export_view,styled_view,editor |
editor | storage |
view | None |
export_view | None |
styled_view | None |
Example request URI(s):
http://example.com/confluence/rest/api/contentbody/convert/view
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string Default: |
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/content-body#","title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
Responses
-
- Status
200 - application/json
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/content-body#","title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
group
Non-admin operations for user groups
Get groupsGET /rest/group
Get a paginated collection of user groups
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string Default: |
|
start |
int |
the start point of the collection to return |
limit |
int Default: 200 |
the limit of the number of items to return, this may be restricted by fixed system limits |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a list of groups
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-response-of-group#","title":"Page Response of Group","type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}
- Status
200 - application/json
-
- Status
403Returned if the calling user does not have permission to view groups.
- Status
403
Get groupGET /rest/group/{groupName}
Get the user group with the group name
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a single groups
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/group#","title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
403Returned if the calling user does not have permission to view groups.
- Status
403
Get membersGET /rest/group/{groupName}/member
Get a paginated collection of users in the given group
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string | |
start |
int |
the start point of the collection to return |
limit |
int Default: 200 |
the limit of the number of items to return, this may be restricted by fixed system limits |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a single groups
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-response-of-person#","title":"Page Response of Person","type":"array","items":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false}}}
- Status
200 - application/json
-
- Status
403Returned if the calling user does not have permission to view users.
- Status
403
longtask
REST wrapper for the LongTaskService.
Get tasksGET /rest/longtask
Returns information about all tracked long-running tasks.
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string Default: |
a comma separated list of properties to expand on the tasks |
start |
int | |
limit |
int Default: 100 |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a list of long tasks
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/rest-list-of-long-task-status#","title":"Rest List of Long Task Status","type":"array","items":{"title":"Long Task Status","type":"object","properties":{"id":{"title":"Long Task Id","type":"object"},"name":{"$ref":"#/definitions/message"},"elapsedTime":{"type":"integer"},"percentageComplete":{"type":"integer"},"successful":{"type":"boolean"},"messages":{"type":"array","items":{"$ref":"#/definitions/message"}}},"additionalProperties":false,"required":["elapsedTime","percentageComplete","successful"]},"definitions":{"message":{"title":"Message","type":"object","properties":{"args":{"type":"array","items":{}},"key":{"type":"string"}},"additionalProperties":false}}}
- Status
200 - application/json
Get taskGET /rest/longtask/{id}
Returns information about a long-running task.
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string Default: |
a comma separated list of properties to expand on the task |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a long task
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/long-task-status#","title":"Long Task Status","type":"object","properties":{"id":{"title":"Long Task Id","type":"object"},"name":{"$ref":"#/definitions/message"},"elapsedTime":{"type":"integer"},"percentageComplete":{"type":"integer"},"successful":{"type":"boolean"},"messages":{"type":"array","items":{"$ref":"#/definitions/message"}}},"definitions":{"message":{"title":"Message","type":"object","properties":{"args":{"type":"array","items":{}},"key":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["elapsedTime","percentageComplete","successful"]}
- Status
200 - application/json
-
- Status
404Returned if there is no task with the given key, or if the calling user does not have permission to view it
- Status
404
search
SearchGET /rest/search
Search for entities in Confluence using the Confluence Query Language (CQL)
For example:
Example request URI(s):
http://localhost:8080/confluence/rest/api/search?cql=creator=currentUser()&type%20in%20(space,page,user)&cqlcontext={%22spaceKey%22:%22TST%22, %22contentId%22:%2255%22}
http://localhost:8080/confluence/rest/api/search?cql=siteSearch~'example'%20AND%20label=docs&expand=content.space,space.homepage&limit=10
Request
query parameters
parameter | type | description |
---|---|---|
cql |
string |
the CQL query see advanced searching in confluence using CQL |
cqlcontext |
string |
the execution context for CQL functions, provides current space key and content id. If this is not provided some CQL functions will not be available. |
excerpt |
string Default: highlight |
the excerpt strategy to apply to the result, one of : indexed, highlight, none. This defaults to highlight. |
expand |
string Default: |
the properties to expand on the search result, this may cause database requests for some properties |
start |
int | |
limit |
int Default: 25 |
the limit of the number of items to return, this may be restricted by fixed system limits |
includeArchivedSpaces |
boolean Default: false |
whether to include content in archived spaces in the result, this defaults to false |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a list of search results
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/search-page-response-of-search-result#","title":"Search Page Response of Search Result","type":"array","items":{"title":"Search Result","type":"object","properties":{"title":{"type":"string"},"excerpt":{"type":"string"},"url":{"type":"string"},"resultParentContainer":{"type":"array","items":{"$ref":"#/definitions/container-summary"}},"resultGlobalContainer":{"type":"array","items":{"$ref":"#/definitions/container-summary"}},"iconCssClass":{"type":"string"},"lastModified":{"type":"string"},"friendlyLastModified":{"type":"string"}},"additionalProperties":false},"definitions":{"container-summary":{"title":"Container Summary","type":"object","properties":{"title":{"type":"string"},"displayUrl":{"type":"string"}},"additionalProperties":false}}}
- Status
200 - application/json
-
- Status
400Returned if the query cannot be parsed
- Status
400
space
REST wrapper for the SpaceService.
SpacesGET /rest/space
Returns information about a number of spaces.
Example request URI(s):
http://example.com/confluence/rest/api/space?spaceKey=TST&spaceKey=ds
Request
query parameters
parameter | type | description |
---|---|---|
spaceKey |
string |
a list of space keys |
type |
string |
filter the list of spaces returned by type (global, personal) |
status |
string |
filter the list of spaces returned by status (current, archived) |
label |
string |
filter the list of spaces returned by label |
favourite |
boolean |
filter the list of spaces returned by favourites |
hasRetentionPolicy |
boolean |
filter the list of spaces returned by retention policy |
expand |
string Default: |
a comma separated list of properties to expand on the spaces |
start |
int |
the start point of the collection to return |
limit |
int Default: 25 |
the limit of the number of spaces to return, this may be restricted by fixed system limits |
Responses
-
- Status
200 - application/jsonReturns an array of full JSON representations of found spaces
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-response-of-space#","title":"Page Response of Space","type":"array","items":{"$ref":"#/definitions/space"},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}}}
- Status
200 - application/json
Create spacePOST /rest/space
Creates a new Space.
The incoming Space does not include an id, but must include a Key and Name, and should include a Description.
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/space#","title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/formatted-body"}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"$ref":"#/definitions/space-type"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"$ref":"#/definitions/space-retention-policy"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/formatted-body"}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"$ref":"#/definitions/space-type"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"$ref":"#/definitions/space-retention-policy"}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"formatted-body":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space-retention-policy":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]},"space-type":{"title":"Space Type","type":"object"},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a space
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/space#","title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/formatted-body"}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"$ref":"#/definitions/space-type"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"$ref":"#/definitions/space-retention-policy"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/formatted-body"}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"$ref":"#/definitions/space-type"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"$ref":"#/definitions/space-retention-policy"}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"formatted-body":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space-retention-policy":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]},"space-type":{"title":"Space Type","type":"object"},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
Create private spacePOST /rest/space/_private
Creates a new private Space, viewable only by its creator.
The incoming Space does not include an id, but must include a Key and Name, and should include a Description.
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/space#","title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/formatted-body"}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"$ref":"#/definitions/space-type"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"$ref":"#/definitions/space-retention-policy"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/formatted-body"}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"$ref":"#/definitions/space-type"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"$ref":"#/definitions/space-retention-policy"}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"formatted-body":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space-retention-policy":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]},"space-type":{"title":"Space Type","type":"object"},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a space
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/space#","title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/formatted-body"}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"$ref":"#/definitions/space-type"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"$ref":"#/definitions/space-retention-policy"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/formatted-body"}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"$ref":"#/definitions/space-type"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"$ref":"#/definitions/space-retention-policy"}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"formatted-body":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space-retention-policy":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]},"space-type":{"title":"Space Type","type":"object"},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
UpdatePUT /rest/space/{spaceKey}
Updates a Space.
Currently only the Space name, description and homepage can be updated.
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/space#","title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/formatted-body"}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"$ref":"#/definitions/space-type"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"$ref":"#/definitions/space-retention-policy"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/formatted-body"}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"$ref":"#/definitions/space-type"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"$ref":"#/definitions/space-retention-policy"}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"formatted-body":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space-retention-policy":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]},"space-type":{"title":"Space Type","type":"object"},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a space
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/space#","title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/formatted-body"}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"$ref":"#/definitions/space-type"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"$ref":"#/definitions/space-retention-policy"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/formatted-body"}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"$ref":"#/definitions/space-type"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"$ref":"#/definitions/space-retention-policy"}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"formatted-body":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space-retention-policy":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]},"space-type":{"title":"Space Type","type":"object"},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
404Returned if there is no space with the given key, or if the calling user does not have permission to update it.
- Status
404
DeleteDELETE /rest/space/{spaceKey}
Deletes a Space.
The space is deleted in a long running task, so the space cannot be considered deleted when this resource returns. Clients can follow the status link in the response and poll it until the task completes.
Responses
-
- Status
202 - application/jsonReturns a pointer to the status of the space-deletion task
- Status
202 - application/json
-
- Status
404Returned if there is no space with the given key, or if the calling user does not have permission to delete it.
- Status
404
SpaceGET /rest/space/{spaceKey}
Returns information about a space.
Example request URI(s):
http://example.com/confluence/rest/api/space/TST?expand=description
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string Default: |
a comma separated list of properties to expand on the space |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a space
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/space#","title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/formatted-body"}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"$ref":"#/definitions/space-type"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"$ref":"#/definitions/space-retention-policy"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/formatted-body"}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"$ref":"#/definitions/space-type"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"$ref":"#/definitions/space-retention-policy"}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"formatted-body":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space-retention-policy":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]},"space-type":{"title":"Space Type","type":"object"},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
404Returned if there is no space with the given key, or if the calling user does not have permission to view the space.
- Status
404
ContentsGET /rest/space/{spaceKey}/content
Returns the content in this given space
Example request URI(s):
http://example.com/confluence/rest/api/space/TEST/content?expand=history
Request
query parameters
parameter | type | description |
---|---|---|
depth |
string Default: all |
a string indicating if all content, or just the root content of the space is returned. Default value: |
expand |
string Default: |
a comma separated list of properties to expand on each piece of content retrieved |
start |
int |
the start point of the collection to return |
limit |
int Default: 25 |
the limit of the number of labels to return, this may be restricted by fixed system limits |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a piece of content
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/map-of-content-type#","title":"Map of Content Type","type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
404Returned if there is no content with the given id, or if the calling user does not have permission to view the content.
- Status
404
Contents with typeGET /rest/space/{spaceKey}/content/{type}
Returns the content in this given space with the given type
Example request URI(s):
http://example.com/confluence/rest/api/space/TEST/content/page?expand=history
Request
query parameters
parameter | type | description |
---|---|---|
depth |
string Default: all |
a string indicating if all content, or just the root content of the space is returned. Default value: |
expand |
string Default: |
a comma separated list of properties to expand on each piece of content retrieved |
start |
int |
the start point of the collection to return |
limit |
int Default: 25 |
the limit of the number of labels to return, this may be restricted by fixed system limits |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a piece of content
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/rest-list-of-content#","title":"Rest List of Content","type":"array","items":{"$ref":"#/definitions/content"},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}}}
- Status
200 - application/json
-
- Status
404Returned if there is no content with the given id, or if the calling user does not have permission to view the content.
- Status
404
space/{spaceKey}/property
GetGET /rest/space/{spaceKey}/property
Returns a paginated list of space properties.
Example request URI:
http://example.com/confluence/rest/api/space/TST/property?expand=space,version
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string Default: version |
a comma separated list of properties to expand on the space properties. Default value: |
start |
int |
the start point of the collection to return |
limit |
int Default: 10 |
the limit of the number of items to return, this may be restricted by fixed system limits |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of the space property list
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-response-of-json-space-property#","title":"Page Response of Json Space Property","type":"array","items":{"title":"Json Space Property","type":"object","properties":{"key":{"type":"string"},"value":{"title":"Json String","type":"object"},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"space":{"type":"array","items":{"$ref":"#/definitions/space"}}},"additionalProperties":false},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}}}
- Status
200 - application/json
-
- Status
404Returned if there is no space with the given key, or if the calling user does not have permission to view the space.
- Status
404
CreatePOST /rest/space/{spaceKey}/property
Creates a new space property.
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/json-space-property#","title":"Json Space Property","type":"object","properties":{"key":{"type":"string"},"value":{"title":"Json String","type":"object"},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"space":{"type":"array","items":{"$ref":"#/definitions/space"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of the space property
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/json-space-property#","title":"Json Space Property","type":"object","properties":{"key":{"type":"string"},"value":{"title":"Json String","type":"object"},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"space":{"type":"array","items":{"$ref":"#/definitions/space"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
400Returned if the space already has a value with the given key, or no property value was provided, or the value is too long.
- Status
400
-
- Status
403Returned if the user does not have permission to edit the space with the given key
- Status
403
-
- Status
413Returned if the value is too long.
- Status
413
GetGET /rest/space/{spaceKey}/property/{key}
Returns a paginated list of space properties.
Example request URI:
http://example.com/confluence/rest/api/space/TST/property?expand=space,version
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string Default: version |
a comma separated list of properties to expand on the space properties. Default value: |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of the space property list
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/json-space-property#","title":"Json Space Property","type":"object","properties":{"key":{"type":"string"},"value":{"title":"Json String","type":"object"},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"space":{"type":"array","items":{"$ref":"#/definitions/space"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
404Returned if there is no space with the given key, or if the calling user does not have permission to view the space.
- Status
404
UpdatePUT /rest/space/{spaceKey}/property/{key}
Updates a space property.
The body contains the representation of the space property. Must include new version number. If the given version number is 1, attempts to create a new space property, just like {@link #create(String, com.atlassian.confluence.api.model.content.JsonSpaceProperty)}.
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/json-space-property#","title":"Json Space Property","type":"object","properties":{"key":{"type":"string"},"value":{"title":"Json String","type":"object"},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"space":{"type":"array","items":{"$ref":"#/definitions/space"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of the property
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/json-space-property#","title":"Json Space Property","type":"object","properties":{"key":{"type":"string"},"value":{"title":"Json String","type":"object"},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"space":{"type":"array","items":{"$ref":"#/definitions/space"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
400Returned if the given property has a different spaceKey to the one in the path, or if the property has a different key to the one in the path, or no property value was provided, or the value is too long.
- Status
400
-
- Status
403Returned if the user does not have permission to edit the space with the given spaceKey
- Status
403
-
- Status
404Returned if there is no space with the given spaceKey, or no property with the given key, or if the calling user does not have permission to view the space.
- Status
404
-
- Status
409Returned if the given version is does not match the expected target version of the updated property
- Status
409
-
- Status
413Returned if the value is too long.
- Status
413
DeleteDELETE /rest/space/{spaceKey}/property/{key}
Deletes a space property.
Responses
-
- Status
204Returned if successfully deleted.
- Status
204
-
- Status
404Returned if there is no space with the give key, property with the given property key, or if the calling user does not have permission to view the space.
- Status
404
CreatePOST /rest/space/{spaceKey}/property/{key}
Creates a new space property.
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/json-space-property#","title":"Json Space Property","type":"object","properties":{"key":{"type":"string"},"value":{"title":"Json String","type":"object"},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"space":{"type":"array","items":{"$ref":"#/definitions/space"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of the space property
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/json-space-property#","title":"Json Space Property","type":"object","properties":{"key":{"type":"string"},"value":{"title":"Json String","type":"object"},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"space":{"type":"array","items":{"$ref":"#/definitions/space"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
400Returned if the space already has a value with the given key, or no property value was provided, or the value is too long.
- Status
400
-
- Status
403Returned if the user does not have permission to edit the space with the given key
- Status
403
-
- Status
413Returned if the value is too long.
- Status
413
user
Non-admin user operations
Get userGET /rest/user
Get information about a user identified by either user key or username.
Example request URI(s):
http://example.com/confluence/rest/api/user?username=jblogs
http://example.com/confluence/rest/api/user?key=402880824ff933a4014ff9345d7c0002
Request
query parameters
parameter | type | description |
---|---|---|
key |
string |
userkey of the user to request from this resource |
username |
string |
username of the user to request from this resource |
expand |
string |
properties to expand on the user |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a user
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/person#","title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}],"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false}}}
- Status
200 - application/json
-
- Status
403Returned if the calling user does not have permission to view users.
- Status
403
-
- Status
404Returned if a user with the given username or userkey does not exist
- Status
404
Get anonymousGET /rest/user/anonymous
Get information about the how anonymous is represented in confluence
Example request URI(s):
http://example.com/confluence/rest/api/user/anonymous
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a user
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/person#","title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}],"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false}}}
- Status
200 - application/json
-
- Status
403Returned if the calling user does not have permission to use confluence.
- Status
403
Get currentGET /rest/user/current
Get information about the current logged in user.
Example request URI(s):
http://example.com/confluence/rest/api/user/current
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a user
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/person#","title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}],"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false}}}
- Status
200 - application/json
-
- Status
403Returned if the calling user does not have permission to use confluence.
- Status
403
Get groupsGET /rest/user/memberof
Get a paginated collection of groups that the given user is a member of
Example request URI(s):
http://example.com/confluence/rest/api/user/memberof?username=jblogs
http://example.com/confluence/rest/api/user/memberof?key=402880824ff933a4014ff9345d7c0002
Request
query parameters
parameter | type | description |
---|---|---|
key |
string | |
username |
string | |
expand |
string | |
start |
int | |
limit |
int Default: 200 |
Responses
-
- Status
200 - application/jsonReturns a full JSON representation of a collection of groups
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-response-of-group#","title":"Page Response of Group","type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}
- Status
200 - application/json
-
- Status
403Returned if the calling user does not have permission to use confluence.
- Status
403
user/watch
Add content watcherPOST /rest/user/watch/content/{contentId}
Create a new watcher for the given user and content id.
User is optional. If not specified, currently logged-in user will be used. Otherwise, it can be specified by either user key or username. When a user is specified and is different from the logged-in user, the logged-in user needs to be a Confluence administrator.
Example request URI(s):
POST http://example.com/confluence/rest/api/user/watch/content/131213
POST http://example.com/confluence/rest/api/user/watch/content/131213?username=jblogs
POST http://example.com/confluence/rest/api/user/watch/content/131213?key=ff8080815a58e24c015a58e263710000
Request
query parameters
parameter | type | description |
---|---|---|
key |
string |
userkey of the user to create the new watcher for |
username |
string |
username of the user to create the new watcher for |
Responses
-
- Status
204 - application/jsonReturned if the watcher was successfully created
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/content-watch#","title":"Content Watch","type":"object","properties":{"watcher":{"$ref":"#/definitions/user"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"title":"Content Type","type":"object"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
204 - application/json
-
- Status
404Returned if no content exists for the specified content id or the calling user does not have permission to perform the operation
- Status
404
Remove content watcherDELETE /rest/user/watch/content/{contentId}
Delete an existing watcher for the given user and content id.
User is optional. If not specified, currently logged-in user will be used. Otherwise, it can be specified by either user key or username. When a user is specified and is different from the logged-in user, the logged-in user needs to be a Confluence administrator.
Example request URI(s):
DELETE http://example.com/confluence/rest/api/user/watch/content/131213
DELETE http://example.com/confluence/rest/api/user/watch/content/131213?username=jblogs
DELETE http://example.com/confluence/rest/api/user/watch/content/131213?key=ff8080815a58e24c015a58e263710000
Request
query parameters
parameter | type | description |
---|---|---|
key |
string |
userkey of the user to delete the watcher for |
username |
string |
username of the user to delete the watcher for |
Responses
-
- Status
204 - application/jsonReturned if the watcher was successfully deleted
- Status
204 - application/json
-
- Status
404Returned if no content exists for the specified content id or the calling user does not have permission to perform the operation
- Status
404
Is watching contentGET /rest/user/watch/content/{contentId}
Get information about whether a user is watching a specified content.
User is optional. If not specified, currently logged-in user will be used. Otherwise, it can be specified by either user key or username. When a user is specified and is different from the logged-in user, the logged-in user needs to be a Confluence administrator.
Example request URI(s):
http://example.com/confluence/rest/api/user/watch/content/131213
http://example.com/confluence/rest/api/user/watch/content/131213?username=jblogs
http://example.com/confluence/rest/api/user/watch/content/131213?key=ff8080815a58e24c015a58e263710000
Request
query parameters
parameter | type | description |
---|---|---|
key |
string |
userkey of the user to check for watching state |
username |
string |
username of the user to check for watching state |
Responses
-
- Status
200 - application/jsonReturns a JSON representation containing the watching state
- Status
200 - application/json
-
- Status
404Returned if no content exists for the specified content id or calling user does not have permission to perform the operation
- Status
404
Is watching spaceGET /rest/user/watch/space/{spaceKey}
Get information about whether a user is watching a specified space.
User is optional. If not specified, currently logged-in user will be used. Otherwise, it can be specified by either user key or username. When a user is specified and is different from the logged-in user, the logged-in user needs to be a Confluence administrator.
Example request URI(s):
http://example.com/confluence/rest/api/user/watch/space/SPACEKEY
http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?username=jblogs
http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?key=ff8080815a58e24c015a58e263710000
http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?contentType=blostpost
Request
query parameters
parameter | type | description |
---|---|---|
key |
string |
userkey of the user to check for watching state |
username |
string |
username of the user to check for watching state |
contentType |
string |
an optional content type to check for watching state |
Responses
-
- Status
200 - application/jsonReturns a JSON representation containing the watching state
- Status
200 - application/json
-
- Status
404Returned if no space exists for the specified space key or the calling user does not have permission to perform the operation
- Status
404
Add space watchPOST /rest/user/watch/space/{spaceKey}
Create a new watcher for the given user and space key.
User is optional. If not specified, currently logged-in user will be used. Otherwise, it can be specified by either user key or username. When a user is specified and is different from the logged-in user, the logged-in user needs to be a Confluence administrator.
Example request URI(s):
POST http://example.com/confluence/rest/api/user/watch/space/SPACEKEY
POST http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?username=jblogs
POST http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?key=ff8080815a58e24c015a58e263710000
POST http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?contentType=blogpost
Request
query parameters
parameter | type | description |
---|---|---|
key |
string |
userKey of the user to create the new watcher for |
username |
string |
userName of the user to create the new watcher for |
contentType |
string |
the optional content type to delete the watcher for |
Responses
-
- Status
200 - application/jsonReturned if the watcher was successfully created
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/space-watch#","title":"Space Watch","type":"object","properties":{"watcher":{"$ref":"#/definitions/user"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"contentTypes":{"type":"array","items":{"$ref":"#/definitions/content-type"}}},"definitions":{"anonymous":{"title":"Anonymous","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"type":{"type":"string"}},"additionalProperties":false},"content":{"title":"Content","type":"object","properties":{"id":{"title":"Content Id","type":"object"},"type":{"$ref":"#/definitions/content-type"},"status":{"title":"Content Status","type":"object"},"title":{"type":"string"},"space":{"type":"array","items":{"$ref":"#/definitions/space"}},"history":{"type":"array","items":{"title":"History","type":"object","properties":{"previousVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"nextVersion":{"type":"array","items":{"$ref":"#/definitions/version"}},"lastUpdated":{"type":"array","items":{"$ref":"#/definitions/version"}},"latest":{"type":"boolean"},"createdBy":{"$ref":"#/definitions/person"},"createdDate":{"type":"string"},"contributors":{"type":"array","items":{"title":"Contributors","type":"object","properties":{"publishers":{"type":"array","items":{"title":"Contributor Users","type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/definitions/person"}},"userKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["latest"]}},"version":{"type":"array","items":{"$ref":"#/definitions/version"}},"ancestors":{"type":"array","items":{"$ref":"#/definitions/content"}},"operations":{"type":"array","items":{"title":"Operation Check Result","type":"object","properties":{"operation":{"$ref":"#/definitions/operation-key"}},"additionalProperties":false}},"children":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"descendants":{"type":"object","patternProperties":{".+":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false},"container":{"type":"array","items":{"title":"Container","type":"object"}},"body":{"type":"object","patternProperties":{".+":{"title":"Content Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false}},"additionalProperties":false},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"extensions":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"restrictions":{"type":"object","patternProperties":{".+":{"title":"Content Restriction","type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/definitions/content"}},"operation":{"$ref":"#/definitions/operation-key"},"restrictions":{"type":"array","items":{"title":"Subject Restrictions","type":"object","properties":{"user":{"type":"array","items":{"$ref":"#/definitions/user"}},"group":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"content-representation":{"title":"Content Representation","type":"object"},"content-type":{"title":"Content Type","type":"object"},"html-string":{"title":"Html String","type":"object"},"icon":{"title":"Icon","type":"object","properties":{"path":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"isDefault":{"type":"boolean"}},"additionalProperties":false,"required":["width","height","isDefault"]},"known-user":{"title":"Known User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"},"status":{"type":"array","items":{"title":"User Status","type":"object"}}},"additionalProperties":false},"operation-key":{"title":"Operation Key","type":"object"},"person":{"title":"Person","type":"object","anyOf":[{"$ref":"#/definitions/anonymous"},{"$ref":"#/definitions/known-user"},{"$ref":"#/definitions/unknown-user"},{"$ref":"#/definitions/user"}]},"retention-rule":{"title":"Retention Rule","type":"object","properties":{"maxAge":{"type":"integer"},"ageUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"maxNumberOfVersions":{"type":"integer"},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"space":{"title":"Space","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"icon":{"type":"array","items":{"$ref":"#/definitions/icon"}},"description":{"type":"object","patternProperties":{".+":{"title":"Formatted Body","type":"object","properties":{"value":{"type":"string"},"webresource":{"type":"array","items":{"$ref":"#/definitions/web-resource-dependencies"}},"representation":{"$ref":"#/definitions/content-representation"}},"additionalProperties":false}},"additionalProperties":false},"homepage":{"type":"array","items":{"$ref":"#/definitions/content"}},"type":{"title":"Space Type","type":"object"},"metadata":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"retentionPolicy":{"type":"array","items":{"title":"Space Retention Policy","type":"object","properties":{"spaceAdminCanEdit":{"type":"boolean"},"lastModifiedDate":{"type":"string"},"pageRetentionRule":{"$ref":"#/definitions/retention-rule"},"attachmentRetentionRule":{"$ref":"#/definitions/retention-rule"},"trashRetentionRule":{"title":"Trash Retention Rule","type":"object","properties":{"maxDeletedAge":{"type":"integer"},"deletedAgeUnit":{"type":"string","enum":["DAYS","MONTHS","YEARS"]},"keepAll":{"type":"boolean"}},"additionalProperties":false,"required":["keepAll"]},"lastModifiedBy":{"type":"string"}},"additionalProperties":false,"required":["spaceAdminCanEdit"]}}},"additionalProperties":false},"unknown-user":{"title":"Unknown User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"profilePicture":{"$ref":"#/definitions/icon"},"displayName":{"type":"string"},"username":{"type":"string"}},"additionalProperties":false},"version":{"title":"Version","type":"object","properties":{"by":{"$ref":"#/definitions/person"},"when":{"type":"string"},"message":{"type":"string"},"number":{"type":"integer"},"minorEdit":{"type":"boolean"},"hidden":{"type":"boolean"},"syncRev":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/definitions/content"}}},"additionalProperties":false,"required":["number","minorEdit","hidden"]},"web-resource-dependencies":{"title":"Web Resource Dependencies","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"contexts":{"type":"array","items":{"type":"string"}},"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"superbatch":{"type":"array","items":{"title":"Super Batch Web Resources","type":"object","properties":{"uris":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string","format":"uri"}}},"additionalProperties":false},"tags":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/html-string"}},"additionalProperties":false},"metatags":{"type":"array","items":{"$ref":"#/definitions/html-string"}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
- Status
200 - application/json
-
- Status
404Returned if space exists for the specified space key or if the calling user does not have permission to perform the operation
- Status
404
Remove space watchDELETE /rest/user/watch/space/{spaceKey}
Delete an existing watcher for the given user and space key.
User is optional. If not specified, currently logged-in user will be used. Otherwise, it can be specified by either user key or username. When a user is specified and is different from the logged-in user, the logged-in user needs to be a Confluence administrator.
Example request URI(s):
DELETE http://example.com/confluence/rest/api/user/watch/space/SPACEKEY
DELETE http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?username=jblogs
DELETE http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?key=ff8080815a58e24c015a58e263710000
DELETE http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?contentType=blogpost
Request
query parameters
parameter | type | description |
---|---|---|
key |
string |
userkey of the user to delete the watcher for |
username |
string |
username of the user to delete the watcher for |
contentType |
string |
the optional content type to delete the watcher for |
Responses
-
- Status
204 - application/jsonReturned if the watcher was successfully deleted
- Status
204 - application/json
-
- Status
404Returned if no content exists for the specified space key or the calling user does not have permission to perform the operation
- Status
404
webhooks
Create webhookPOST /rest/webhooks
Create a webhook via the URL.
The authenticated user must be an administrator to call this resource.
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/rest-webhook#","title":"Rest Webhook","type":"object"}
Responses
-
- Status
201 - application/jsonA created webhook.
- Status
201 - application/json
-
- Status
400 - application/jsonThe webhook parameters were invalid or not supplied.
- Status
400 - application/json
-
- Status
401 - application/jsonThe currently authenticated user has insufficient permissions to create webhooks
- Status
401 - application/json
Find webhooksGET /rest/webhooks
Find webhooks.
The authenticated user must be an administrator to call this resource.
Request
query parameters
parameter | type | description |
---|---|---|
event |
string |
list of {@link com.atlassian.webhooks.WebhookEvent} ids to filter for |
statistics |
boolean Default: false |
{@code true} if statistics should be provided for all found webhooks |
start |
int | |
limit |
int Default: 100 |
Responses
-
- Status
200 - application/jsonA list of webhooks.
- Status
200 - application/json
-
- Status
401 - application/jsonThe currently authenticated user has insufficient permissions to find webhooks.
- Status
401 - application/json
Delete webhookDELETE /rest/webhooks/{webhookId}
Delete a webhook via the URL.
The authenticated user must be an administrator to call this resource.
Responses
-
- Status
401 - application/jsonThe currently authenticated user has insufficient permissions to delete webhooks.
- Status
401 - application/json
-
- Status
404 - application/jsonThe webhook does not exist.
- Status
404 - application/json
Get webhookGET /rest/webhooks/{webhookId}
Get a webhook by id.
The authenticated user must be an administrator to call this resource.
Request
query parameters
parameter | type | description |
---|---|---|
statistics |
boolean Default: false |
Responses
-
- Status
200 - application/jsona webhook.
- Status
200 - application/json
-
- Status
401 - application/jsonThe currently authenticated user has insufficient permissions to get a webhook.
- Status
401 - application/json
-
- Status
404 - application/jsonThe webhook does not exist.
- Status
404 - application/json
Update webhookPUT /rest/webhooks/{webhookId}
Update an existing webhook.
The authenticated user must be an administrator to call this resource.
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/rest-webhook#","title":"Rest Webhook","type":"object"}
Responses
-
- Status
200 - application/jsona webhook.
- Status
200 - application/json
-
- Status
401 - application/jsonThe currently authenticated user has insufficient permissions to update a webhook.
- Status
401 - application/json
-
- Status
404 - application/jsonThe webhook does not exist.
- Status
404 - application/json
Get latest invocationGET /rest/webhooks/{webhookId}/latest
Get the latest invocations for a specific webhook.
The authenticated user must be an administrator to call this resource.
Request
query parameters
parameter | type | description |
---|---|---|
event |
string |
the string id of a specific event to retrieve the last invocation for. |
outcome |
string |
the outcome to filter for. Can be SUCCESS, FAILURE, ERROR. None specified means that the all will be considered |
Responses
-
- Status
200 - application/jsona webhook invocation dataset.
- Status
200 - application/json
-
- Status
401 - application/jsonThe currently authenticated user has insufficient permissions to get webhook.
- Status
401 - application/json
-
- Status
404 - application/jsonThe webhook does not exist.
- Status
404 - application/json
Get statisticsGET /rest/webhooks/{webhookId}/statistics
Get the statistics for a specific webhook.
The authenticated user must be an administrator to call this resource.
Request
query parameters
parameter | type | description |
---|---|---|
event |
string |
the string id of a specific event to retrieve the last invocation for. May be empty, in which case all events are considered |
Responses
-
- Status
200 - application/jsona webhook invocation dataset.
- Status
200 - application/json
-
- Status
401 - application/jsonThe currently authenticated user has insufficient permissions to get webhook.
- Status
401 - application/json
-
- Status
404 - application/jsonThe webhook does not exist.
- Status
404 - application/json
Get statistics summaryGET /rest/webhooks/{webhookId}/statistics/summary
Get the statistics summary for a specific webhook.
The authenticated user must be an administrator to call this resource.
Responses
-
- Status
200 - application/jsona webhook invocation dataset.
- Status
200 - application/json
-
- Status
401 - application/jsonThe currently authenticated user has insufficient permissions to get webhook.
- Status
401 - application/json
-
- Status
404 - application/jsonThe webhook does not exist.
- Status
404 - application/json
Test webhookPOST /rest/webhooks/test
Test connectivity to a specific endpoint.
The authenticated user must be an administrator to call this resource.
Request
query parameters
parameter | type | description |
---|---|---|
url |
string |
the url in which to connect to |
Responses
-
- Status
200 - application/json
Example
{"request":{"url":"http://example.com/callback","body":null,"method":"POST","headers":{"Accept":"*/*"}},"response":{"status":200,"headers":{"Content-Type":"application/json"},"body":"{\n \"accepted\": true\n}"}}
- Status
200 - application/json
-
- Status
401 - application/jsonThe currently authenticated user has insufficient permissions to test a connection.
- Status
401 - application/json
-
- Status
404 - application/jsonThe repository does not exist.
- Status
404 - application/json