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
api/accessmode
Resource for plugins to check the access mode set on Confluence.
Get access mode statusGET /rest/api/accessmode
Returns the access mode status for Confluence.
http://example.com/confluence/rest/api/accessmode
Responses
-
- application/json
api/audit
Get audit recordsGET /rest/api/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
Store recordPOST /rest/api/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
ExportGET /rest/api/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/api/audit/retention
Fetches the current retention period
Responses
-
- application/json
Set retention periodPUT /rest/api/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/api/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
api/content
Create contentPOST /rest/api/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 |
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"}]},"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}},"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/api/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/json
Example
{"id":"1234","type":"page","status":"current","title":"Example Content title","space":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"version":{"by":{"type":"known","username":"username","userKey":"","displayName":"Full Name","_expandable":{"status":""}},"when":"2018-12-03T00:19:42.604Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false},"ancestors":[{"id":"123","type":"page","status":"current","ancestors":[],"operations":[],"children":{},"descendants":{},"body":{},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/123"}}],"operations":[],"children":{},"descendants":{},"container":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"body":{"view":{"value":"<p><h1>Example</h1>Some example content body</p>","representation":"view","_expandable":{"content":"/rest/api/content/1234"}}},"metadata":{},"restrictions":{},"_links":{"collection":"/rest/api/content","base":"http://example.com/confluence/","context":"/confluence","self":"http://example.com/confluence/rest/api/content/1234"}}
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}},"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"}]},"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/api/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 |
Example
{"id":"3604482","type":"page","status":"current","title":"Example Content title","space":{"key":"TST","metadata":{}},"version":{"number":2,"minorEdit":false,"hidden":false},"ancestors":[],"operations":[],"children":{},"descendants":{},"body":{"storage":{"value":"<p>This is the updated text for the new page</p>","representation":"storage"}},"metadata":{},"restrictions":{}}
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"}]},"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}},"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
Example
{"id":"1234","type":"page","status":"current","title":"Example Content title","space":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"version":{"by":{"type":"known","username":"username","userKey":"","displayName":"Full Name","_expandable":{"status":""}},"when":"2018-12-03T00:19:42.604Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false},"ancestors":[{"id":"123","type":"page","status":"current","ancestors":[],"operations":[],"children":{},"descendants":{},"body":{},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/123"}}],"operations":[],"children":{},"descendants":{},"container":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"body":{"view":{"value":"<p><h1>Example</h1>Some example content body</p>","representation":"view","_expandable":{"content":"/rest/api/content/1234"}}},"metadata":{},"restrictions":{},"_links":{"collection":"/rest/api/content","base":"http://example.com/confluence/","context":"/confluence","self":"http://example.com/confluence/rest/api/content/1234"}}
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"}]},"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}},"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/api/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/json
Example
{"id":"1234","type":"page","status":"current","title":"Example Content title","space":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"version":{"by":{"type":"known","username":"username","userKey":"","displayName":"Full Name","_expandable":{"status":""}},"when":"2018-12-03T00:19:42.604Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false},"ancestors":[{"id":"123","type":"page","status":"current","ancestors":[],"operations":[],"children":{},"descendants":{},"body":{},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/123"}}],"operations":[],"children":{},"descendants":{},"container":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"body":{"view":{"value":"<p><h1>Example</h1>Some example content body</p>","representation":"view","_expandable":{"content":"/rest/api/content/1234"}}},"metadata":{},"restrictions":{},"_links":{"collection":"/rest/api/content","base":"http://example.com/confluence/","context":"/confluence","self":"http://example.com/confluence/rest/api/content/1234"}}
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"}]},"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}},"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/api/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/api/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}},"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"}]},"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/api/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/json
Example
{"id":"1234","type":"page","status":"current","title":"Example Content title","space":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"version":{"by":{"type":"known","username":"username","userKey":"","displayName":"Full Name","_expandable":{"status":""}},"when":"2018-12-03T00:19:42.760Z","message":"initial edit","number":1,"minorEdit":false,"hidden":false},"ancestors":[],"operations":[],"children":{},"descendants":{},"container":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"body":{"storage":{"value":"<h1>Example</h1><ac:macro ac:name=\"macro\"><ac:rich-text-body><p>This is the body of a macro.</p></ac:rich-text-body></ac:macro>","representation":"storage","_expandable":{"content":"/rest/api/content/1234"}}},"metadata":{},"restrictions":{},"_links":{"collection":"/rest/api/content","base":"http://example.com/confluence/","context":"/confluence","self":"http://example.com/confluence/rest/api/content/1234"}}
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/api/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/json
Example
{"id":"1234","type":"page","status":"current","title":"Example Content title","space":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"version":{"by":{"type":"known","username":"username","userKey":"","displayName":"Full Name","_expandable":{"status":""}},"when":"2018-12-03T00:19:42.760Z","message":"initial edit","number":1,"minorEdit":false,"hidden":false},"ancestors":[],"operations":[],"children":{},"descendants":{},"container":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"body":{"storage":{"value":"<h1>Example</h1><ac:macro ac:name=\"macro\"><ac:rich-text-body><p>This is the body of a macro.</p></ac:rich-text-body></ac:macro>","representation":"storage","_expandable":{"content":"/rest/api/content/1234"}}},"metadata":{},"restrictions":{},"_links":{"collection":"/rest/api/content","base":"http://example.com/confluence/","context":"/confluence","self":"http://example.com/confluence/rest/api/content/1234"}}
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
SearchGET /rest/api/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}},"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"}]},"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
api/content/{id}/child
REST wrapper for the {@link ChildContentService}.
ChildrenGET /rest/api/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/json
Example
{"page":{"results":[{"id":"1234","type":"page","status":"current","title":"Example Content title","links":{},"space":{"id":11,"key":"TST","name":"Example space","icon":null,"description":{"plain":{"representation":"plain","value":"This is an example space","webresource":null}},"homepage":null,"links":{},"metadata":{}},"history":null,"version":{"by":{"type":"known","username":"username","displayName":"Full Name","userKey":"","status":null},"when":"2018-12-03T00:19:42.770Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false,"content":null},"ancestors":[{"id":"123","type":"page","status":"current","links":{},"space":null,"history":null,"version":null,"ancestors":[],"operations":[],"children":{},"descendants":{},"container":null,"body":{},"metadata":{},"extensions":{},"restrictions":{}}],"operations":[],"children":{},"descendants":{},"container":{"id":11,"key":"TST","name":"Example space","icon":null,"description":{"plain":{"representation":"plain","value":"This is an example space","webresource":null}},"homepage":null,"links":{},"metadata":{}},"body":{"view":{"representation":"view","value":"<p><h1>Example</h1>Some example content body</p>","webresource":null,"content":null}},"metadata":{},"extensions":{},"restrictions":{}}],"size":1}}
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}},"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"}]},"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/api/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/json
Example
{"page":{"results":[{"id":"1234","type":"page","status":"current","title":"Example Content title","links":{},"space":{"id":11,"key":"TST","name":"Example space","icon":null,"description":{"plain":{"representation":"plain","value":"This is an example space","webresource":null}},"homepage":null,"links":{},"metadata":{}},"history":null,"version":{"by":{"type":"known","username":"username","displayName":"Full Name","userKey":"","status":null},"when":"2018-12-03T00:19:42.770Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false,"content":null},"ancestors":[{"id":"123","type":"page","status":"current","links":{},"space":null,"history":null,"version":null,"ancestors":[],"operations":[],"children":{},"descendants":{},"container":null,"body":{},"metadata":{},"extensions":{},"restrictions":{}}],"operations":[],"children":{},"descendants":{},"container":{"id":11,"key":"TST","name":"Example space","icon":null,"description":{"plain":{"representation":"plain","value":"This is an example space","webresource":null}},"homepage":null,"links":{},"metadata":{}},"body":{"view":{"representation":"view","value":"<p><h1>Example</h1>Some example content body</p>","webresource":null,"content":null}},"metadata":{},"extensions":{},"restrictions":{}}],"size":1}}
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}},"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"}]},"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/api/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/json
Example
{"page":{"results":[{"id":"1234","type":"page","status":"current","title":"Example Content title","links":{},"space":{"id":11,"key":"TST","name":"Example space","icon":null,"description":{"plain":{"representation":"plain","value":"This is an example space","webresource":null}},"homepage":null,"links":{},"metadata":{}},"history":null,"version":{"by":{"type":"known","username":"username","displayName":"Full Name","userKey":"","status":null},"when":"2018-12-03T00:19:42.770Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false,"content":null},"ancestors":[{"id":"123","type":"page","status":"current","links":{},"space":null,"history":null,"version":null,"ancestors":[],"operations":[],"children":{},"descendants":{},"container":null,"body":{},"metadata":{},"extensions":{},"restrictions":{}}],"operations":[],"children":{},"descendants":{},"container":{"id":11,"key":"TST","name":"Example space","icon":null,"description":{"plain":{"representation":"plain","value":"This is an example space","webresource":null}},"homepage":null,"links":{},"metadata":{}},"body":{"view":{"representation":"view","value":"<p><h1>Example</h1>Some example content body</p>","webresource":null,"content":null}},"metadata":{},"extensions":{},"restrictions":{}}],"size":1}}
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}},"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"}]},"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
api/content/{id}/child/attachment
CRUD operations for Attachments on Content.
Get attachmentsGET /rest/api/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/json
Example
{"results":[{"id":"5678","type":"attachment","status":"current","title":"myfile.txt","version":{"by":{"type":"known","username":"username","userKey":"","displayName":"Full Name","_expandable":{"status":""}},"when":"2018-12-03T00:19:42.797Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false},"ancestors":[],"operations":[],"children":{},"descendants":{},"container":{"id":"1234","type":"page","status":"current","title":"Example Content title","space":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"version":{"by":{"type":"known","username":"username","userKey":"","displayName":"Full Name","_expandable":{"status":""}},"when":"2018-12-03T00:19:42.796Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false},"ancestors":[{"id":"123","type":"page","status":"current","ancestors":[],"operations":[],"children":{},"descendants":{},"body":{},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/123"}}],"operations":[],"children":{},"descendants":{},"container":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"body":{"view":{"value":"<p><h1>Example</h1>Some example content body</p>","representation":"view","_expandable":{"content":"/rest/api/content/1234"}}},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/1234"}},"body":{},"metadata":{"comment":"This is my File","mediaType":"text/plain"},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/5678"}}],"size":1,"_links":{"base":"http://example.com/confluence/","context":"/confluence"}}
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}},"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"}]},"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/api/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
Example
{"results":[{"id":"5678","type":"attachment","status":"current","title":"myfile.txt","version":{"by":{"type":"known","username":"username","userKey":"","displayName":"Full Name","_expandable":{"status":""}},"when":"2018-12-03T00:19:42.797Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false},"ancestors":[],"operations":[],"children":{},"descendants":{},"container":{"id":"1234","type":"page","status":"current","title":"Example Content title","space":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"version":{"by":{"type":"known","username":"username","userKey":"","displayName":"Full Name","_expandable":{"status":""}},"when":"2018-12-03T00:19:42.796Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false},"ancestors":[{"id":"123","type":"page","status":"current","ancestors":[],"operations":[],"children":{},"descendants":{},"body":{},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/123"}}],"operations":[],"children":{},"descendants":{},"container":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"body":{"view":{"value":"<p><h1>Example</h1>Some example content body</p>","representation":"view","_expandable":{"content":"/rest/api/content/1234"}}},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/1234"}},"body":{},"metadata":{"comment":"This is my File","mediaType":"text/plain"},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/5678"}}],"size":1,"_links":{"base":"http://example.com/confluence/","context":"/confluence"}}
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}},"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"}]},"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/api/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
Example
{"id":"5678","type":"attachment","status":"current","title":"new_file_name.txt","version":{"number":2,"minorEdit":false,"hidden":false},"ancestors":[],"operations":[],"children":{},"descendants":{},"body":{},"metadata":{},"restrictions":{}}
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"}]},"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}},"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
Example
{"id":"5678","type":"attachment","status":"current","title":"myfile.txt","version":{"by":{"type":"known","username":"username","userKey":"","displayName":"Full Name","_expandable":{"status":""}},"when":"2018-12-03T00:19:42.763Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false},"ancestors":[],"operations":[],"children":{},"descendants":{},"container":{"id":"1234","type":"page","status":"current","title":"Example Content title","space":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"version":{"by":{"type":"known","username":"username","userKey":"","displayName":"Full Name","_expandable":{"status":""}},"when":"2018-12-03T00:19:42.763Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false},"ancestors":[{"id":"123","type":"page","status":"current","ancestors":[],"operations":[],"children":{},"descendants":{},"body":{},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/123"}}],"operations":[],"children":{},"descendants":{},"container":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"body":{"view":{"value":"<p><h1>Example</h1>Some example content body</p>","representation":"view","_expandable":{"content":"/rest/api/content/1234"}}},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/1234"}},"body":{},"metadata":{"comment":"This is my File","mediaType":"text/plain"},"restrictions":{},"_links":{"collection":"/rest/api/content","base":"http://example.com/confluence/","context":"/confluence","self":"http://example.com/confluence/rest/api/content/5678"}}
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"}]},"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}},"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/api/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
Example
{"results":[{"id":"5678","type":"attachment","status":"current","title":"myfile.txt","version":{"by":{"type":"known","username":"username","userKey":"","displayName":"Full Name","_expandable":{"status":""}},"when":"2018-12-03T00:19:42.797Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false},"ancestors":[],"operations":[],"children":{},"descendants":{},"container":{"id":"1234","type":"page","status":"current","title":"Example Content title","space":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"version":{"by":{"type":"known","username":"username","userKey":"","displayName":"Full Name","_expandable":{"status":""}},"when":"2018-12-03T00:19:42.796Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false},"ancestors":[{"id":"123","type":"page","status":"current","ancestors":[],"operations":[],"children":{},"descendants":{},"body":{},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/123"}}],"operations":[],"children":{},"descendants":{},"container":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"body":{"view":{"value":"<p><h1>Example</h1>Some example content body</p>","representation":"view","_expandable":{"content":"/rest/api/content/1234"}}},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/1234"}},"body":{},"metadata":{"comment":"This is my File","mediaType":"text/plain"},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/5678"}}],"size":1,"_links":{"base":"http://example.com/confluence/","context":"/confluence"}}
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"}]},"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}},"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
api/content/{id}/descendant
REST wrapper for the {@link ChildContentService}, when {@link Depth} is ALL.
DescendantsGET /rest/api/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/json
Example
{"page":{"results":[{"id":"1234","type":"page","status":"current","title":"Example Content title","links":{},"space":{"id":11,"key":"TST","name":"Example space","icon":null,"description":{"plain":{"representation":"plain","value":"This is an example space","webresource":null}},"homepage":null,"links":{},"metadata":{}},"history":null,"version":{"by":{"type":"known","username":"username","displayName":"Full Name","userKey":"","status":null},"when":"2018-12-03T00:19:42.770Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false,"content":null},"ancestors":[{"id":"123","type":"page","status":"current","links":{},"space":null,"history":null,"version":null,"ancestors":[],"operations":[],"children":{},"descendants":{},"container":null,"body":{},"metadata":{},"extensions":{},"restrictions":{}}],"operations":[],"children":{},"descendants":{},"container":{"id":11,"key":"TST","name":"Example space","icon":null,"description":{"plain":{"representation":"plain","value":"This is an example space","webresource":null}},"homepage":null,"links":{},"metadata":{}},"body":{"view":{"representation":"view","value":"<p><h1>Example</h1>Some example content body</p>","webresource":null,"content":null}},"metadata":{},"extensions":{},"restrictions":{}}],"size":1}}
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}},"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"}]},"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/api/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/json
Example
{"page":{"results":[{"id":"1234","type":"page","status":"current","title":"Example Content title","links":{},"space":{"id":11,"key":"TST","name":"Example space","icon":null,"description":{"plain":{"representation":"plain","value":"This is an example space","webresource":null}},"homepage":null,"links":{},"metadata":{}},"history":null,"version":{"by":{"type":"known","username":"username","displayName":"Full Name","userKey":"","status":null},"when":"2018-12-03T00:19:42.770Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false,"content":null},"ancestors":[{"id":"123","type":"page","status":"current","links":{},"space":null,"history":null,"version":null,"ancestors":[],"operations":[],"children":{},"descendants":{},"container":null,"body":{},"metadata":{},"extensions":{},"restrictions":{}}],"operations":[],"children":{},"descendants":{},"container":{"id":11,"key":"TST","name":"Example space","icon":null,"description":{"plain":{"representation":"plain","value":"This is an example space","webresource":null}},"homepage":null,"links":{},"metadata":{}},"body":{"view":{"representation":"view","value":"<p><h1>Example</h1>Some example content body</p>","webresource":null,"content":null}},"metadata":{},"extensions":{},"restrictions":{}}],"size":1}}
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}},"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"}]},"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
api/content/{id}/label
REST wrapper for the {@link ContentLabelService}.
LabelsGET /rest/api/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
Add labelsPOST /rest/api/content/{id}/label
Adds a list of labels to the specified content.
The body is the json representation of the list.
Request
Example
[{"prefix":"global","name":"label1"},{"prefix":"global","name":"label2"}]
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 label with query paramDELETE /rest/api/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
Delete labelDELETE /rest/api/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
api/content/{id}/property
Find allGET /rest/api/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/json
Example
{"results":[{"content":{"id":"1234","type":"page","status":"current","ancestors":[],"operations":[],"children":{},"descendants":{},"body":{},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/1234"}},"key":"example-property-key","value":{"anything":"goes"},"version":{"number":2,"minorEdit":false,"hidden":false},"_links":{"self":"http://example.com/confluence/rest/api/content/1234/property/example-property-key"}}],"size":1,"_links":{"base":"http://example.com/confluence/","context":"/confluence"}}
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}},"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"}]},"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/api/content/{id}/property
Creates a new content property.
Request
Example
{"key":"example-property-key","value":{"anything":"goes"}}
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}},"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"}]},"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
Example
{"content":{"id":"1234","type":"page","status":"current","ancestors":[],"operations":[],"children":{},"descendants":{},"body":{},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/1234"}},"key":"example-property-key","value":{"anything":"goes"},"version":{"number":2,"minorEdit":false,"hidden":false},"_links":{"base":"http://example.com/confluence/","context":"/confluence","self":"http://example.com/confluence/rest/api/content/1234/property/example-property-key"}}
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}},"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"}]},"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/api/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/json
Example
{"content":{"id":"1234","type":"page","status":"current","ancestors":[],"operations":[],"children":{},"descendants":{},"body":{},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/1234"}},"key":"example-property-key","value":{"anything":"goes"},"version":{"number":2,"minorEdit":false,"hidden":false},"_links":{"base":"http://example.com/confluence/","context":"/confluence","self":"http://example.com/confluence/rest/api/content/1234/property/example-property-key"}}
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}},"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"}]},"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/api/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
Example
{"key":"example-property-key","value":{"anything":"goes"},"version":{"number":2,"minorEdit":false,"hidden":false}}
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}},"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"}]},"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
Example
{"content":{"id":"1234","type":"page","status":"current","ancestors":[],"operations":[],"children":{},"descendants":{},"body":{},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/1234"}},"key":"example-property-key","value":{"anything":"goes"},"version":{"number":2,"minorEdit":false,"hidden":false},"_links":{"base":"http://example.com/confluence/","context":"/confluence","self":"http://example.com/confluence/rest/api/content/1234/property/example-property-key"}}
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}},"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"}]},"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/api/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/api/content/{id}/property/{key}
Creates a new content property.
Request
Example
{"key":"example-property-key","value":{"anything":"goes"}}
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}},"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"}]},"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
Example
{"content":{"id":"1234","type":"page","status":"current","ancestors":[],"operations":[],"children":{},"descendants":{},"body":{},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/1234"}},"key":"example-property-key","value":{"anything":"goes"},"version":{"number":2,"minorEdit":false,"hidden":false},"_links":{"base":"http://example.com/confluence/","context":"/confluence","self":"http://example.com/confluence/rest/api/content/1234/property/example-property-key"}}
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}},"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"}]},"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
api/content/{id}/restriction
By operationGET /rest/api/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}},"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"}]},"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/api/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}},"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"}]},"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
api/content/blueprint
Publish legacy draftPOST /rest/api/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 |
|
expand |
string Default: body.storage,history,space,version,ancestors |
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"}]},"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}},"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/api/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 |
|
expand |
string Default: body.storage,history,space,version,ancestors |
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"}]},"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}},"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
api/contentbody/convert/{to}
Used for converting ContentBody objects from one format to another.
ConvertPOST /rest/api/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: |
Example
{"value":"<p>Some example body in storage format</p>","representation":"storage"}
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}},"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"}]},"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
Example
{"value":"<p>Some example body in storage format</p>","representation":"storage","_links":{"base":"http://example.com/confluence/","context":"/confluence"},"_expandable":{"content":"/rest/api/content/3604482"}}
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}},"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"}]},"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
api/group
Non-admin operations for user groups
Get groupsGET /rest/api/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/json
Example
{"results":[{"type":"group","name":"somegroup"},{"type":"group","name":"anothergroup"}],"size":2}
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/api/group/{groupName}
Get the user group with the group name
Request
query parameters
parameter | type | description |
---|---|---|
expand |
string |
Responses
-
- Status
200 - application/json
Example
{"type":"group","name":"somegroup","_links":{"base":"http://example.com/confluence/","context":"/confluence","self":"http://example.com/confluence/rest/api/group/somegroup"}}
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/api/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/json
Example
{"results":[{"type":"known","profilePicture":{"path":"/wiki/relative/avatar.png","width":48,"height":48,"isDefault":true},"username":"jsmith","displayName":"Joe Smith","userKey":"402880824ff933a4014ff9345d7c0002","status":null}],"size":1}
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
api/longtask
REST wrapper for the LongTaskService.
Get tasksGET /rest/api/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"},"translation":{"type":"string"}},"additionalProperties":false}}}
- Status
200 - application/json
Get taskGET /rest/api/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"},"translation":{"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
api/search
SearchGET /rest/api/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/json
Example
{"results":[{"space":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"title":"Example space","excerpt":"Example space","url":"/display/space/TST","entityType":"space","iconCssClass":"space-css-class","lastModified":"2018-12-03T00:19:42.775Z","timestamp":1543796382775},{"content":{"id":"1234","type":"page","status":"current","title":"Example Content title","space":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"version":{"by":{"type":"known","username":"username","userKey":"","displayName":"Full Name","_expandable":{"status":""}},"when":"2018-12-03T00:19:42.774Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false},"ancestors":[{"id":"123","type":"page","status":"current","ancestors":[],"operations":[],"children":{},"descendants":{},"body":{},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/123"}}],"operations":[],"children":{},"descendants":{},"container":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"body":{"view":{"value":"<p><h1>Example</h1>Some example content body</p>","representation":"view","_expandable":{"content":"/rest/api/content/1234"}}},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/1234"}},"title":"Example Content title","excerpt":"<p><h1>Example</h1>Some example content body</p>","url":"/display/Example Content title","resultGlobalContainer":{"title":"Example space","displayUrl":"/display/space/TST"},"entityType":"content","iconCssClass":"page-css-class","lastModified":"2018-12-03T00:19:42.776Z","timestamp":1543796382776},{"user":{"type":"known","username":"euser","userKey":"A123EDCE","profilePicture":{"path":"/some/download/url","width":48,"height":48,"isDefault":false},"displayName":"Example User","_links":{"self":"http://example.com/confluence/rest/api/user?key=A123EDCE"},"_expandable":{"status":""}},"title":"Example User","url":"/display/user/euser","entityType":"user","iconCssClass":"user-css-class","lastModified":"2018-12-03T00:19:42.776Z","timestamp":1543796382776}],"start":0,"limit":3,"size":3,"totalSize":15,"cqlQuery":"title ~ example","searchDuration":50,"_links":{"base":"http://example.com/confluence/","context":"/confluence"}}
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
api/space
REST wrapper for the SpaceService.
SpacesGET /rest/api/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 |
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"}]},"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}},"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/api/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
Example
{"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{}}
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}},"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}},"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"}]},"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/json
Example
{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"collection":"/rest/api/space","base":"http://example.com/confluence/","context":"/confluence","self":"http://example.com/confluence/rest/api/space/TST"}}
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}},"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}},"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"}]},"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/api/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
Example
{"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{}}
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}},"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}},"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"}]},"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/json
Example
{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"collection":"/rest/api/space","base":"http://example.com/confluence/","context":"/confluence","self":"http://example.com/confluence/rest/api/space/TST"}}
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}},"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}},"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"}]},"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/api/space/{spaceKey}
Updates a Space.
Currently only the Space name, description and homepage can be updated.
Request
Example
{"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{}}
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}},"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}},"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"}]},"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/json
Example
{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"collection":"/rest/api/space","base":"http://example.com/confluence/","context":"/confluence","self":"http://example.com/confluence/rest/api/space/TST"}}
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}},"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}},"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"}]},"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/api/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/api/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}},"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}},"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"}]},"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/api/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/json
Example
{"id":"1234","type":"page","status":"current","title":"Example Content title","space":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"version":{"by":{"type":"known","username":"username","userKey":"","displayName":"Full Name","_expandable":{"status":""}},"when":"2018-12-03T00:19:42.604Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false},"ancestors":[{"id":"123","type":"page","status":"current","ancestors":[],"operations":[],"children":{},"descendants":{},"body":{},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/123"}}],"operations":[],"children":{},"descendants":{},"container":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"body":{"view":{"value":"<p><h1>Example</h1>Some example content body</p>","representation":"view","_expandable":{"content":"/rest/api/content/1234"}}},"metadata":{},"restrictions":{},"_links":{"collection":"/rest/api/content","base":"http://example.com/confluence/","context":"/confluence","self":"http://example.com/confluence/rest/api/content/1234"}}
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}},"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"}]},"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/api/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/json
Example
{"id":"1234","type":"page","status":"current","title":"Example Content title","space":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"version":{"by":{"type":"known","username":"username","userKey":"","displayName":"Full Name","_expandable":{"status":""}},"when":"2018-12-03T00:19:42.604Z","message":"change message for this edit","number":2,"minorEdit":false,"hidden":false},"ancestors":[{"id":"123","type":"page","status":"current","ancestors":[],"operations":[],"children":{},"descendants":{},"body":{},"metadata":{},"restrictions":{},"_links":{"self":"http://example.com/confluence/rest/api/content/123"}}],"operations":[],"children":{},"descendants":{},"container":{"id":11,"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"body":{"view":{"value":"<p><h1>Example</h1>Some example content body</p>","representation":"view","_expandable":{"content":"/rest/api/content/1234"}}},"metadata":{},"restrictions":{},"_links":{"collection":"/rest/api/content","base":"http://example.com/confluence/","context":"/confluence","self":"http://example.com/confluence/rest/api/content/1234"}}
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}},"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"}]},"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
api/space/{spaceKey}/property
GetGET /rest/api/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/json
Example
{"results":[{"space":{"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"key":"example-property-key","value":{"anything":"goes"},"version":{"number":2,"minorEdit":false,"hidden":false}}],"size":1,"_links":{"base":"http://example.com/confluence/","context":"/confluence"}}
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"}]},"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}},"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/api/space/{spaceKey}/property
Creates a new space property.
Request
Example
{"key":"example-property-key","value":{"anything":"goes"}}
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"}]},"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}},"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
Example
{"space":{"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"key":"example-property-key","value":{"anything":"goes"},"version":{"number":2,"minorEdit":false,"hidden":false},"_links":{"base":"http://example.com/confluence/","context":"/confluence"}}
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"}]},"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}},"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/api/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/json
Example
{"results":[{"space":{"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"key":"example-property-key","value":{"anything":"goes"},"version":{"number":2,"minorEdit":false,"hidden":false}}],"size":1,"_links":{"base":"http://example.com/confluence/","context":"/confluence"}}
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"}]},"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}},"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/api/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
Example
{"key":"example-property-key","value":{"anything":"goes"},"version":{"number":2,"minorEdit":false,"hidden":false}}
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"}]},"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}},"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
Example
{"space":{"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"key":"example-property-key","value":{"anything":"goes"},"version":{"number":2,"minorEdit":false,"hidden":false},"_links":{"base":"http://example.com/confluence/","context":"/confluence"}}
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"}]},"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}},"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/api/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/api/space/{spaceKey}/property/{key}
Creates a new space property.
Request
Example
{"key":"example-property-key","value":{"anything":"goes"}}
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"}]},"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}},"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
Example
{"space":{"key":"TST","name":"Example space","description":{"plain":{"value":"This is an example space","representation":"plain"}},"metadata":{},"_links":{"self":"http://example.com/confluence/rest/api/space/TST"}},"key":"example-property-key","value":{"anything":"goes"},"version":{"number":2,"minorEdit":false,"hidden":false},"_links":{"base":"http://example.com/confluence/","context":"/confluence"}}
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"}]},"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}},"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
api/user
Non-admin user operations
Get userGET /rest/api/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/json
Example
{"type":"known","username":"jsmith","userKey":"402880824ff933a4014ff9345d7c0002","profilePicture":{"path":"/wiki/relative/avatar.png","width":48,"height":48,"isDefault":true},"displayName":"Joe Smith","_links":{"base":"http://example.com/confluence/","context":"/confluence","self":"http://example.com/confluence/rest/api/user?key=402880824ff933a4014ff9345d7c0002"},"_expandable":{"status":""}}
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/api/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/json
Example
{"type":"anonymous","profilePicture":{"path":"/wiki/relative/avatar.png","width":48,"height":48,"isDefault":true},"displayName":"Anonymous"}
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/api/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/json
Example
{"type":"known","username":"jsmith","userKey":"402880824ff933a4014ff9345d7c0002","profilePicture":{"path":"/wiki/relative/avatar.png","width":48,"height":48,"isDefault":true},"displayName":"Joe Smith","_links":{"base":"http://example.com/confluence/","context":"/confluence","self":"http://example.com/confluence/rest/api/user?key=402880824ff933a4014ff9345d7c0002"},"_expandable":{"status":""}}
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/api/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/json
Example
{"results":[{"type":"group","name":"somegroup"},{"type":"group","name":"anothergroup"}],"size":2}
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
api/user/watch
Add content watcherPOST /rest/api/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}},"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"}]},"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/api/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/api/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/json
Example
{"watching":true}
- 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
Add space watchPOST /rest/api/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"}]},"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}},"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/api/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
Is watching spaceGET /rest/api/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/json
Example
{"watching":true}
- 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