master_tokens

create

Create a master token.

Example request:

curl -X POST -F "master_token[name]=app_servers" https://packagecloud.io/api/v1/repos/username/reponame/master_tokens
post/api/v1/repos/{user_id}/{repo}/master_tokens

Request

Path parameters

user_idstring required

The username to which the repo belongs.

repostring required

The name of the repo.

Request body application/x-www-form-urlencoded

master_token[name]string

The name of the token to create.

Response

MasterToken The newly created master token

namestring

The name of the master token.

valuestring

The value of the master token, for use in the read token API.

Example response

{
  "value": "e5480f5b38f1f78de2aaa0fa732d1427b1b83113371fd97d",
  "name": "default",
  "read_tokens": [
    {
      "value": "3fe453060fd7f017219e308eb98ccf273b4c3655ba57577a",
      "name": "app1.somewhere.com"
    }
  ],
  "paths": {
    "self": "/api/v1/repos/somewhere/production/master_tokens/1"
  }
}

Changes

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