{"openapi":"3.0.3","info":{"title":"API Access","description":"API Access REST API Collection","contact":{"name":"Matthew Wirtz","email":"mwirtz@atlassian.com","url":"http://go/rebels"},"version":"1.0.0"},"servers":[{"url":"https://api.atlassian.com/admin/api-access/v1","description":"Atlassian API endpoint"}],"tags":[{"name":"API Token","description":"API Token APIs"},{"name":"API Key","description":"API Key APIs"},{"name":"OAuth Client","description":"OAuth Client Management APIs"},{"name":"Service Account","description":"Service Account Lifecycle APIs"},{"name":"experimental","description":"Experimental APIs — may change without notice."},{"name":"public","description":"Public APIs"}],"paths":{"/orgs/{orgId}/api-tokens":{"get":{"tags":["API Token"],"summary":"Get all API tokens in an org","description":"Gets all [user API tokens](/cloud/admin/api-access/rest/intro/#API%20Tokens) in an organization.\n\n#### Scopes\n**[Authorization scopes](/cloud/admin/scopes/) required:** `read:tokens:admin`\n","operationId":"getAllApiTokensByOrgId","x-experimental":false,"parameters":[{"in":"path","name":"orgId","schema":{"type":"string"},"description":"Your organization is identified by a Unique ID. You get your organization ID and organization API key simultaneously.","required":true},{"$ref":"#/components/parameters/ApiTokenUserQuery"},{"$ref":"#/components/parameters/ApiTokenStatus"},{"$ref":"#/components/parameters/CreatedAtSearchType"},{"$ref":"#/components/parameters/CreatedAtUom"},{"$ref":"#/components/parameters/CreatedAtValue"},{"$ref":"#/components/parameters/CreatedAtFrom"},{"$ref":"#/components/parameters/CreatedAtTo"},{"$ref":"#/components/parameters/CreatedAtRangeFrom"},{"$ref":"#/components/parameters/CreatedAtRangeTo"},{"$ref":"#/components/parameters/LastActiveAtSearchType"},{"$ref":"#/components/parameters/LastActiveAtUom"},{"$ref":"#/components/parameters/LastActiveAtValue"},{"$ref":"#/components/parameters/LastActiveAtFrom"},{"$ref":"#/components/parameters/LastActiveAtTo"},{"$ref":"#/components/parameters/LastActiveAtRangeFrom"},{"$ref":"#/components/parameters/LastActiveAtRangeTo"},{"$ref":"#/components/parameters/ApiTokenSort"},{"$ref":"#/components/parameters/ApiTokenPageSize"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Returned if the request is successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiTokenSearchResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"400":{"description":"Returned if request is not in correct format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"403":{"description":"Returned if the user does not have correct permissions to read user API tokens.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}}}},"delete":{"tags":["API Token"],"operationId":"Bulk revoke API Tokens","summary":"Bulk revoke API tokens in an organization","description":"Revokes all managed user API tokens in an organization by orgID.\n#### Scopes\n**[Authorization scopes](/cloud/admin/scopes/) required:** `delete:tokens:admin`\n","parameters":[{"name":"orgId","in":"path","description":"Id of organization revoking the token","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successful operation"},"404":{"description":"Token Not Found in an Organization"}},"x-classifications":{"dataTypeRequest":["None"],"dataTypeResponse":["None"]}}},"/orgs/{orgId}/api-tokens/count":{"get":{"tags":["API Token"],"summary":"Get API token count in an org","description":"Gets count of [user API tokens](/cloud/admin/api-access/rest/intro/#API%20Tokens) in an organization.\n\n#### Scopes\n**[Authorization scopes](/cloud/admin/scopes/) required:** `read:tokens:admin`\n","operationId":"getApiTokenCountByOrgId","x-experimental":false,"parameters":[{"in":"path","name":"orgId","schema":{"type":"string"},"description":"Your organization is identified by a Unique ID. You get your organization ID and organization API key simultaneously.","required":true},{"$ref":"#/components/parameters/ApiTokenUserQuery"},{"$ref":"#/components/parameters/ApiTokenStatus"},{"$ref":"#/components/parameters/CreatedAtSearchType"},{"$ref":"#/components/parameters/CreatedAtUom"},{"$ref":"#/components/parameters/CreatedAtValue"},{"$ref":"#/components/parameters/CreatedAtFrom"},{"$ref":"#/components/parameters/CreatedAtTo"},{"$ref":"#/components/parameters/CreatedAtRangeFrom"},{"$ref":"#/components/parameters/CreatedAtRangeTo"},{"$ref":"#/components/parameters/LastActiveAtSearchType"},{"$ref":"#/components/parameters/LastActiveAtUom"},{"$ref":"#/components/parameters/LastActiveAtValue"},{"$ref":"#/components/parameters/LastActiveAtFrom"},{"$ref":"#/components/parameters/LastActiveAtTo"},{"$ref":"#/components/parameters/LastActiveAtRangeFrom"},{"$ref":"#/components/parameters/LastActiveAtRangeTo"}],"responses":{"200":{"description":"Returned if the request is successful.","content":{"application/json":{"schema":{"type":"integer"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"400":{"description":"Returned if request is not in correct format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"403":{"description":"Returned if the user does not have correct permissions to read user API tokens.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}}}}},"/orgs/{orgId}/service-accounts/count":{"post":{"tags":["API Token"],"summary":"Get service account API token count in an org","description":"Gets count of API tokens for specified service accounts within an organization.\n\n#### Scopes\n**[Authorization scopes](/cloud/admin/scopes/) required:** `read:service-accounts-tokens:admin`\n","operationId":"countServiceAccountApiTokens","x-experimental":false,"parameters":[{"in":"path","name":"orgId","schema":{"type":"string"},"description":"Your organization is identified by a Unique ID. You get your organization ID and organization API key simultaneously.","required":true}],"requestBody":{"description":"List of service account IDs to count API tokens for","required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"string","maxLength":100},"description":"List of service account IDs (max 100 per request)","maxItems":100}}}},"responses":{"200":{"description":"Returned if the request is successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAccountCredentialCountResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"400":{"description":"Returned if request is not in correct format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"403":{"description":"Returned if the user does not have permission to view service account API tokens.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}}}}},"/orgs/{orgId}/service-accounts/{accountId}/api-tokens":{"get":{"tags":["API Token"],"summary":"Get all service account API tokens in an org","description":"Retrieves API tokens for a specific service account within an organization.\n\n#### Scopes\n**[Authorization scopes](/cloud/admin/scopes/) required:** `read:service-accounts-tokens:admin`\n","operationId":"getServiceAccountApiToken","x-experimental":false,"parameters":[{"in":"path","name":"orgId","schema":{"type":"string"},"description":"Your organization is identified by a Unique ID. You get your organization ID and organization API key simultaneously.","required":true},{"in":"path","name":"accountId","schema":{"type":"string"},"description":"ID for the service account whose API tokens you want to retrieve.","required":true},{"in":"query","name":"tokenLabel","schema":{"type":"string","pattern":"^[a-zA-Z0-9\\-_\\.]+$"},"description":"Optional filter to search for tokens by label.","required":false}],"responses":{"200":{"description":"Returned if the request is successful.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiToken"},"description":"List of API tokens for the service account"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"400":{"description":"Returned if request is not in correct format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"403":{"description":"Returned if the user does not have permission to view service account API tokens.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"404":{"description":"Returned if the service account is not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}}}},"delete":{"tags":["API Token"],"summary":"Revoke all API tokens for a service account","description":"Revokes all API tokens for a specific service account within an organization.\n\n#### Scopes\n**[Authorization scopes](/cloud/admin/scopes/) required:** `delete:service-accounts-tokens:admin`\n","operationId":"revokeApiTokens","x-experimental":false,"parameters":[{"in":"path","name":"orgId","schema":{"type":"string"},"description":"Your organization is identified by a Unique ID. You get your organization ID and organization API key simultaneously.","required":true},{"in":"path","name":"accountId","schema":{"type":"string"},"description":"ID for the service account whose API tokens you want to revoke.","required":true}],"responses":{"204":{"description":"Returned if the request is successful.","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"400":{"description":"Returned if request is not in correct format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"403":{"description":"Returned if the user does not have permission to revoke service account API tokens.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"404":{"description":"Returned if the service account is not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}}}}},"/orgs/{orgId}/service-accounts":{"post":{"tags":["Service Account","experimental"],"summary":"Create a service account","description":"Creates a new service account for the specified organization. The service account is created with the given display name and optional description, then invited with the specified permission rules and optional additional group memberships.\n\n#### Scopes\n**[OAuth 2.0 scopes](/cloud/admin/scopes/) required:** `write:service-accounts:admin`\n","operationId":"createServiceAccount","x-experimental":true,"parameters":[{"in":"path","name":"orgId","schema":{"type":"string"},"description":"Your organization is identified by a Unique ID. You get your organization ID and organization API key simultaneously.","required":true}],"requestBody":{"description":"The service account creation request.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateServiceAccountRequest"}}}},"responses":{"201":{"description":"Returned if the service account is successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateServiceAccountResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"400":{"description":"Returned if the request is not in the correct format (e.g. displayName is blank, too short, or too long).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Returned if the user does not have permission to create service accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Service Account","experimental"],"summary":"List service accounts in an org","description":"Retrieves all service accounts for the specified organization.\n\n#### Scopes\n**[OAuth 2.0 scopes](/cloud/admin/scopes/) required:** `read:service-accounts:admin`\n","operationId":"listServiceAccounts","x-experimental":true,"parameters":[{"in":"path","name":"orgId","schema":{"type":"string"},"description":"Your organization is identified by a Unique ID. You get your organization ID and organization API key simultaneously.","required":true}],"responses":{"200":{"description":"Returned if the request is successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAccountListResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"403":{"description":"Returned if the user does not have permission to view service accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Service Account","experimental"],"summary":"Update a service account","description":"Updates a service account's display name and/or description within the specified organization.\n\n#### Scopes\n**[OAuth 2.0 scopes](/cloud/admin/scopes/) required:** `write:service-accounts:admin`\n","operationId":"updateServiceAccount","x-experimental":true,"parameters":[{"in":"path","name":"orgId","schema":{"type":"string"},"description":"Your organization is identified by a Unique ID. You get your organization ID and organization API key simultaneously.","required":true}],"requestBody":{"description":"The service account update request.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateServiceAccountRequest"}}}},"responses":{"200":{"description":"Returned if the service account is successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAccount"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"400":{"description":"Returned if the request is not in the correct format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Returned if the user does not have permission to update service accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Returned if the specified service account is not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/orgs/{orgId}/service-accounts/{serviceAccountId}":{"delete":{"tags":["Service Account","experimental"],"summary":"Delete a service account","description":"Deletes a service account from the specified organization.\n\n#### Scopes\n**[OAuth 2.0 scopes](/cloud/admin/scopes/) required:** `write:service-accounts:admin`\n","operationId":"deleteServiceAccount","x-experimental":true,"parameters":[{"in":"path","name":"orgId","schema":{"type":"string"},"description":"Your organization is identified by a Unique ID. You get your organization ID and organization API key simultaneously.","required":true},{"in":"path","name":"serviceAccountId","schema":{"type":"string"},"description":"The unique identifier of the service account to delete.","required":true}],"responses":{"204":{"description":"Returned if the service account is successfully deleted.","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"403":{"description":"Returned if the user does not have permission to delete service accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Returned if the specified service account is not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/orgs/{orgId}/oauth-clients":{"post":{"tags":["OAuth Client"],"summary":"Create an OAuth client","description":"Creates a new OAuth client for the specified organization.\n\n> **Note:** This is a session-only endpoint and cannot be called with an API token or OAuth 2.0 scope. It requires an active admin session with org management permissions.\n\n#### Scopes\nThis endpoint is session-only and does not accept OAuth 2.0 scopes.\n","operationId":"createOAuthClient","x-experimental":false,"parameters":[{"in":"path","name":"orgId","schema":{"type":"string"},"description":"Your organization is identified by a Unique ID. You get your organization ID and organization API key simultaneously.","required":true}],"requestBody":{"description":"Details to create an OAuth client","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOAuthClientRequest"}}}},"responses":{"201":{"description":"Returned if the OAuth client is successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClient"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"400":{"description":"Returned if the request is not in the correct format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Returned if the user does not have permission to create OAuth clients.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["OAuth Client"],"summary":"Get all OAuth clients in an org","description":"Retrieves all OAuth clients for the specified organization.\n\n#### Scopes\n**[OAuth 2.0 scopes](/cloud/admin/scopes/) required:** `read:service-accounts-tokens:admin`\n","operationId":"listOAuthClients","x-experimental":false,"parameters":[{"in":"path","name":"orgId","schema":{"type":"string"},"description":"Your organization is identified by a Unique ID. You get your organization ID and organization API key simultaneously.","required":true},{"$ref":"#/components/parameters/OAuthClientPageSize"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Returned if the request is successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientListResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"403":{"description":"Returned if the user does not have permission to view OAuth clients.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/orgs/{orgId}/oauth-clients/count":{"post":{"tags":["OAuth Client"],"summary":"Get OAuth client count in an org","description":"Gets the count of OAuth clients in the specified organization.\n\n#### Scopes\n**[OAuth 2.0 scopes](/cloud/admin/scopes/) required:** `read:service-accounts-tokens:admin`\n","operationId":"countOAuthClients","x-experimental":false,"parameters":[{"in":"path","name":"orgId","schema":{"type":"string"},"description":"Your organization is identified by a Unique ID. You get your organization ID and organization API key simultaneously.","required":true}],"responses":{"200":{"description":"Returned if the request is successful.","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","description":"The total count of OAuth clients in the organization."}}}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"403":{"description":"Returned if the user does not have permission to view OAuth clients.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/orgs/{orgId}/oauth-clients/{clientId}":{"get":{"tags":["OAuth Client"],"summary":"Get an OAuth client","description":"Retrieves a specific OAuth client by ID for the specified organization.\n\n#### Scopes\n**[OAuth 2.0 scopes](/cloud/admin/scopes/) required:** `read:service-accounts-tokens:admin`\n","operationId":"getOAuthClient","x-experimental":false,"parameters":[{"in":"path","name":"orgId","schema":{"type":"string"},"description":"Your organization is identified by a Unique ID. You get your organization ID and organization API key simultaneously.","required":true},{"in":"path","name":"clientId","schema":{"type":"string"},"description":"The unique identifier of the OAuth client.","required":true}],"responses":{"200":{"description":"Returned if the request is successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClient"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"403":{"description":"Returned if the user does not have permission to view OAuth clients.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Returned if the OAuth client is not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["OAuth Client"],"summary":"Delete an OAuth client","description":"Deletes an existing OAuth client from the specified organization.\n\n#### Scopes\n**[OAuth 2.0 scopes](/cloud/admin/scopes/) required:** `delete:service-accounts-tokens:admin`\n","operationId":"deleteOAuthClient","x-experimental":false,"parameters":[{"in":"path","name":"orgId","schema":{"type":"string"},"description":"Your organization is identified by a Unique ID. You get your organization ID and organization API key simultaneously.","required":true},{"in":"path","name":"clientId","schema":{"type":"string"},"description":"The unique identifier of the OAuth client to delete.","required":true}],"responses":{"204":{"description":"Returned if the OAuth client is successfully deleted.","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"403":{"description":"Returned if the user does not have permission to delete OAuth clients.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Returned if the OAuth client is not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/orgs/{orgId}/api-keys/count":{"get":{"tags":["API Key"],"summary":"Get API key count in an org","description":"Gets count of user API keys in an organization.\n\n#### Scopes\n**[Authorization scopes](/cloud/admin/scopes/) required:** `read:keys:admin`\n","operationId":"getApiKeyCountByOrgId","x-experimental":false,"parameters":[{"in":"path","name":"orgId","schema":{"type":"string"},"description":"Your organization is identified by a Unique ID. You get your organization ID and organization API key simultaneously.","required":true},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/ApiTokenUserQuery"},{"$ref":"#/components/parameters/ApiKeyType"},{"$ref":"#/components/parameters/ExpiresAtSearchType"},{"$ref":"#/components/parameters/ExpiresAtUom"},{"$ref":"#/components/parameters/ExpiresAtValue"},{"$ref":"#/components/parameters/ExpiresAtFrom"},{"$ref":"#/components/parameters/ExpiresAtTo"},{"$ref":"#/components/parameters/ExpiresAtRangeFrom"},{"$ref":"#/components/parameters/ExpiresAtRangeTo"},{"$ref":"#/components/parameters/LastActiveAtSearchType"},{"$ref":"#/components/parameters/LastActiveAtUom"},{"$ref":"#/components/parameters/LastActiveAtValue"},{"$ref":"#/components/parameters/LastActiveAtFrom"},{"$ref":"#/components/parameters/LastActiveAtTo"},{"$ref":"#/components/parameters/LastActiveAtRangeFrom"},{"$ref":"#/components/parameters/LastActiveAtRangeTo"}],"responses":{"200":{"description":"Returned if the request is successful.","content":{"application/json":{"schema":{"type":"integer"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"400":{"description":"Returned if request is not in correct format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"403":{"description":"Returned if the user does not have correct permissions to read user API tokens.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}}}}},"/orgs/{orgId}/api-keys":{"get":{"tags":["API Key"],"summary":"Get all API keys in an org","description":"Gets all user API keys in an organization.\n\n#### Scopes\n**[Authorization scopes](/cloud/admin/scopes/) required:** `read:keys:admin`\n","operationId":"getAllApiKeysByOrgId","x-experimental":false,"parameters":[{"in":"path","name":"orgId","schema":{"type":"string"},"description":"Your organization is identified by a Unique ID. You get your organization ID and organization API key simultaneously.","required":true},{"$ref":"#/components/parameters/Authorization"},{"$ref":"#/components/parameters/ApiTokenUserQuery"},{"$ref":"#/components/parameters/ApiKeyType"},{"$ref":"#/components/parameters/ExpiresAtSearchType"},{"$ref":"#/components/parameters/ExpiresAtUom"},{"$ref":"#/components/parameters/ExpiresAtValue"},{"$ref":"#/components/parameters/ExpiresAtFrom"},{"$ref":"#/components/parameters/ExpiresAtTo"},{"$ref":"#/components/parameters/ExpiresAtRangeFrom"},{"$ref":"#/components/parameters/ExpiresAtRangeTo"},{"$ref":"#/components/parameters/LastActiveAtSearchType"},{"$ref":"#/components/parameters/LastActiveAtUom"},{"$ref":"#/components/parameters/LastActiveAtValue"},{"$ref":"#/components/parameters/LastActiveAtFrom"},{"$ref":"#/components/parameters/LastActiveAtTo"},{"$ref":"#/components/parameters/LastActiveAtRangeFrom"},{"$ref":"#/components/parameters/LastActiveAtRangeTo"},{"$ref":"#/components/parameters/ApiKeySort"},{"$ref":"#/components/parameters/ApiKeyPageSize"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"Returned if the request is successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeySearchResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"400":{"description":"Returned if request is not in correct format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"403":{"description":"Returned if the user does not have correct permissions to read user API keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}}}}},"/orgs/{orgId}/api-keys/revoke/{apiKeyId}":{"patch":{"tags":["API Key"],"summary":"Revoke an API key for an org","description":"Revokes an existing API key\n\n#### Scopes\n**[Authorization scopes](/cloud/admin/scopes/) required:** `delete:keys:admin`\n","operationId":"RevokeApiKey","x-experimental":false,"parameters":[{"in":"path","name":"orgId","schema":{"type":"string"},"description":"Your organization is identified by a Unique ID. You get your organization ID and organization API key simultaneously.","required":true},{"in":"path","name":"apiKeyId","schema":{"type":"string"},"description":"ID for the API key you want to revoke.","required":true}],"responses":{"204":{"description":"Returned if the request is successful.","headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"400":{"description":"Returned if request is not in correct format.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next period reset time (ISO 8601 - Date and time in UTC)","schema":{"type":"string","format":"ISO 8601"}}}}}}}},"x-atlassian-narrative":{"documents":[{"title":"About","anchor":"About","body":"\nThe API Access REST APIs are:\n- Designed to empower organizations in viewing and managing how their Atlassian products can be accessed via public APIs."},{"title":"API Tokens","anchor":"API Tokens","body":"\n[API tokens](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/) are a method through which users or systems can gain access to organizational data. \nUsers can create and manage their personal API tokens in their Atlassian accounts. \nThe API Access collection offers a systematic approach to observe and analyze the API tokens provisioned within your organization."},{"title":"Authentication","anchor":"Authentication","body":"Authentication is implemented via an API key. Use the API Key as a Bearer access token to authenticate the script and manage your organization. The Organization ID is used as a unique identifier in the path parameter for the organization. Copy the Organization ID and API key and keep them in a secure place. We won’t show them to you again.\n\nTo make requests to the API with the client/tool of your choice, [Create an API key and get the organization ID](https://support.atlassian.com/organization-administration/docs/manage-an-organization-with-the-admin-apis/)."},{"title":"Rate limits","anchor":"Rate Limits","body":"A rate limit defines the maximum number of API calls an application or user can perform during a specific time frame. When this threshold is surpassed, or if CPU or total time constraints are exceeded, the application or user might encounter delays. Consequently, API requests initiated by the user or application will not succeed.\n\nIt is essential to note that all API requests are subjected to rate limits.\n\nWhen a client breach the rate limit thresholds, they get [HTTP 429 Too Many Requests](https://datatracker.ietf.org/doc/html/rfc6585#section-4) responses. The client has to wait for the rate limit counter to reset on the server before being able to make successful requests.\n\n**Rate limit response headers**\n\nThe following HTTP response headers are returned indicating the rate and threshold allowed for a client for each endpoint.\n- **X-RateLimit-Limit:** The number of allowed requests in the current period\n- **X-RateLimit-Remaining:** The number of remaining requests in the current period\n- **X-RateLimit-Reset:** Next period reset time (ISO 8601 - Date and time in UTC)"},{"title":"Version and URI","anchor":"Version and URI","body":"\nThe URIs for resources have the following structure:\n\n```\nhttps://api.atlassian.com/admin/api-access///\n```"},{"title":"Pagination","anchor":"Pagination","body":"\nThe API Access REST API uses pagination to conserve server resources and limit response size. If there are more results available after the current page, a `next` cursor is included in the response links. You can pass this `cursor` value on subsequent requests to retrieve the next page of results.\n\n**Important:** The cursor only encodes the sort value and record ID — it does not preserve your filters, sort order, or page size. You must re-supply all other parameters (filters, sort, pageSize) on every paginated request alongside the cursor."},{"title":"Experimental features","anchor":"Experimental features","body":"\nMethods marked as experimental may change without an earlier notice. We are looking for your feedback for these methods."},{"title":"Vocabulary","anchor":"Vocabulary","body":"\nThere are several concepts that are common ideas with a unique meaning in Atlassian Administration. Learn more about [terminology](https://developer.atlassian.com/cloud/admin/cloud-admin-vocabulary/) related to the cloud admin experience."}]},"components":{"parameters":{"ApiKeyType":{"in":"query","name":"keyType","description":"Key type filter for API keys to return keys of a certain type.","schema":{"type":"string","enum":["CLOUD_ADMIN"]},"required":false},"Authorization":{"in":"header","name":"Authorization","description":"Bearer token for authentication. The token is generated when you create properly scoped API key.\n\ne.g. `--header 'Authorization: Bearer '`\n","schema":{"type":"string"},"required":true},"ApiTokenUserQuery":{"in":"query","name":"q","description":"Free text search filter to be applied to API token results. Query will be applied using a fuzzy, case-insensitive search. Will target token `label`, `user.name`, and `user.email`.","schema":{"type":"string"},"required":false},"ApiTokenStatus":{"in":"query","name":"status","description":"Filter the API tokens by status to retrieve tokens of a specific type.","schema":{"type":"string","enum":["allowed","blocked"]},"required":false},"CreatedAtSearchType":{"in":"query","name":"createdAtSearchType","description":"Filter the API tokens by creation date. This parameter is **required** if searching on creation date. Depending on search type provided, additional parameters shall be supplied.","schema":{"type":"string","enum":["range","gt","lt","range_time"]},"required":false},"CreatedAtUom":{"in":"query","name":"createdAtUom","description":"Filter the API tokens by creation date. Unit of measure represents the scale of time for window search. This parameter is **required** if searching on creation date using `gt` or `lt` search.","schema":{"type":"string","enum":["day","hour","minute","week"]},"required":false},"CreatedAtValue":{"in":"query","name":"createdAtValue","description":"Filter the API tokens by creation date. This represents the value of time scale for window search. This parameter is **required** if searching on creation date using `gt` or `lt` search.","schema":{"type":"integer"},"required":false},"CreatedAtFrom":{"in":"query","name":"createdAtFrom","description":"Filter the API tokens by creation date. This represents the starting timestamp for a window search. Either this parameter or `createdAtTo` is **required** if searching on creation date using `range` search.","schema":{"type":"string","format":"ISO 8601"},"required":false},"CreatedAtTo":{"in":"query","name":"createdAtTo","description":"Filter the API tokens by creation date. This represents the ending timestamp for a window search. Either this parameter or `createdAtFrom` is **required** if searching on creation date using `range` search.","schema":{"type":"string","format":"ISO 8601"},"required":false},"CreatedAtRangeFrom":{"in":"query","name":"createdAtRangeFrom","description":"Filter the API tokens by creation date range. This represents the starting relative time window for a range time search. Either this parameter is or `createdAtRangeTo` is **required** if searching on creation date using `range_time` search.

**Note:** Range time windows use the format `1w 2d 3h 4m` where `w -> weeks, d -> days, h -> hours, m -> minutes`. Look-back is possible with the use of `-`, ex: `-3w` to indicate \"3 weeks ago.\" Values are optional and must be presented in descending order.","schema":{"type":"string","format":"1w 2d 3h 4m"},"required":false},"CreatedAtRangeTo":{"in":"query","name":"createdAtRangeTo","description":"Filter the API tokens by creation date range. This represents the ending relative time window for a range time search. Either this parameter is or `createdAtRangeFrom` is **required** if searching on creation date using `range_time` search.

**Note:** Range time windows use the format `1w 2d 3h 4m` where `w -> weeks, d -> days, h -> hours, m -> minutes`. Look-back is possible with the use of `-`, ex: `-3w` to indicate \"3 weeks ago.\" Values are optional and must be presented in descending order.","schema":{"type":"string","format":"1w 2d 3h 4m"},"required":false},"LastActiveAtSearchType":{"in":"query","name":"lastActiveAtSearchType","description":"Filter the API tokens by last active date. This parameter is **required** if searching on last active date. Depending on search type provided, additional parameters shall be supplied.","schema":{"type":"string","enum":["range","gt","lt","range_time"]},"required":false},"LastActiveAtUom":{"in":"query","name":"lastActiveAtUom","description":"Filter the API tokens by last active date. Unit of measure represents the scale of time for window search. This parameter is **required** if searching on last active date using `gt` or `lt` search.","schema":{"type":"string","enum":["day","hour","minute","week"]},"required":false},"LastActiveAtValue":{"in":"query","name":"lastActiveAtValue","description":"Filter the API tokens by last active date. This represents the value of time scale for window search. This parameter is **required** if searching on last active date using `gt` or `lt` search.","schema":{"type":"integer"},"required":false},"LastActiveAtFrom":{"in":"query","name":"lastActiveAtFrom","description":"Filter the API tokens by last active date. This represents the starting timestamp for a window search. Either this parameter or `lastActiveAtTo` is **required** if searching on last active date using `range` search.","schema":{"type":"string","format":"ISO 8601"},"required":false},"LastActiveAtTo":{"in":"query","name":"lastActiveAtTo","description":"Filter the API tokens by last active date. This represents the ending timestamp for a window search. Either this parameter or `lastActiveAtFrom` is **required** if searching on last active date using `range` search.","schema":{"type":"string","format":"ISO 8601"},"required":false},"LastActiveAtRangeFrom":{"in":"query","name":"lastActiveAtRangeFrom","description":"Filter the API tokens by last active date range. This represents the starting relative time window for a range time search. Either this parameter is or `lastActiveAtRangeTo` is **required** if searching on last active date using `range_time` search.

**Note:** Range time windows use the format `1w 2d 3h 4m` where `w -> weeks, d -> days, h -> hours, m -> minutes`. Look-back is possible with the use of `-`, ex: `-3w` to indicate \"3 weeks ago.\" Values are optional and must be presented in descending order.","schema":{"type":"string","format":"1w 2d 3h 4m"},"required":false},"LastActiveAtRangeTo":{"in":"query","name":"lastActiveAtRangeTo","description":"Filter the API tokens by last active date range. This represents the ending relative time window for a range time search. Either this parameter is or `lastActiveAtRangeFrom` is **required** if searching on last active date using `range_time` search.

**Note:** Range time windows use the format `1w 2d 3h 4m` where `w -> weeks, d -> days, h -> hours, m -> minutes`. Look-back is possible with the use of `-`, ex: `-3w` to indicate \"3 weeks ago.\" Values are optional and must be presented in descending order.","schema":{"type":"string","format":"1w 2d 3h 4m"},"required":false},"ExpiresAtSearchType":{"in":"query","name":"expiresAtSearchType","description":"Filter the API keys by expiry date. Depending on search type provided, additional parameters shall be supplied.","schema":{"type":"string","enum":["range","gt","lt","range_time"]},"required":false},"ExpiresAtUom":{"in":"query","name":"expiresAtUom","description":"Filter the API keys by expiry date. Unit of measure represents the scale of time for window search. This parameter is **required** if searching on expiry date using `gt` or `lt` search.","schema":{"type":"string","enum":["day","hour","minute","week"]},"required":false},"ExpiresAtValue":{"in":"query","name":"expiresAtValue","description":"Filter the API tokens by last active date. This represents the value of time scale for window search. This parameter is **required** if searching on expiry date using `gt` or `lt` search.","schema":{"type":"integer"},"required":false},"ExpiresAtFrom":{"in":"query","name":"expiresAtFrom","description":"Filter the API tokens by last active date. This represents the starting timestamp for a window search. Either this parameter or `expiresAtTo` is **required** if searching on expiry date using `range` search.","schema":{"type":"string","format":"ISO 8601"},"required":false},"ExpiresAtTo":{"in":"query","name":"expiresAtTo","description":"Filter the API tokens by last active date. This represents the ending timestamp for a window search. Either this parameter or `expiresAtFrom` is **required** if searching on expiry date using `range` search.","schema":{"type":"string","format":"ISO 8601"},"required":false},"ExpiresAtRangeFrom":{"in":"query","name":"expiresAtRangeFrom","description":"Filter the API keys by expiry date range. This represents the starting relative time window for a range time search. Either this parameter is or `expiresAtRangeTo` is **required** if searching on expiry date using `range_time` search.

**Note:** Range time windows use the format `1w 2d 3h 4m` where `w -> weeks, d -> days, h -> hours, m -> minutes`. Look-back is possible with the use of `-`, ex: `-3w` to indicate \"3 weeks ago.\" Values are optional and must be presented in descending order.","schema":{"type":"string","format":"1w 2d 3h 4m"},"required":false},"ExpiresAtRangeTo":{"in":"query","name":"expiresAtRangeTo","description":"Filter the API keys by expiry date range. This represents the ending relative time window for a range time search. Either this parameter is or `expiresAtRangeFrom` is **required** if searching on expiry date using `range_time` search.

**Note:** Range time windows use the format `1w 2d 3h 4m` where `w -> weeks, d -> days, h -> hours, m -> minutes`. Look-back is possible with the use of `-`, ex: `-3w` to indicate \"3 weeks ago.\" Values are optional and must be presented in descending order.","schema":{"type":"string","format":"1w 2d 3h 4m"},"required":false},"ApiTokenSort":{"in":"query","name":"sort","description":"Sort the API tokens based on the following criteria: ascending is represented with `+` as the first character (optional); descending is represented with `-` as the first character. Multiple values may be supplied as a comma-separated list.","schema":{"type":"string","enum":["label","-label","user.name","-user.name","createdAt","-createdAt","expiresAt","-expiresAt","lastActiveAt","-lastActiveAt"],"default":"-lastActiveAt","format":"[-|+], ..."},"required":false},"ApiKeySort":{"in":"query","name":"sort","description":"Sort the API keys based on the following criteria: ascending is represented with `+` as the first character (optional); descending is represented with `-` as the first character. Multiple values may be supplied as a comma-separated list.","schema":{"type":"string","enum":["label","-label","createdBy.name","-createdBy.name","expiresAt","-expiresAt","lastActiveAt","-lastActiveAt"],"default":"-lastActiveAt","format":"[-|+], ..."},"required":false},"ApiTokenPageSize":{"in":"query","name":"pageSize","description":"Select the number of records to include in the results.","schema":{"type":"integer","minimum":1,"maximum":1000,"default":20},"required":false},"OAuthClientPageSize":{"in":"query","name":"pageSize","description":"Select the number of OAuth client records to include in the results.","schema":{"type":"integer","minimum":1,"maximum":1000,"default":20},"required":false},"ApiKeyPageSize":{"in":"query","name":"pageSize","description":"Select the number of records to include in the results.","schema":{"type":"integer","enum":[5,10,20,25,40,50,60,75,80,100],"default":20},"required":false},"Cursor":{"in":"query","name":"cursor","description":"Navigate to a specific page of paginated results. In a given response, it may include a `self`, `next`, and `prev` cursor to fetch the respective set of paginated results. The cursor only encodes the sort value and record ID — it does not encode filters, sort order, or page size.

**Note:** You must continue to pass all other parameters (filters, sort, pageSize) on every request alongside the cursor.","schema":{"type":"string"},"required":false}},"schemas":{"ApiTokenSearchResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","description":"List of API tokens.","items":{"$ref":"#/components/schemas/ApiToken"}},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","links"]},"ApiKeySearchResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","description":"List of API keys.","items":{"$ref":"#/components/schemas/ApiKey"}},"links":{"$ref":"#/components/schemas/Links"}},"required":["data","links"]},"ApiToken":{"type":"object","required":["id","label","status","createdAt","user"],"properties":{"id":{"type":"string","description":"The token ID generated in the token-service."},"label":{"type":"string","description":"The token label."},"status":{"type":"string","description":"The token status.","enum":["ALLOWED","BLOCKED"]},"createdAt":{"type":"string","description":"An ISO-8601 formatted timestamp representing the time when a token was created."},"expiresAt":{"type":"string","description":"An ISO-8601 formatted timestamp representing the time when a token expires."},"lastActiveAt":{"type":"string","description":"An ISO-8601 formatted timestamp representing the time when a token was last used."},"user":{"$ref":"#/components/schemas/ApiTokenUser"},"scopes":{"type":"array","description":"Array of scopes associated with the token. An empty array indicates an unscoped API token.","items":{"type":"string"}}}},"ApiKey":{"type":"object","required":["id","label","keyType","createdAt","expiresAt","lastActiveAt","createdBy"],"properties":{"id":{"type":"string","description":"The key ID generated in the token-service."},"label":{"type":"string","description":"The key label."},"createdAt":{"type":"string","description":"An ISO-8601 formatted timestamp representing the time when a key was created."},"expiresAt":{"type":"string","description":"An ISO-8601 formatted timestamp representing the time when a key expires."},"lastActiveAt":{"type":"string","description":"An ISO-8601 formatted timestamp representing the time when a key was last used."},"systemAccountId":{"type":"string","description":"System account ID"},"resource":{"type":"string","description":"E.g. ari:cloud:confluence::site/abcdefg-hijkl"},"orgId":{"type":"string","description":"E.g. b44ad0bd-9758-485a-aea9-8c0e6b2d1606"},"createdBy":{"$ref":"#/components/schemas/ApiKeyUser"},"scopes":{"type":"array","description":"E.g. [\"manage:org\", \"read:org\"]","items":{"type":"string"}}}},"CreateApiKeyRequestBody":{"type":"object","properties":{"label":{"type":"string","description":"Name of the API Key api key."},"expiresAt":{"type":"string","description":"Expiration date (max one year from creation date)","format":"ISO 8601"},"scopes":{"type":"array","description":"OAuth Scopes- the level of access the API Key has for a given `resource`.\n\ne.g. `\"scopes\": [\"manage:org\", \"read:org\"]`\n","items":{"type":"string"}}},"required":["label","expiresAt","resource","scopes"]},"CreateApiKeyResponse":{"type":"object","properties":{"id":{"type":"string","description":"The key ID generated in the token-service."},"token":{"type":"string","description":"The secret token of the API key."},"label":{"type":"string","description":"The key label."},"createdBy":{"$ref":"#/components/schemas/ApiKeyUser"},"createdAt":{"type":"string","description":"An ISO-8601 formatted timestamp representing the time when a key was created."},"expiresAt":{"type":"string","description":"An ISO-8601 formatted timestamp representing the time when a key expires."},"scopes":{"type":"array","description":"E.g. [\"manage:org\", \"read:org\"]","items":{"type":"string"}}}},"ApiTokenUser":{"type":"object","description":"The user associated with the token.","properties":{"id":{"type":"string","description":"User ID of the API token user."},"orgId":{"type":"string","description":"Org ID of the API token user."},"name":{"type":"string","description":"Name of the API token user."},"email":{"type":"string","description":"Email of the API token user."}},"required":["id","name","email"]},"ApiKeyUser":{"type":"object","description":"The user associated with the key.","properties":{"id":{"type":"string","description":"User ID of the API key user."},"name":{"type":"string","description":"Name of the API key user."},"email":{"type":"string","description":"Email of the API key user."}},"required":["id","name","email"]},"Links":{"type":"object","properties":{"self":{"type":"string","description":"A cursor representing the current page of records. Only encodes the sort value and record ID — pass all other parameters (filters, sort, pageSize) alongside this cursor."},"next":{"type":"string","description":"A cursor representing the next page of records. Only encodes the sort value and record ID — pass all other parameters (filters, sort, pageSize) alongside this cursor."},"prev":{"type":"string","description":"A cursor representing the previous page of records. Only encodes the sort value and record ID — pass all other parameters (filters, sort, pageSize) alongside this cursor."}}},"ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","description":"List of during request.","items":{"$ref":"#/components/schemas/Error"}}}},"Error":{"type":"object","properties":{"id":{"type":"string","description":"A unique ID for the request."},"status":{"type":"string","description":"A HTTP status code for the error."},"code":{"type":"string","description":"A domain-specific error code.","enum":["INVALID_API_TOKEN_SEARCH_QUERY","INVALID_FIELD_FORMAT","INVALID_PAGE_SIZE","INVALID_SORT","FEATURE_NOT_ENABLED","GENERIC_ERROR"]},"title":{"type":"string","description":"A short description of the error."},"detail":{"type":"string","description":"A detailed description of the error and potential ways to address the issue."}},"required":["id","status","code","title"]},"ServiceAccountCredentialCountResponse":{"type":"object","properties":{"validServiceAccountIds":{"type":"array","items":{"$ref":"#/components/schemas/ServiceAccountCredentialCount"},"description":"List of valid service accounts with their credential counts"},"invalidServiceAccountIds":{"type":"array","items":{"type":"string"},"description":"List of invalid service account IDs that were not found"}},"required":["validServiceAccountIds","invalidServiceAccountIds"]},"ServiceAccountCredentialCount":{"type":"object","properties":{"serviceAccountId":{"type":"string","description":"The service account ID"},"credentialsCount":{"type":"integer","description":"The number of API tokens for this service account"}},"required":["serviceAccountId","credentialsCount"]},"UpdateServiceAccountRequest":{"type":"object","properties":{"atlassianId":{"type":"string","description":"The Atlassian account ID of the service account to update."},"displayName":{"type":"string","description":"The updated display name for the service account."},"description":{"type":"string","description":"The updated description for the service account."}},"required":["atlassianId"]},"ServiceAccount":{"type":"object","description":"Represents a service account.","properties":{"atlassianId":{"type":"string","description":"The Atlassian account ID of the service account."},"id":{"type":"string","description":"The unique identifier of the service account. Same value as `atlassianId`."},"email":{"type":"string","description":"The email address of the service account."},"displayName":{"type":"string","description":"The display name of the service account."},"picture":{"type":"string","nullable":true,"description":"The URL of the service account's avatar image."},"container":{"type":"string","description":"The ARI of the organization the service account belongs to. e.g. `ari:cloud:platform::org/{orgId}`"},"updatedAt":{"type":"integer","format":"int64","description":"The timestamp (in milliseconds since epoch) when the service account was last updated.","example":1764642980899},"status":{"type":"string","description":"The status of the service account."},"createdById":{"type":"string","nullable":true,"description":"The account ID of the user who created the service account."},"description":{"type":"string","nullable":true,"description":"The description of the service account."}},"required":["atlassianId","id","displayName","status"]},"ServiceAccountListResponse":{"type":"object","properties":{"links":{"type":"object","description":"Pagination links.","properties":{"next":{"type":"string","nullable":true,"description":"URL to the next page of results. Not present on the last page."},"prev":{"type":"string","nullable":true,"description":"URL to the previous page of results. Not present on the first page."}}},"items":{"type":"array","description":"List of service accounts in the organization.","items":{"$ref":"#/components/schemas/ServiceAccount"}},"total":{"type":"integer","description":"The total number of service accounts in the organization."}},"required":["links","items","total"]},"CreateServiceAccountRequest":{"type":"object","properties":{"displayName":{"type":"string","description":"The display name for the service account. Must be between 6 and 30 characters.","minLength":6,"maxLength":30},"description":{"type":"string","description":"An optional description for the service account.","maxLength":255},"permissionRules":{"type":"array","description":"A list of permission rules to assign to the service account. Each rule specifies a resource and role.","items":{"$ref":"#/components/schemas/PermissionRule"},"minItems":1},"additionalGroups":{"type":"array","description":"An optional list of additional groups to add the service account to.","items":{"$ref":"#/components/schemas/AdditionalGroup"}}},"required":["displayName","permissionRules"]},"CreateServiceAccountResponse":{"type":"object","properties":{"atlassianId":{"type":"string","description":"The Atlassian account ID of the created service account."},"id":{"type":"string","description":"The unique identifier of the created service account. Same value as `atlassianId`."},"email":{"type":"string","description":"The email address assigned to the created service account."},"displayName":{"type":"string","description":"The display name of the created service account."},"container":{"type":"string","description":"The ARI of the organization the service account belongs to. e.g. `ari:cloud:platform::org/{orgId}`"},"updatedAt":{"type":"integer","format":"int64","description":"The timestamp (in milliseconds since epoch) when the service account was last updated.","example":1763149545609},"status":{"type":"string","description":"The status of the service account."}},"required":["atlassianId","id","displayName","status"]},"PermissionRule":{"type":"object","description":"A permission rule specifying a resource and the role to assign.","properties":{"resource":{"type":"string","description":"The ARI (Atlassian Resource Identifier) of the resource to grant access to. e.g. `ari:cloud:jira::site/{siteId}`"},"role":{"type":"string","description":"The role to assign on the resource. e.g. `atlassian/user`"}},"required":["resource","role"]},"AdditionalGroup":{"type":"object","description":"An additional group membership to assign to the service account.","properties":{"directoryId":{"type":"string","description":"The ID of the directory containing the group."},"groupId":{"type":"string","description":"The ID of the group to add the service account to."}},"required":["directoryId","groupId"]},"OAuthClient":{"type":"object","description":"Represents an OAuth client associated with an organization.","properties":{"clientId":{"type":"string","description":"The unique identifier of the OAuth client."},"name":{"type":"string","description":"The display name of the OAuth client."},"createdAt":{"type":"integer","format":"int64","description":"The timestamp (in milliseconds since epoch) when the OAuth client was created.","example":1763149545609},"updatedAt":{"type":"integer","format":"int64","description":"The timestamp (in milliseconds since epoch) when the OAuth client was last updated.","example":1763149545609},"status":{"type":"string","description":"The status of the OAuth client.","enum":["ACTIVE","REVOKED","EXPIRED"]}},"required":["clientId","name","status"]},"OAuthClientListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OAuthClient"},"description":"List of OAuth clients."},"links":{"$ref":"#/components/schemas/Links"}}},"CreateOAuthClientRequest":{"type":"object","description":"Request body for creating an OAuth client.","properties":{"name":{"type":"string","description":"The display name of the OAuth client.","minLength":1,"maxLength":255},"serviceAccountId":{"type":"string","description":"The Atlassian account ID of the service account to associate with this OAuth client."}},"required":["name","serviceAccountId"]}}}}