openapi: 3.2.0 info: title: Confluence Cloud REST API v2 Space Properties API description: This document describes Confluence's v2 APIs. This is intended to be an iteration on the existing Confluence Cloud REST API with improvements in both endpoint definitions and performance. termsOfService: https://developer.atlassian.com/platform/marketplace/atlassian-developer-terms/ version: 2.0.0 servers: - url: https://{your-domain}/wiki/api/v2 variables: your-domain: default: no-default description: Specific domain of the Confluence site being used. Must be provided. tags: - name: Space Properties description: '' paths: /spaces/{space-id}/properties: get: tags: - Space Properties operationId: getSpaceProperties summary: Get space properties in space description: 'Returns all properties for the given space. Space properties are a key-value storage associated with a space. The limit parameter specifies the maximum number of results returned in a single response. Use the `link` response header to paginate through additional results. **Permissions required**: Permission to access the Confluence site (''Can use'' global permission) and ''View'' permission for the space.' parameters: - name: space-id in: path required: true description: The ID of the space for which space properties should be returned. schema: format: int64 type: integer - name: key in: query required: false description: The key of the space property to retrieve. This should be used when a user knows the key of their property, but needs to retrieve the id for use in other methods. schema: type: string - name: cursor in: query required: false description: Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the relative URL in the `Link` header to retrieve the `next` set of results. schema: type: string - name: limit in: query description: Maximum number of pages per result to return. If more results exist, use the `Link` header to retrieve a relative URL that will return the next set of results. schema: format: int32 default: 25 minimum: 1 maximum: 250 type: integer responses: '200': description: Returned if the requested space properties are returned. `results` may be empty if no results were found. content: application/json: schema: title: MultiEntityResult type: object properties: results: type: array items: $ref: '#/components/schemas/SpaceProperty' _links: $ref: '#/components/schemas/MultiEntityLinks' headers: Link: schema: type: string description: 'This header contains URL(s) within angle brackets and a relation description for each URL, describing how the provided URL relates to the incoming request''s URL. For example, rel="next" would be the URL necessary to get the next page of information. Example response header format: `Link: /properties?cursor=>; rel="next", ; rel="base"` ' '400': description: Returned if an invalid request is provided. content: {} '401': description: 'Returned if the authentication credentials are incorrect or missing from the request.' content: {} '404': description: 'Returned if the calling user does not have permission to view the specified space or the space was not found.' content: {} security: - basicAuth: [] - oAuthDefinitions: - read:space:confluence x-atlassian-oauth2-scopes: - scheme: oAuthDefinitions state: Current scopes: - read:space:confluence x-atlassian-connect-scope: READ x-atlassian-data-security-policy: - app-access-rule-exempt: true post: tags: - Space Properties operationId: createSpaceProperty summary: Create space property in space description: 'Creates a new space property. **Permissions required**: Permission to access the Confluence site (''Can use'' global permission) and ''Admin'' permission for the space.' parameters: - name: space-id in: path required: true description: The ID of the space for which space properties should be returned. schema: format: int64 type: integer requestBody: description: The space property to be created content: application/json: schema: $ref: '#/components/schemas/SpacePropertyCreateRequest' required: true responses: '201': description: Returned if the space property was created successfully. content: application/json: schema: $ref: '#/components/schemas/SpaceProperty' headers: location: schema: type: string description: 'Returns the URL at which the space property is retrievable. ' '400': description: Returned if an invalid request is provided. content: {} '401': description: 'Returned if the authentication credentials are incorrect or missing from the request.' content: {} '404': description: 'Returned if the calling user does not have permission to view the specified space or the space was not found.' content: {} security: - basicAuth: [] - oAuthDefinitions: - read:space:confluence - write:space:confluence x-atlassian-oauth2-scopes: - scheme: oAuthDefinitions state: Current scopes: - read:space:confluence - write:space:confluence x-atlassian-connect-scope: WRITE x-atlassian-data-security-policy: - app-access-rule-exempt: true /spaces/{space-id}/properties/{property-id}: get: tags: - Space Properties operationId: getSpacePropertyById summary: Get space property by id description: 'Retrieve a space property by its id. **Permissions required**: Permission to access the Confluence site (''Can use'' global permission) and ''View'' permission for the space.' parameters: - name: space-id in: path required: true description: The ID of the space the property belongs to. schema: format: int64 type: integer - name: property-id in: path required: true description: The ID of the property to be retrieved. schema: format: int64 type: integer responses: '200': description: Returned if the space property was retrieved. content: application/json: schema: $ref: '#/components/schemas/SpaceProperty' '400': description: Returned if an invalid request is provided. content: {} '401': description: 'Returned if the authentication credentials are incorrect or missing from the request.' content: {} '404': description: 'Returned if the calling user does not have permission to view the specified space or the space was not found.' content: {} security: - basicAuth: [] - oAuthDefinitions: - read:space:confluence x-atlassian-oauth2-scopes: - scheme: oAuthDefinitions state: Current scopes: - read:space:confluence x-atlassian-connect-scope: READ x-atlassian-data-security-policy: - app-access-rule-exempt: true put: tags: - Space Properties operationId: updateSpacePropertyById summary: Update space property by id description: 'Update a space property by its id. **Permissions required**: Permission to access the Confluence site (''Can use'' global permission) and ''Admin'' permission for the space.' parameters: - name: space-id in: path required: true description: The ID of the space the property belongs to. schema: format: int64 type: integer - name: property-id in: path required: true description: The ID of the property to be updated. schema: format: int64 type: integer requestBody: description: The space property to be updated. content: application/json: schema: $ref: '#/components/schemas/SpacePropertyUpdateRequest' required: true responses: '200': description: Returned if the space property was updated successfully. content: application/json: schema: $ref: '#/components/schemas/SpaceProperty' headers: location: schema: type: string description: 'Returns the URL at which the space property is retrievable. ' '400': description: Returned if an invalid request is provided. content: {} '401': description: 'Returned if the authentication credentials are incorrect or missing from the request.' content: {} '404': description: 'Returned if the calling user does not have permission to view the specified space or the space was not found.' content: {} security: - basicAuth: [] - oAuthDefinitions: - read:space:confluence - write:space:confluence x-atlassian-oauth2-scopes: - scheme: oAuthDefinitions state: Current scopes: - read:space:confluence - write:space:confluence x-atlassian-connect-scope: WRITE x-atlassian-data-security-policy: - app-access-rule-exempt: true delete: tags: - Space Properties operationId: deleteSpacePropertyById summary: Delete space property by id description: 'Deletes a space property by its id. **Permissions required**: Permission to access the Confluence site (''Can use'' global permission) and ''Admin'' permission for the space.' parameters: - name: space-id in: path required: true description: The ID of the space the property belongs to. schema: format: int64 type: integer - name: property-id in: path required: true description: The ID of the property to be deleted. schema: format: int64 type: integer responses: '204': description: Returned if the space property was deleted successfully. '400': description: Returned if an invalid request is provided. content: {} '401': description: 'Returned if the authentication credentials are incorrect or missing from the request.' content: {} '404': description: 'Returned if the calling user does not have permission to view the specified space or the space was not found.' content: {} security: - basicAuth: [] - oAuthDefinitions: - read:space:confluence - write:space:confluence x-atlassian-oauth2-scopes: - scheme: oAuthDefinitions state: Current scopes: - read:space:confluence - write:space:confluence x-atlassian-connect-scope: WRITE x-atlassian-data-security-policy: - app-access-rule-exempt: true components: schemas: SpacePropertyCreateRequest: type: object properties: key: type: string description: Key of the space property value: description: Value of the space property. MultiEntityLinks: type: object properties: next: type: string description: 'Used for pagination. Contains the relative URL for the next set of results, using a cursor query parameter. This property will not be present if there is no additional data available.' base: type: string description: Base url of the Confluence site. SpaceProperty: type: object properties: id: type: string description: ID of the space property. key: type: string description: Key of the space property. value: description: Value of the space property. createdAt: type: string format: date-time description: RFC3339 compliant date time at which the property was created. createdBy: type: string description: Atlassian account ID of the user that created the space property. version: type: object properties: createdAt: type: string format: date-time description: RFC3339 compliant date time at which the property's current version was created. createdBy: type: string description: Atlassian account ID of the user that created the space property's current version. message: type: string description: Message associated with the current version. number: type: integer format: int32 description: The space property's current version number. SpacePropertyUpdateRequest: type: object properties: key: type: string description: Key of the space property value: description: Value of the space property. version: type: object description: New version number and associated message properties: number: type: integer format: int32 description: Version number of the new version. Should be 1 more than the current version number. message: type: string description: Message to be associated with the new version. securitySchemes: basicAuth: type: http description: You can access this resource via basic auth. scheme: basic oAuthDefinitions: type: oauth2 description: This API uses OAuth 2 with the authorizationCode grant flow. flows: authorizationCode: authorizationUrl: https://auth.atlassian.com/authorize tokenUrl: https://auth.atlassian.com/oauth/token scopes: read:page:confluence: View pages and blogposts and their properties. read:space:confluence: View spaces and their properties. read:attachment:confluence: View attachments and their properties. read:comment:confluence: View comments and their properties. read:custom-content:confluence: View custom content and their properties. read:task:confluence: View tasks. read:whiteboard:confluence: View whiteboards and their properties. read:database:confluence: View databases and their properties. read:embed:confluence: View Smart Links in the content tree and their properties. read:folder:confluence: View folders and their properties. read:hierarchical-content:confluence: View children and descendants in the content tree. write:space:confluence: Create and update spaces and their properties. write:page:confluence: Create and update pages and blog posts and their properties. write:comment:confluence: Create and update comments and their properties. write:custom-content:confluence: Create and update custom content and their properties. write:whiteboard:confluence: Create and update whiteboards and their properties. write:database:confluence: Create and update databases and their properties. write:embed:confluence: Create and update Smart Links in the content tree and their properties. write:folder:confluence: Create and update folders and their properties. write:app-data:confluence: Create, update and delete app properties. delete:custom-content:confluence: Delete custom content. delete:page:confluence: Delete pages and blog posts. delete:comment:confluence: Delete comments. delete:whiteboard:confluence: Delete whiteboards. delete:database:confluence: Delete databases. delete:embed:confluence: Delete Smart Links in the content tree. delete:folder:confluence: Delete folders. externalDocs: description: The online and complete version of the Confluence Cloud REST API docs. url: https://developer.atlassian.com/cloud/confluence/rest/v2 x-atlassian-narrative: documents: - title: About anchor: about body: This is the reference for the Confluence Cloud REST API v2, with definitions and performance intended to be an improvement over v1. You can click on the meatball menu in the upper right to download the spec or Postman collection. - title: Authentication and authorization anchor: auth body: '**Authentication:** If you are building a Cloud app, authentication is implemented via JWT or Oauth 2.0, depending on what you''re building (see [Authentication for apps](https://developer.atlassian.com/cloud/confluence/authentication-for-apps/)). Otherwise, if you are authenticating directly against the REST API, the REST API supports basic auth (see [Basic auth for REST APIs](https://developer.atlassian.com/cloud/confluence/basic-auth-for-rest-apis/)). **Authorization:** If you are building a Cloud app, authorization can be implemented by [scopes](https://developer.atlassian.com/cloud/confluence/scopes/) or by [OAuth 2.0 user impersonation](https://developer.atlassian.com/cloud/confluence/oauth-2-jwt-bearer-tokens-for-apps). Otherwise, if you are making calls directly against the REST API, authorization is based on the user used in the authentication process. See [Security overview](https://developer.atlassian.com/cloud/confluence/security-overview/) for more details on authentication and authorization.' - title: Using the REST API anchor: using body: "**Pagination:** The Confluence REST API v2 uses cursor-based pagination: a method that returns a response with multiple objects can only return a limited number at one time. This limits the size of responses and conserves server resources.\n\nUse the 'limit' and 'cursor' parameters on endpoints that return multiple objects to work with pagination. First, make a request with your desired limit in the 'limit' parameter, then observe the `Link` header in the response. If there are additional entities to be retrieved, the `next` URL in the `Link` header will allow you to retrieve the next set of results. This relative URL will also be available under the `_links.next` property of paginated responses. \n\nFor example, the following request will return 5 page objects (if there are 5 present in the target site).\n```\nGET /wiki/api/v2/pages?limit=5\n```\n\nIf there are additional pages available, the `Link` header will look like:\n```\n>; rel=\"next\"\n```\nThe URL within the `Link` header will allow you to access the next 5 pages, while the `rel=\"next\"` denotes that the URL refers to the \"next\" set of pages. Relations for a single URL are separated by semicolons (;) and URLs are separated by commas (,)\nIf there are no related URLs, the `Link` header will not be present in the response and neither will the `next` property for `_links` in the response body."