Tokens
Gofer API Token
| Method | Endpoint |
|---|---|
| GET | /api/tokens |
| POST | /api/tokens |
| POST | /api/tokens/bootstrap |
| POST | /api/tokens/web-login |
| POST | /api/tokens/web-login/exchange |
| GET | /api/tokens/whoami |
| GET | /api/tokens/{id} |
| PATCH | /api/tokens/{id} |
| DELETE | /api/tokens/{id} |
List all Gofer API tokens
/api/tokensThis endpoint is restricted to admin tokens only.
Responses
| Status | Body | Description |
|---|---|---|
200 | ListTokensResponse | successful operation |
4XX | Error | Error |
5XX | Error | Error |
Create a new token
/api/tokensThis endpoint is restricted to admin tokens only.
Request body (required): CreateTokenRequest
Responses
| Status | Body | Description |
|---|---|---|
201 | CreateTokenResponse | successful creation |
4XX | Error | Error |
5XX | Error | Error |
Create root admin token
/api/tokens/bootstrapThis endpoint can only be hit once and will create the root admin token, from which all other tokens can be created.
Responses
| Status | Body | Description |
|---|---|---|
201 | CreateTokenResponse | successful creation |
4XX | Error | Error |
5XX | Error | Error |
Start a browser sign in
/api/tokens/web-loginReturns a short lived, single use code that a browser can trade for the calling token, so the CLI can open the web UI already signed in without ever putting the token itself in a URL.
Responses
| Status | Body | Description |
|---|---|---|
201 | CreateWebLoginResponse | successful creation |
4XX | Error | Error |
5XX | Error | Error |
Finish a browser sign in
/api/tokens/web-login/exchangeTrades a code from create_web_login for the token that created it. Each code works once. The code is sent in the body rather than the path so it stays out of request logs.
Request body (required): ExchangeWebLoginRequest
Responses
| Status | Body | Description |
|---|---|---|
200 | ExchangeWebLoginResponse | successful operation |
4XX | Error | Error |
5XX | Error | Error |
Get api token who made the request
/api/tokens/whoamiResponses
| Status | Body | Description |
|---|---|---|
200 | WhoAmIResponse | successful operation |
4XX | Error | Error |
5XX | Error | Error |
Get api token by id
/api/tokens/{id}Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The unique identifier for the target namespace. |
Responses
| Status | Body | Description |
|---|---|---|
200 | GetTokenByIDResponse | successful operation |
4XX | Error | Error |
5XX | Error | Error |
Update a token's state
/api/tokens/{id}Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The unique identifier for the target namespace. |
Request body (required): UpdateTokenRequest
Responses
Delete api token by id
/api/tokens/{id}This endpoint is restricted to admin tokens only.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The unique identifier for the target namespace. |
Responses