GET

Get access-tokens latest admin

Request

This request has no parameters.

Responses

default response

application/json;charset=UTF-8

any

GET/access-tokens/latest/admin
1 2 curl --request GET \ --url 'http://{baseurl}/rest/access-tokens/latest/admin'
PUT

Put access-tokens latest admin

Request

Request bodyapplication/json

maxExpiryDays

integer

Responses

default response

application/json;charset=UTF-8

any

PUT/access-tokens/latest/admin
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 }'
DEL

Delete access-tokens latest admin

Request

This request has no parameters.

Responses

default response

application/json;charset=UTF-8

any

DEL/access-tokens/latest/admin
1 2 curl --request DELETE \ --url 'http://{baseurl}/rest/access-tokens/latest/admin'
GET

Get access-tokens latest projects {projectKey}

Get all access tokens associated with the given project.

Request

Path parameters

projectKey

string

Required

Query parameters

start

number

limit

number

Responses

A response containing a page of access tokens and associated details.

application/json

object
GET/access-tokens/latest/projects/{projectKey}
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/access-tokens/latest/projects/{projectKey}' \ --header 'Accept: application/json'
200Response
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 }
PUT

Put access-tokens latest projects {projectKey}

Create an access token for the project according to the given request.

Request

Path parameters

projectKey

string

Required

Request bodyapplication/json

The request containing the details of the access token to create.

expiryDays

integer

name

string

permissions

array<string>

Responses

A response containing the raw access token and associated details.

application/json

RestRawAccessToken
PUT/access-tokens/latest/projects/{projectKey}
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" ] }'
200Response
1 2 3 4 5 6 { "token": "MjUyOTczNTE1MDY5On2rDbID2EgYpH8AVOECHv0saruQ", "createdDate": "<string>", "id": "252973515069", "name": "My access token" }
GET

Get access-tokens latest projects {projectKey} repos {repositorySlug}

Get all access tokens associated with the given repository.

Request

Path parameters

projectKey

string

Required
repositorySlug

string

Required

Query parameters

start

number

limit

number

Responses

A response containing a page of access tokens and associated details.

application/json

object
GET/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}' \ --header 'Accept: application/json'
200Response
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 }
PUT

Put access-tokens latest projects {projectKey} repos {repositorySlug}

Create an access token for the repository according to the given request.

Request

Path parameters

projectKey

string

Required
repositorySlug

string

Required

Request bodyapplication/json

The request containing the details of the access token to create.

expiryDays

integer

name

string

permissions

array<string>

Responses

A response containing the raw access token and associated details.

application/json

RestRawAccessToken
PUT/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}
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" ] }'
200Response
1 2 3 4 5 6 { "token": "MjUyOTczNTE1MDY5On2rDbID2EgYpH8AVOECHv0saruQ", "createdDate": "<string>", "id": "252973515069", "name": "My access token" }
GET

Get access-tokens latest projects {projectKey} repos {repositorySlug} {tokenId}

Get an access token for the user according to the given ID.

Request

Path parameters

projectKey

string

Required
tokenId

string

Required
repositorySlug

string

Required

Responses

A response containing the access token and associated details.

application/json

RestAccessToken
GET/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}/{tokenId}
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}/{tokenId}' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 { "createdDate": "<string>", "id": "252973515069", "name": "My access token" }
POST

Post access-tokens latest projects {projectKey} repos {repositorySlug} {tokenId}

Modify an access token for the user according to the given request. Any fields not specified will not be altered.

Request

Path parameters

projectKey

string

Required
tokenId

string

Required
repositorySlug

string

Required

Request bodyapplication/json

The request containing the details of the access token to modify

expiryDays

integer

name

string

permissions

array<string>

Responses

A response containing the updated access token and associated details.

application/json

RestAccessToken
POST/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}/{tokenId}
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" ] }'
200Response
1 2 3 4 5 { "createdDate": "<string>", "id": "252973515069", "name": "My access token" }
DEL

Delete access-tokens latest projects {projectKey} repos {repositorySlug} {tokenId}

Delete an access token for the user according to the given ID.

Request

Path parameters

projectKey

string

Required
tokenId

string

Required
repositorySlug

string

Required

Responses

An empty response indicating that the token has been deleted.

DEL/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}/{tokenId}
1 2 curl --request DELETE \ --url 'http://{baseurl}/rest/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}/{tokenId}'
GET

Get access-tokens latest projects {projectKey} {tokenId}

Get an access token for the user according to the given ID.

Request

Path parameters

projectKey

string

Required
tokenId

string

Required

Responses

A response containing the access token and associated details.

application/json

RestAccessToken
GET/access-tokens/latest/projects/{projectKey}/{tokenId}
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/access-tokens/latest/projects/{projectKey}/{tokenId}' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 { "createdDate": "<string>", "id": "252973515069", "name": "My access token" }
POST

Post access-tokens latest projects {projectKey} {tokenId}

Modify an access token for the user according to the given request. Any fields not specified will not be altered.

Request

Path parameters

projectKey

string

Required
tokenId

string

Required

Request bodyapplication/json

The request containing the details of the access token to modify

expiryDays

integer

name

string

permissions

array<string>

Responses

A response containing the updated access token and associated details.

application/json

RestAccessToken
POST/access-tokens/latest/projects/{projectKey}/{tokenId}
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" ] }'
200Response
1 2 3 4 5 { "createdDate": "<string>", "id": "252973515069", "name": "My access token" }
DEL

Delete access-tokens latest projects {projectKey} {tokenId}

Delete an access token for the user according to the given ID.

Request

Path parameters

projectKey

string

Required
tokenId

string

Required

Responses

An empty response indicating that the token has been deleted.

DEL/access-tokens/latest/projects/{projectKey}/{tokenId}
1 2 curl --request DELETE \ --url 'http://{baseurl}/rest/access-tokens/latest/projects/{projectKey}/{tokenId}'
GET

Get access-tokens latest users {userSlug}

Get all access tokens associated with the given user.

Request

Path parameters

userSlug

string

Required

Query parameters

start

number

limit

number

Responses

A response containing a page of access tokens and associated details.

application/json

object
GET/access-tokens/latest/users/{userSlug}
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/access-tokens/latest/users/{userSlug}' \ --header 'Accept: application/json'
200Response
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 }
PUT

Put access-tokens latest users {userSlug}

Create an access token for the user according to the given request.

Request

Path parameters

userSlug

string

Required

Request bodyapplication/json

The request containing the details of the access token to create.

expiryDays

integer

name

string

permissions

array<string>

Responses

A response containing the raw access token and associated details.

application/json

RestRawAccessToken
PUT/access-tokens/latest/users/{userSlug}
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" ] }'
200Response
1 2 3 4 5 6 { "token": "MjUyOTczNTE1MDY5On2rDbID2EgYpH8AVOECHv0saruQ", "createdDate": "<string>", "id": "252973515069", "name": "My access token" }
GET

Get access-tokens latest users {userSlug} {tokenId}

Get an access token for the user according to the given ID.

Request

Path parameters

tokenId

string

Required
userSlug

string

Required

Responses

A response containing the access token and associated details.

application/json

RestAccessToken
GET/access-tokens/latest/users/{userSlug}/{tokenId}
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/access-tokens/latest/users/{userSlug}/{tokenId}' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 { "createdDate": "<string>", "id": "252973515069", "name": "My access token" }
POST

Post access-tokens latest users {userSlug} {tokenId}

Modify an access token for the user according to the given request. Any fields not specified will not be altered.

Request

Path parameters

tokenId

string

Required
userSlug

string

Required

Request bodyapplication/json

The request containing the details of the access token to modify

expiryDays

integer

name

string

permissions

array<string>

Responses

A response containing the updated access token and associated details.

application/json

RestAccessToken
POST/access-tokens/latest/users/{userSlug}/{tokenId}
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" ] }'
200Response
1 2 3 4 5 { "createdDate": "<string>", "id": "252973515069", "name": "My access token" }
DEL

Delete access-tokens latest users {userSlug} {tokenId}

Delete an access token for the user according to the given ID.

Request

Path parameters

tokenId

string

Required
userSlug

string

Required

Responses

An empty response indicating that the token has been deleted.

DEL/access-tokens/latest/users/{userSlug}/{tokenId}
1 2 curl --request DELETE \ --url 'http://{baseurl}/rest/access-tokens/latest/users/{userSlug}/{tokenId}'

Rate this page: