Confluence Cloud Developer

Confluence Cloud Developer

Rate this page:

Experimental

Convert user identifiers to account IDs in CQL queries

POST /wiki/rest/experimental/cql/pdcleaner

Converts one or more CQL queries with user identifiers (username or user key) to equivalent CQL queries with account IDs.

You may wish to use this operation if your system stores CQL queries and you want to make them GDPR-compliant. For more information about GDPR-related changes, see the migration guide.

Permissions required: None

Apps cannot access this REST resource.

Request

Body parameters

The CQL queries to be converted.

queryStrings Required

Array<string>

A list of queries with user identifiers. Maximum of 100 queries.

Example

1
2
3
4
5
6
7
8
9
curl --request POST \
  --url 'https://your-domain.atlassian.net/wiki/rest/experimental/cql/pdcleaner' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "queryStrings": [
    "type = page and creator != admin and space = DEV"
  ]
}'

Responses

Returned if the request is successful. The CQL queries are returned in the same order that they were passed. Note that if the user in a CQL query cannot be found, a 200 code is still returned but the username or key is converted to an empty string.

Content typeValue
application/json

CQLPersonalDataConvertedQueries

Example response (application/json)

1
2
3
4
5
{
  "queryStrings": [
    "type = page and creator != '847586:5371623a-12b4-1a11-ed01-a53542f02dd1' and space = DEV"
  ]
}

Add new permission to space

Experimental

POST /wiki/rest/api/space/{spaceKey}/permission

Adds new permission to space.

Permissions required: 'Admin' permission for the space.

Apps cannot access this REST resource.

Request

Path parameters
spaceKey Required

string

The key of the space to be queried for its content.

Body parameters

This object represents a single space permission. Permissions consist of at least one operation object with an accompanying subjects object.

The following combinations of operation.key and operation.target values are valid for the operation object:

1
2
3
4
5
'create': 'page', 'blogpost', 'comment', 'attachment'
'read': 'space'
'delete': 'page', 'blogpost', 'comment', 'attachment'
'export': 'space'
'administer': 'space'
id

integer

Format: int64
subject Required

PermissionSubject

The user or group that the permission applies to.

operation Required

object

_links

GenericLinks

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
curl --request POST \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/permission' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": 2154,
  "subject": {
    "type": "user",
    "identifier": "<string>"
  },
  "operation": {
    "key": "administer",
    "target": "page"
  },
  "_links": {}
}'

Responses

Returned if the requested content is returned.

Content typeValue
application/json

SpacePermissionV2

Remove a space permission

Experimental

DELETE /wiki/rest/api/space/{spaceKey}/permission/{id}

Removes a space permission. Note that removing Read Space permission for a user or group will remove all the space permissions for that user or group.

Permissions required: 'Admin' permission for the space.

Apps cannot access this REST resource.

Request

Path parameters
spaceKey Required

string

The key of the space to be queried for its content.

id Required

integer

Id of the permission to be deleted.

Example

1
2
curl --request DELETE \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/permission/{id}'

Responses

Permission successfully removed.

Rate this page: