Confluence Cloud Developer

Confluence Cloud Developer

Rate this page:

Users

Get user

GET /wiki/rest/api/user

Returns a user. This includes information about the user, such as the display name, account ID, profile picture, and more. The information returned may be restricted by the user's profile visibility settings.

Note: to add, edit, or delete users in your organization, see the user management REST API.

Permissions required: Permission to access the Confluence site ('Can use' global permission).

App scope requiredREAD

Request

Query parameters
key

string

This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

username

string

This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

accountId Required

string

The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.

expand

Array<string>

A multi-value parameter indicating which properties of the user to expand.

  • operations returns the operations that the user is allowed to do.
  • details.personal returns the 'Personal' details in the user's profile, like the 'Email' and 'Phone'. Note that these fields have been deprecated due to privacy changes. See the migration guide for details.
  • details.business returns the 'Company' details in the user's profile, like the 'Position' and 'Department'. Note that these fields have been deprecated due to privacy changes. See the migration guide for details.
  • personalSpace returns the user's personal space, if it exists.
Style: form

Valid values: operations, details.personal, details.business, personalSpace

Example

1
2
3
curl --request GET \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/user?accountId={accountId}' \
  --header 'Accept: application/json'

Responses

Returned if the requested user is returned.

Content typeValue
application/json

User

Get anonymous user

GET /wiki/rest/api/user/anonymous

Returns information about how anonymous users are represented, like the profile picture and display name.

Permissions required: Permission to access the Confluence site ('Can use' global permission).

App scope requiredREAD

Request

Query parameters
expand

Array<string>

A multi-value parameter indicating which properties of the user to expand.

  • operations returns the operations that the user is allowed to do.
Style: form

Valid values: operations

Example

1
2
3
curl --request GET \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/user/anonymous' \
  --header 'Accept: application/json'

Responses

Returned if the anonymous user representation is returned.

Content typeValue
application/json

UserAnonymous

Get current user

GET /wiki/rest/api/user/current

Returns the currently logged-in user. This includes information about the user, like the display name, userKey, account ID, profile picture, and more.

Permissions required: Permission to access the Confluence site ('Can use' global permission).

App scope requiredREAD

Request

Query parameters
expand

Array<string>

A multi-value parameter indicating which properties of the user to expand.

  • operations returns the operations that the user is allowed to do.
  • details.personal returns the 'Personal' details in the user's profile, like the 'Email' and 'Phone'. Note that these fields have been deprecated due to privacy changes. See the migration guide for details.
  • details.business returns the 'Company' details in the user's profile, like the 'Position' and 'Department'. Note that these fields have been deprecated due to privacy changes. See the migration guide for details.
  • personalSpace returns the user's personal space, if it exists.
Style: form

Valid values: operations, details.personal, details.business, personalSpace

Example

1
2
3
curl --request GET \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/user/current' \
  --header 'Accept: application/json'

Responses

Returned if the current user is returned.

Content typeValue
application/json

User

Get group memberships for user

GET /wiki/rest/api/user/memberof

Returns the groups that a user is a member of.

Permissions required: Permission to access the Confluence site ('Can use' global permission).

App scope requiredREAD

Request

Query parameters
key

string

This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

username

string

This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

accountId Required

string

The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.

start

integer

The starting index of the returned groups.

Default: 0, Minimum: 0, Format: int32
limit

integer

The maximum number of groups to return per page. Note, this may be restricted by fixed system limits.

Default: 200, Minimum: 0, Format: int32

Example

1
2
3
curl --request GET \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/user/memberof?accountId={accountId}' \
  --header 'Accept: application/json'

Responses

Returned if the requested groups are returned.

Content typeValue
application/json

GroupArray

Get multiple users using ids

GET /wiki/rest/api/user/bulk

Returns user details for the ids provided in request.

Permissions required: Permission to access the Confluence site ('Can use' global permission).

Apps cannot access this REST resource.

Request

Query parameters
accountId Required

string

A list of accountId's of users to be returned.

expand

Array<string>

A multi-value parameter indicating which properties of the user to expand.

  • operations returns the operations that the user is allowed to do.
  • details.personal returns the 'Personal' details in the user's profile, like the 'Email' and 'Phone'. Note that these fields have been deprecated due to privacy changes. See the migration guide for details.
  • details.business returns the 'Company' details in the user's profile, like the 'Position' and 'Department'. Note that these fields have been deprecated due to privacy changes. See the migration guide for details.
  • personalSpace returns the user's personal space, if it exists.
Style: form

Valid values: operations, details.personal, details.business, personalSpace

limit

integer

The maximum number of results returned. Currently API returns 200 results max. If more that 200 ids are passed first 200 will be returned.

Minimum: 1, Maximum: 200, Format: int32

Example

1
2
3
curl --request GET \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/user/bulk?accountId={accountId}' \
  --header 'Accept: application/json'

Responses

Returned if, the list of users is returned.

Content typeValue
application/json

BulkUserLookupArray

Get user email address

GET /wiki/rest/api/user/email

Returns a user's email address. This API is only available to apps approved by Atlassian, according to these guidelines.

Permissions required: Permission to access the Confluence site ('Can use' global permission).

App scope requiredACCESS_EMAIL_ADDRESSES

Request

Query parameters
accountId Required

string

The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192. Required.

Example

1
2
3
curl --request GET \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/user/email?accountId={accountId}' \
  --header 'Accept: application/json'

Responses

Returned if the requested user's email is returned.

Content typeValue
application/json

AccountIdEmailRecord

Get user email addresses in batch

GET /wiki/rest/api/user/email/bulk

Returns user email addresses for a set of accountIds. This API is only available to apps approved by Atlassian, according to these guidelines.

Any accounts which are not available will not be included in the result.

Permissions required: Permission to access the Confluence site ('Can use' global permission).

App scope requiredACCESS_EMAIL_ADDRESSES

Request

Query parameters
accountId Required

Array<string>

The account IDs of the users.

Example

1
2
3
curl --request GET \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/user/email/bulk?accountId={accountId}' \
  --header 'Accept: application/json'

Responses

Returned if the request is successful.

Content typeValue
application/json

Array<AccountIdEmailRecord>

Get user accountIds

GET /wiki/rest/api/user/bulk/migration

Returns the accountIds for the users specified in the key or username parameters. Note that multiple key and username parameters can be specified.

Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).

App scope requiredREAD

Request

Query parameters
key Required

Array<string>

The key of a user. To specify multiple users, pass multiple key parameters separated by ampersands. For example, key=mia&key=alana. Required if username isn't provided. Cannot be provided if username is present.

username

Array<string>

The username of a user. To specify multiple users, pass multiple username parameters separated by ampersands. For example, username=mia&username=alana. Required if key isn't provided. Cannot be provided if key is present.

start

integer

The index of the first item to return in a page of results (page offset).

Default: 0, Minimum: 0, Format: int32
limit

integer

The maximum number of results to return per page. Note, this may be restricted by fixed system limits.

Default: 200, Minimum: 0, Format: int32

Example

1
2
3
curl --request GET \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/user/bulk/migration?key={key}' \
  --header 'Accept: application/json'

Responses

Returned if the request is successful.

Content typeValue
application/json

MigratedUserArray

Rate this page: