Machine operators
List the machine users of a company
Section titled “List the machine users of a company”GET /api/v1/companies/{id}/operators/machines
Returns every machine user of the company with its creator, including machines not yet added as operators. Roles are managed through the /operators endpoints.
Authentication: BearerAuth.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Company ID |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | OK | array of User |
401 | Unauthorized | ErrorResponse |
403 | Forbidden | ErrorResponse |
404 | Not Found | ErrorResponse |
Provision a machine user (identity + first key)
Section titled “Provision a machine user (identity + first key)”POST /api/v1/companies/{id}/operators/machines
Creates the machine user and its first key in one step. The
machine has no permissions until an admin adds it with POST
/operators at a chosen role. Returns the cleartext token
once.
Authentication: BearerAuth.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Company ID |
Request body
Section titled “Request body”application/json, required: CreateMachineOperatorRequest
Machine name + optional description
| Field | Type | Required | Description |
|---|---|---|---|
description | string | No | At most 500 characters. |
expires_at | string | No | |
name | string | Yes | At most 100 characters. |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
201 | Created | CreatedMachineOperatorResponse |
400 | Bad Request | ErrorResponse |
401 | Unauthorized | ErrorResponse |
403 | Forbidden | ErrorResponse |
404 | Not Found | ErrorResponse |
List a machine operator’s keys
Section titled “List a machine operator’s keys”GET /api/v1/companies/{id}/operators/{user_id}/keys
Includes revoked + expired keys for audit.
Authentication: BearerAuth.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Company ID |
user_id | path | string | Yes | Machine user ID |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | OK | array of MachineOperatorKey |
401 | Unauthorized | ErrorResponse |
403 | Forbidden | ErrorResponse |
404 | Not Found | ErrorResponse |
Mint an additional key for an existing machine operator
Section titled “Mint an additional key for an existing machine operator”POST /api/v1/companies/{id}/operators/{user_id}/keys
The cleartext token is returned ONCE.
Authentication: BearerAuth.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Company ID |
user_id | path | string | Yes | Machine user ID |
Request body
Section titled “Request body”application/json, required: CreateKeyRequest
Key metadata
| Field | Type | Required | Description |
|---|---|---|---|
expires_at | string | No | |
name | string | Yes | At most 100 characters. |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
201 | Created | CreatedKeyResponse |
400 | Bad Request | ErrorResponse |
401 | Unauthorized | ErrorResponse |
403 | Forbidden | ErrorResponse |
404 | Not Found | ErrorResponse |
Revoke one of the machine’s keys (idempotent)
Section titled “Revoke one of the machine’s keys (idempotent)”DELETE /api/v1/companies/{id}/operators/{user_id}/keys/{key_id}
Authentication: BearerAuth.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Company ID |
user_id | path | string | Yes | Machine user ID |
key_id | path | string | Yes | Key ID |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | OK | MessageResponse |
401 | Unauthorized | ErrorResponse |
403 | Forbidden | ErrorResponse |
404 | Not Found | ErrorResponse |
Mint a replacement of one of the machine’s keys
Section titled “Mint a replacement of one of the machine’s keys”POST /api/v1/companies/{id}/operators/{user_id}/keys/{key_id}/rotate
Authentication: BearerAuth.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Company ID |
user_id | path | string | Yes | Machine user ID |
key_id | path | string | Yes | Key ID to rotate |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
201 | Created | CreatedKeyResponse |
401 | Unauthorized | ErrorResponse |
403 | Forbidden | ErrorResponse |
404 | Not Found | ErrorResponse |
Part of Crewlet. Generated from the OpenAPI document of the API, version 0.1.0.