Developer
News and Updates
Get Support
Sign in
Get Support
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
  • Orgs
  • Units
  • Directory
  • Users
  • Groups
  • Domains
  • Events
  • Policies
  • Workspaces
Cloud
Organizations REST API / Reference / REST API

Units

Postman Collection
OpenAPI
GET

Get units in organization

Gets the details of units in your organization.

Request

Path parameters

orgId

string

Required

Query parameters

name

string

cursor

string

limit

integer

sort

string

Responses

OK

application/json

UnitPage
GET/v1/orgs/{orgId}/units
1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/admin/v1/orgs/{orgId}/units' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 { "data": { "units": [ { "id": "{unitId}", "name": "Example Unit", "description": "Example unit description" }, { "id": "{anotherUnitId}", "name": "Another Unit", "description": "Another unit description" } ] }, "links": { "next": "/v1/orgs/{orgId}/units?cursor={nextCursor}&limit=20&sort=ascending", "prev": "/v1/orgs/{orgId}/units?cursor={prevCursor}&limit=20&sort=ascending" } }
POST

Create a unit

Creates units in the given organization. This is an asynchronous operation and returns a jobId. To check the job status, follow the status link returned in links.status.

Request

Path parameters

orgId

string

Required

Request bodyapplication/json

array<CreateUnitRequest>

name

string

Required
description

string

Responses

Accepted

application/json

CreateUnitResponse
POST/v1/orgs/{orgId}/units
1 2 3 4 5 6 7 8 9 10 curl --request POST \ --url 'https://api.atlassian.com/admin/v1/orgs/{orgId}/units' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '[ { "name": "Confectionary Subsidiary Unit" } ]'
202Response
1 2 3 4 5 6 7 8 { "data": { "jobId": "1234-5678-9012-3456" }, "links": { "status": "/v1/orgs/{orgId}/units/jobs/1234-5678-9012-3456" } }
GET

Get async unit job status

Retrieves the current status of an async unit job. This endpoint should be used in conjunction with the Create a Unit API to ensure a unit is successfully created.

Request

Path parameters

orgId

string

Required
jobId

string

Required

Responses

The status of the job request is provided in the body of the response. A 207 response does not indicate the unit was successfully created.

Headers

Retry-After

integer

application/json

JobStatus
GET/v1/orgs/{orgId}/units/jobs/{jobId}
1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/admin/v1/orgs/{orgId}/units/jobs/{jobId}' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
207Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 { "data": [ { "status": "SUCCESS", "jobType": "UNIT_CREATE", "result": { "unitId": "{unitId}" }, "error": null } ], "links": { "self": "/v1/orgs/{orgId}/units/jobs/{jobId}" } }
GET

Get unit

Gets the details of a unit.

Request

Path parameters

orgId

string

Required
unitId

string

Required

Responses

OK

application/json

UnitResponse
GET/v1/orgs/{orgId}/units/{unitId}
1 2 3 4 curl --request GET \ --url 'https://api.atlassian.com/admin/v1/orgs/{orgId}/units/{unitId}' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 { "data": { "id": "{unitId}", "name": "Example Unit", "description": "Example unit description" }, "links": { "self": "/v1/orgs/{orgId}/units/{unitId}" } }
PATCH

Update a Unit

Updates the details of a unit.

Request

Path parameters

orgId

string

Required
unitId

string

Required

Request bodyapplication/json

name

string

description

string

Responses

OK

application/json

UnitResponse
PATCH/v1/orgs/{orgId}/units/{unitId}
1 2 3 4 5 6 7 8 9 curl --request PATCH \ --url 'https://api.atlassian.com/admin/v1/orgs/{orgId}/units/{unitId}' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "name": "The updated unit name", "description": "The updated unit description" }'
200Response
1 2 3 4 5 6 7 8 9 10 { "data": { "id": "{unitId}", "name": "Updated Unit Name", "description": "Updated unit description" }, "links": { "self": "/v1/orgs/{orgId}/units/{unitId}" } }

Rate this page: