deploy_resources

Create a group deploy token

Creates a group deploy token.

post/api/v4/groups/{id}/deploy_tokens

Request

  • Base URL
    https://gitlab.com
  • Auth
    none declared

Path parameters

idinteger required

The ID or URL-encoded path of the group owned by the authenticated user

Request body

namestring required

New deploy token's name

scopesstring[] required

Indicates the deploy token scopes. Must be at least one of read_repository, read_registry, write_registry, read_package_registry, or write_package_registry

expires_atstring date-time

Expiration date for the deploy token. Does not expire if no value is provided. Expected in ISO 8601 format (2019-03-15T08:00:00Z)

usernamestring

Username for deploy token. Default is gitlab+deploy-token-{n}

Response

Create a group deploy token

idinteger required
namestring required
usernamestring required
expires_atstring date-time required
revokedboolean required
expiredboolean required
tokenstring required

Example response

{
  "id": 1,
  "name": "MyToken",
  "username": "gitlab+deploy-token-1",
  "expires_at": "2020-02-14T00:00:00.000Z",
  "scopes": [
    "read_repository"
  ],
  "token": "jMRvtPNxrn3crTAGukpZ"
}

Changes

No recorded changes to this operation across all 5 revisions of this API.