forked from github-starred/komodo
224 lines
4.2 KiB
Plaintext
224 lines
4.2 KiB
Plaintext
import Divider from '@site/src/components/Divider';
|
|
|
|
# build
|
|
|
|
these routes relate to interacting with monitor `builds`
|
|
|
|
| name | route |
|
|
| ---- | ------ |
|
|
| [list builds](/api/build#list-builds) | `GET /api/build/list` |
|
|
| [get build](/api/build#get-build) | `GET /api/build/<build_id>` |
|
|
| [get build action state](/api/build#get-build-action-state) | `GET /api/build/<build_id>/action_state` |
|
|
| [get build versions](/api/build#get-build-versions) | `GET /api/build/<build_id>/versions` |
|
|
| [create build](/api/build#create-build) | `POST /api/build/create` |
|
|
| [create full build](/api/build#create-full-build) | `POST /api/build/create_full` |
|
|
| [copy build](/api/build#copy-build) | `POST /api/build/<build_id>/copy` |
|
|
| [delete build](/api/build#delete-build) | `DELETE /api/build/<build_id>/delete` |
|
|
| [update build](/api/build#update-build) | `PATCH /api/build/update` |
|
|
| [build](/api/build#build-action) | `POST /api/build/<build_id>/build` |
|
|
| [get aws builder defaults](/api/build#get-aws-builder-defaults) | `GET /api/build/aws_builder_defaults` |
|
|
| [get allowed docker organizations](/api/build#get-allowed-docker-organizations) | `GET /api/build/docker_organizations` |
|
|
|
|
```mdx-code-block
|
|
<Divider />
|
|
```
|
|
|
|
## list builds
|
|
`GET /api/build/list`
|
|
|
|
this method will return an array of builds the requesting user has a minimum of `Read` permissions on.
|
|
|
|
|
|
### response body
|
|
Array<[Build](/api/types#build)>
|
|
|
|
```mdx-code-block
|
|
<Divider />
|
|
```
|
|
|
|
## get build
|
|
`GET /api/build/<build_id>`
|
|
|
|
### response body
|
|
[Build](/api/types#build)
|
|
|
|
```mdx-code-block
|
|
<Divider />
|
|
```
|
|
|
|
## get build action state
|
|
`GET /api/build/<build_id>/action_state`
|
|
|
|
this method returns the action state for the build, eg. whether the build is currently `building`.
|
|
|
|
|
|
### response body
|
|
```json
|
|
{
|
|
building: boolean,
|
|
updating: boolean,
|
|
}
|
|
```
|
|
|
|
```mdx-code-block
|
|
<Divider />
|
|
```
|
|
|
|
## get build versions
|
|
`GET /api/build/<build_id>/versions`
|
|
|
|
paginated route for fetching the most recent available versions of this build.
|
|
|
|
### query params
|
|
```json
|
|
page=number // optional, default is 0. pagination starting at page 0.
|
|
major=number // optional. filter by major version number
|
|
minor=number // optional. filter by minor version number
|
|
patch=number // optional. filter by patch version number
|
|
```
|
|
|
|
### response body
|
|
```json
|
|
[
|
|
{
|
|
ts: rfc3339_timestamp,
|
|
version: {
|
|
major: number,
|
|
minor: number,
|
|
patch: number,
|
|
}
|
|
},
|
|
...
|
|
]
|
|
```
|
|
|
|
```mdx-code-block
|
|
<Divider />
|
|
```
|
|
|
|
## create build
|
|
`POST /api/build/create`
|
|
|
|
|
|
### request body
|
|
```json
|
|
{
|
|
name: string,
|
|
}
|
|
```
|
|
|
|
### response body
|
|
[Build](/api/types#build)
|
|
|
|
```mdx-code-block
|
|
<Divider />
|
|
```
|
|
|
|
## create full build
|
|
`POST /api/build/create_full`
|
|
|
|
|
|
### request body
|
|
[Build](/api/types#build)
|
|
|
|
### response body
|
|
[Build](/api/types#build)
|
|
|
|
```mdx-code-block
|
|
<Divider />
|
|
```
|
|
|
|
## copy build
|
|
`POST /api/build/<build_id>/copy`
|
|
|
|
this method will create a copy of the build with a new _id and name,
|
|
with all the same configuration as the target build.
|
|
|
|
|
|
### request body
|
|
```json
|
|
{
|
|
name: string, // the new name
|
|
}
|
|
```
|
|
|
|
### response body
|
|
[Build](/api/types#build)
|
|
|
|
```mdx-code-block
|
|
<Divider />
|
|
```
|
|
|
|
## delete build
|
|
`DELETE /api/build/<build_id>/delete`
|
|
|
|
### response body
|
|
[Build](/api/types#build)
|
|
|
|
```mdx-code-block
|
|
<Divider />
|
|
```
|
|
|
|
## update build
|
|
`PATCH /api/build/update`
|
|
|
|
### request body
|
|
[Build](/api/types#build)
|
|
|
|
### response body
|
|
[Build](/api/types#build)
|
|
|
|
```mdx-code-block
|
|
<Divider />
|
|
```
|
|
|
|
## build (action)
|
|
`POST /api/build/<build_id>/build`
|
|
|
|
### response body
|
|
[Update](/api/types#update)
|
|
|
|
:::note
|
|
this update will include the `version` field.
|
|
:::
|
|
|
|
```mdx-code-block
|
|
<Divider />
|
|
```
|
|
|
|
## get aws builder defaults
|
|
`GET /api/build/aws_builder_defaults`
|
|
|
|
### response body
|
|
```json
|
|
{
|
|
default_ami_name: string,
|
|
default_subnet_id: string,
|
|
default_key_pair_name: string,
|
|
default_region: string,
|
|
default_volume_gb: number,
|
|
default_instance_type: string,
|
|
default_security_group_ids: string[],
|
|
default_assign_public_ip: boolean,
|
|
available_ami_accounts: [
|
|
{
|
|
ami_id: string,
|
|
github: string[],
|
|
docker: string[],
|
|
secrets: string[],
|
|
}
|
|
],
|
|
}
|
|
```
|
|
|
|
```mdx-code-block
|
|
<Divider />
|
|
```
|
|
|
|
## get allowed docker organizations
|
|
`GET /api/build/docker_organizations`
|
|
|
|
### response body
|
|
```json
|
|
string[] // the names of the allowed docker organizations
|
|
``` |