• Admin Key
  • Attachment
  • Ancestors
  • Blog Post
  • Children
  • Classification Level
  • Comment
  • Content
  • Content Properties
  • Custom Content
  • Database
  • Data Policies
  • Descendants
  • Folder
  • Label
  • Like
  • Operation
  • Page
  • Space
  • Space Permissions
  • Space Properties
  • Space Roles
  • Task
  • User
  • Version
  • Whiteboard
Cloud
Confluence Cloud / Reference / REST API v2

Admin Key

Postman Collection
OpenAPI
GET

Get Admin Key

Returns information about the admin key if one is currently enabled for the calling user within the site.

Permissions required: User must be an organization or site admin.

Scopes

Connect apps cannot access this REST resource.

Request

This request has no parameters.

Responses

Returned if an admin key is currently enabled for the calling user.

application/json

AdminKeyResponse
GET/admin-key
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ // // This API resource doesn't support Oauth2 (3LO). See alternate authorization methods: // https://developer.atlassian.com/cloud/confluence/rest/#auth import api, { route } from "@forge/api"; const response = await api.requestConfluence(route`/wiki/api/v2/admin-key`, { headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 { "accountId": "<string>", "expirationTime": "<string>" }
POST

Enable Admin Key

Enables admin key access for the calling user within the site. If an admin key already exists for the user, a new one will be issued with an updated expiration time.

Note: The durationInMinutes field within the request body is optional. If the request body is empty or if the durationInMinutes is set to 0 minutes, a new admin key will be issued to the calling user with a default duration of 10 minutes.

Permissions required: User must be an organization or site admin.

Scopes

Connect apps cannot access this REST resource.

Request

Request bodyapplication/json

durationInMinutes

integer

Responses

Returned if a new admin key is successfully issued for the calling user.

application/json

AdminKeyResponse
POST/admin-key
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ // // This API resource doesn't support Oauth2 (3LO). See alternate authorization methods: // https://developer.atlassian.com/cloud/confluence/rest/#auth import api, { route } from "@forge/api"; var bodyData = `{ "durationInMinutes": 145 }`; const response = await api.requestConfluence(route`/wiki/api/v2/admin-key`, { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: bodyData }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 { "accountId": "<string>", "expirationTime": "<string>" }
DEL

Disable Admin Key

Disables admin key access for the calling user within the site.

Permissions required: User must be an organization or site admin.

Scopes

Connect apps cannot access this REST resource.

Request

This request has no parameters.

Responses

Returned if admin key access was successfully disabled for the calling user or if the user did not have an admin key in the first place.

DEL/admin-key
1 2 3 4 5 6 7 8 9 10 11 12 13 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ // // This API resource doesn't support Oauth2 (3LO). See alternate authorization methods: // https://developer.atlassian.com/cloud/confluence/rest/#auth import api, { route } from "@forge/api"; const response = await api.requestConfluence(route`/wiki/api/v2/admin-key`, { method: 'DELETE' }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.text());

Rate this page: