This prototype REST API is deprecated since Confluence 5.5.
Confluence has a new REST API that is progressively replacing our existing APIs, including this prototype REST API. We recommend plugin developers use the new REST APIs where possible.
The content on this page refers to the old prototype REST API only.
You can authenticate yourself for the REST APIs in two ways:
Basic username:password
'. Please note however, username:password
must be base64 encoded. The URL must also contain the 'os_authType=basic
' query parameter.URIs for a Confluence REST API resource have the following structure:
With context:
1 2http://host:port/context/rest/api-name/api-version/resource-name
Or without context:
1 2http://host:port/rest/api-name/api-version/resource-name
NOTE: In Confluence 3.1 and Confluence 3.2, the only available api-name
is prototype
.
Examples:
With context:
1 2http://myhost.com:8080/confluence/rest/prototype/1/space/ds http://localhost:8080/confluence/rest/prototype/latest/space/ds
Or without context:
1 2http://confluence.myhost.com:8095/rest/prototype/1/space/ds http://confluence.myhost.com:8095/rest/prototype/latest/space/ds
Here is an explanation for each part of the URI:
host
and port
define the host and port where the Confluence application lives.context
is the servlet context of the Confluence installation. For example, the context might be confluence
. Omit this section if your URI does not include a context.rest
denotes the REST API.api-name
identifies a specific Confluence API. For example, admin
is the API that allows interaction with the Confluence Administration Console. (This is the path declared in the REST module type in the REST plugin descriptor.)api-version
is the API version number, e.g. 1
or 2
. See the section on API version control.resource-name
identifies the required resource. In some cases, this may be a generic resource name such as /foo
. In other cases, this may include a generic resource name and key. For example, /foo
returns a list of the foo
items and /foo/{key
} returns the full content of the foo
identified by the given key
.The Confluence REST APIs return HTTP responses in one of the following formats:
Response Format | Requested via... |
---|---|
JSON | Requested via one of the following:
|
XML | Requested via one of the following:
|
The Confluence REST APIs are subject to version control. The version number of an API appears in its URI. For example, use this URI structure to request version 1 of the 'admin' API:
1 2http://host:port/context/rest/prototype/1/...
To get the latest version of the API, you can also use the latest
key-word. For example, if versions 1 and 2 of the 'admin' API are available, the following two URIs will point to the same resources:
1 2http://host:port/context/rest/prototype/latest/...
1 2http://host:port/context/rest/prototype/2/...
Notes:
1
or 2
.An error condition will return an HTTP error code as described in the Atlassian REST API design guidelines version 1.
You will use the standard HTTP methods to access Confluence via the REST APIs.
Rate this page: