Gets the details of units in your organization.
string
Requiredstring
string
integer
string
OK
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'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"
}
}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.
string
Requiredarray<CreateUnitRequest>
string
Requiredstring
Accepted
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"
}
]'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"
}
}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.
string
Requiredstring
RequiredThe status of the job request is provided in the body of the response. A 207 response does not indicate the unit was successfully created.
integer
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'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}"
}
}Gets the details of a unit.
string
Requiredstring
RequiredOK
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'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}"
}
}Updates the details of a unit.
string
Requiredstring
Requiredstring
string
OK
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"
}'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: