Company
List companies the authenticated user is an operator of
Section titled “List companies the authenticated user is an operator of”GET /api/v1/companies
Authentication: BearerAuth.
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | OK | array of Company |
401 | Unauthorized | ErrorResponse |
500 | Internal Server Error | ErrorResponse |
Get a company by ID
Section titled “Get a company by ID”GET /api/v1/companies/{id}
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 | Company |
401 | Unauthorized | ErrorResponse |
403 | Forbidden | ErrorResponse |
404 | Not Found | ErrorResponse |
Update a company’s name and/or config
Section titled “Update a company’s name and/or config”PATCH /api/v1/companies/{id}
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: UpdateCompanyRequest
Fields to update
| Field | Type | Required | Description |
|---|---|---|---|
config | array of integer | No | |
name | string | No | At least 1 character. At most 100 characters. |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | OK | Company |
400 | Bad Request | ErrorResponse |
401 | Unauthorized | ErrorResponse |
403 | Forbidden | ErrorResponse |
404 | Not Found | ErrorResponse |
422 | Unprocessable Entity | ErrorResponse |
500 | Internal Server Error | ErrorResponse |
Soft-delete a company
Section titled “Soft-delete a company”DELETE /api/v1/companies/{id}
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 | MessageResponse |
401 | Unauthorized | ErrorResponse |
403 | Forbidden | ErrorResponse |
404 | Not Found | ErrorResponse |
500 | Internal Server Error | ErrorResponse |
Upload a company logo
Section titled “Upload a company logo”POST /api/v1/companies/{id}/logo
Accepts a multipart form with a single “file” field (JPEG, PNG, or WebP). The image is re-encoded to a 512px JPEG (stripping metadata), stored in object storage, and the company’s logo_url is updated. A previous logo is deleted.
Authentication: BearerAuth.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Company ID |
Request body
Section titled “Request body”multipart/form-data, required: object
Image file to upload
| Field | Type | Required | Description |
|---|---|---|---|
file | string | Yes | Image file to upload |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | OK | Company |
400 | Bad Request | ErrorResponse |
401 | Unauthorized | ErrorResponse |
403 | Forbidden | ErrorResponse |
404 | Not Found | ErrorResponse |
413 | Request Entity Too Large | ErrorResponse |
415 | Unsupported Media Type | ErrorResponse |
500 | Internal Server Error | ErrorResponse |
Delete a company logo
Section titled “Delete a company logo”DELETE /api/v1/companies/{id}/logo
Clears the company’s logo_url and deletes the stored object.
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 | Company |
401 | Unauthorized | ErrorResponse |
403 | Forbidden | ErrorResponse |
404 | Not Found | ErrorResponse |
500 | Internal Server Error | ErrorResponse |
Part of Crewlet. Generated from the OpenAPI document of the API, version 0.1.0.