Forge and OAuth2 apps cannot access this REST resource.
This request has no parameters.
default response
any
1
2
curl --request GET \
--url 'http://{baseurl}/rest/access-tokens/latest/admin'Forge and OAuth2 apps cannot access this REST resource.
integer
default response
any
1
2
3
4
5
6
curl --request PUT \
--url 'http://{baseurl}/rest/access-tokens/latest/admin' \
--header 'Content-Type: application/json' \
--data '{
"maxExpiryDays": 2154
}'Forge and OAuth2 apps cannot access this REST resource.
This request has no parameters.
default response
any
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/access-tokens/latest/admin'Get all access tokens associated with the given project.
Forge and OAuth2 apps cannot access this REST resource.
string
Requirednumber
number
A response containing a page of access tokens and associated details.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/access-tokens/latest/projects/{projectKey}' \
--header 'Accept: application/json'1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
"values": [
{
"createdDate": "<string>",
"id": "252973515069",
"name": "My access token"
}
],
"size": 1,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154,
"limit": 25
}Create an access token for the project according to the given request.
Forge and OAuth2 apps cannot access this REST resource.
string
RequiredThe request containing the details of the access token to create.
integer
string
array<string>
A response containing the raw access token and associated details.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request PUT \
--url 'http://{baseurl}/rest/access-tokens/latest/projects/{projectKey}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"expiryDays": 2154,
"name": "My access token",
"permissions": [
"REPO_ADMIN",
"PROJECT_READ"
]
}'1
2
3
4
5
6
{
"token": "MjUyOTczNTE1MDY5On2rDbID2EgYpH8AVOECHv0saruQ",
"createdDate": "<string>",
"id": "252973515069",
"name": "My access token"
}Get all access tokens associated with the given repository.
Forge and OAuth2 apps cannot access this REST resource.
string
Requiredstring
Requirednumber
number
A response containing a page of access tokens and associated details.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}' \
--header 'Accept: application/json'1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
"values": [
{
"createdDate": "<string>",
"id": "252973515069",
"name": "My access token"
}
],
"size": 1,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154,
"limit": 25
}Create an access token for the repository according to the given request.
Forge and OAuth2 apps cannot access this REST resource.
string
Requiredstring
RequiredThe request containing the details of the access token to create.
integer
string
array<string>
A response containing the raw access token and associated details.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request PUT \
--url 'http://{baseurl}/rest/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"expiryDays": 2154,
"name": "My access token",
"permissions": [
"REPO_ADMIN",
"PROJECT_READ"
]
}'1
2
3
4
5
6
{
"token": "MjUyOTczNTE1MDY5On2rDbID2EgYpH8AVOECHv0saruQ",
"createdDate": "<string>",
"id": "252973515069",
"name": "My access token"
}Get an access token for the user according to the given ID.
Forge and OAuth2 apps cannot access this REST resource.
string
Requiredstring
Requiredstring
RequiredA response containing the access token and associated details.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}/{tokenId}' \
--header 'Accept: application/json'1
2
3
4
5
{
"createdDate": "<string>",
"id": "252973515069",
"name": "My access token"
}Modify an access token for the user according to the given request. Any fields not specified will not be altered.
Forge and OAuth2 apps cannot access this REST resource.
string
Requiredstring
Requiredstring
RequiredThe request containing the details of the access token to modify
integer
string
array<string>
A response containing the updated access token and associated details.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request POST \
--url 'http://{baseurl}/rest/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}/{tokenId}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"expiryDays": 2154,
"name": "My access token",
"permissions": [
"REPO_ADMIN",
"PROJECT_READ"
]
}'1
2
3
4
5
{
"createdDate": "<string>",
"id": "252973515069",
"name": "My access token"
}Delete an access token for the user according to the given ID.
Forge and OAuth2 apps cannot access this REST resource.
string
Requiredstring
Requiredstring
RequiredAn empty response indicating that the token has been deleted.
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}/{tokenId}'Get an access token for the user according to the given ID.
Forge and OAuth2 apps cannot access this REST resource.
string
Requiredstring
RequiredA response containing the access token and associated details.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/access-tokens/latest/projects/{projectKey}/{tokenId}' \
--header 'Accept: application/json'1
2
3
4
5
{
"createdDate": "<string>",
"id": "252973515069",
"name": "My access token"
}Modify an access token for the user according to the given request. Any fields not specified will not be altered.
Forge and OAuth2 apps cannot access this REST resource.
string
Requiredstring
RequiredThe request containing the details of the access token to modify
integer
string
array<string>
A response containing the updated access token and associated details.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request POST \
--url 'http://{baseurl}/rest/access-tokens/latest/projects/{projectKey}/{tokenId}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"expiryDays": 2154,
"name": "My access token",
"permissions": [
"REPO_ADMIN",
"PROJECT_READ"
]
}'1
2
3
4
5
{
"createdDate": "<string>",
"id": "252973515069",
"name": "My access token"
}Delete an access token for the user according to the given ID.
Forge and OAuth2 apps cannot access this REST resource.
string
Requiredstring
RequiredAn empty response indicating that the token has been deleted.
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/access-tokens/latest/projects/{projectKey}/{tokenId}'Get all access tokens associated with the given user.
Forge and OAuth2 apps cannot access this REST resource.
string
Requirednumber
number
A response containing a page of access tokens and associated details.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/access-tokens/latest/users/{userSlug}' \
--header 'Accept: application/json'1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
"values": [
{
"createdDate": "<string>",
"id": "252973515069",
"name": "My access token"
}
],
"size": 1,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154,
"limit": 25
}Create an access token for the user according to the given request.
Forge and OAuth2 apps cannot access this REST resource.
string
RequiredThe request containing the details of the access token to create.
integer
string
array<string>
A response containing the raw access token and associated details.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request PUT \
--url 'http://{baseurl}/rest/access-tokens/latest/users/{userSlug}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"expiryDays": 2154,
"name": "My access token",
"permissions": [
"REPO_ADMIN",
"PROJECT_READ"
]
}'1
2
3
4
5
6
{
"token": "MjUyOTczNTE1MDY5On2rDbID2EgYpH8AVOECHv0saruQ",
"createdDate": "<string>",
"id": "252973515069",
"name": "My access token"
}Get an access token for the user according to the given ID.
Forge and OAuth2 apps cannot access this REST resource.
string
Requiredstring
RequiredA response containing the access token and associated details.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/access-tokens/latest/users/{userSlug}/{tokenId}' \
--header 'Accept: application/json'1
2
3
4
5
{
"createdDate": "<string>",
"id": "252973515069",
"name": "My access token"
}Modify an access token for the user according to the given request. Any fields not specified will not be altered.
Forge and OAuth2 apps cannot access this REST resource.
string
Requiredstring
RequiredThe request containing the details of the access token to modify
integer
string
array<string>
A response containing the updated access token and associated details.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request POST \
--url 'http://{baseurl}/rest/access-tokens/latest/users/{userSlug}/{tokenId}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"expiryDays": 2154,
"name": "My access token",
"permissions": [
"REPO_ADMIN",
"PROJECT_READ"
]
}'1
2
3
4
5
{
"createdDate": "<string>",
"id": "252973515069",
"name": "My access token"
}Delete an access token for the user according to the given ID.
Forge and OAuth2 apps cannot access this REST resource.
string
Requiredstring
RequiredAn empty response indicating that the token has been deleted.
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/access-tokens/latest/users/{userSlug}/{tokenId}'Rate this page: