# agent-release

Released builds of the Amfelt agent.

**Amfelt REST API** · v1.13.0 · `https://api.amfelt.com`

---
### GET `/v1/agent/releases` {#listagentreleases}

**List agent releases.**

Returns a page of released Amfelt agent builds, optionally filtered by version. Public: the agent CLI fetches this before it holds any credentials.
Without a `version` filter, `data` holds the published releases newest first by semantic-version precedence, and prereleases are left out.

#### Parameters

| Name | In  | Required | Type | Description |
| ---- | --- | -------- | ---- | ----------- |
| `version` | query | No | string | Semantic version to filter by; use 'latest' for the most recent version. |
| `cursor` | query | No | string | Opaque cursor for the next page; pass back the 'next_cursor' from a prior response. |
| `limit` | query | No | integer | Maximum number of items to return per page. |

#### Responses

**200** — A page of agent releases.

`application/json`

| Property | Type | Required | Description |
|---|---|---|---|
| `data` | [AgentRelease](#agent-release)[] | Yes | The page of agent releases. |
| `next_cursor` | [string null] | No | Opaque cursor for the next page, or null when this is the final page. Examples: `eyJpZCI6OTk5fQ`. |


**400** — The request was malformed or failed validation.

`application/json`

| Property | Type | Required | Description |
|---|---|---|---|
| `code` | string | Yes | Stable, snake_case token identifying the error condition. See ErrorCode for the api's canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: `invalid_argument`. |
| `field` | string | No | Optional hint identifying the request field the error refers to, in snake_case (e.g. "slug", "display_name", "token"). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: `slug`. |
| `message` | string | Yes | Human-readable description of the error. Examples: `limit must be between 1 and 100`. |


---

### GET `/v1/agent/releases/{version}/assets/{os}/{arch}` {#downloadagentasset}

**Download an agent binary asset.**

Downloads the agent binary, or returns its metadata, for the given release version, operating system, and architecture. Public: the agent CLI fetches this before it holds any credentials.

#### Parameters

| Name | In  | Required | Type | Description |
| ---- | --- | -------- | ---- | ----------- |
| `version` | path | Yes | string | Semantic version of the agent release; use 'latest' for the most recent version. |
| `os` | path | Yes | string (enum: `darwin`, `linux`, `windows`) | Operating system of the agent binary. |
| `arch` | path | Yes | string (enum: `amd64`, `arm64`) | Architecture of the agent binary. |

#### Responses

**200** — The binary asset, or its metadata.

`application/json`

| Property | Type | Required | Description |
|---|---|---|---|
| `arch` | string | Yes | Architecture supported by the asset. Valid values are: `amd64`, `arm64`. Examples: `amd64`. |
| `checksum` | string | No | Optional sha256 checksum of the asset archive. Examples: `2f1f366ae2307a9b9ae81b73abff5b2af8a1a1069284a73ee285a2bb6d55b8a0`. |
| `content_type` | string | Yes | Media type of the asset archive as defined by IANA media types (see https://www.iana.org/assignments/media-types/media-types.xhtml). Examples: `application/g-tar`. |
| `filename` | string | Yes | Filename of the asset archive. Examples: `plugin-sdk_Linux_x86_64.tar.gz`. |
| `id` | integer | Yes | Unique identifier of the asset. Examples: `10`. |
| `os` | string | Yes | Operating system supported by the asset. Valid values are: `darwin`, `linux`, `windows`. Examples: `darwin`. |
| `size` | integer | No | Size of the asset archive in bytes. Examples: `6527251`. |
| `url` | string | Yes | URL the asset can be downloaded from. Examples: `https://github.com/amfeltlabs/hub/releases/download/source-plugin-sdk-v1.1.6/plugin-sdk_Linux_x86_64.tar.gz`. |


`application/octet-stream`




**400** — The request was malformed or failed validation.

`application/json`

| Property | Type | Required | Description |
|---|---|---|---|
| `code` | string | Yes | Stable, snake_case token identifying the error condition. See ErrorCode for the api's canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: `invalid_argument`. |
| `field` | string | No | Optional hint identifying the request field the error refers to, in snake_case (e.g. "slug", "display_name", "token"). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: `slug`. |
| `message` | string | Yes | Human-readable description of the error. Examples: `limit must be between 1 and 100`. |


**404** — The specified resource was not found.

`application/json`

| Property | Type | Required | Description |
|---|---|---|---|
| `code` | string | Yes | Stable, snake_case token identifying the error condition. See ErrorCode for the api's canonical named vocabulary — this field is deliberately not restricted to it, since handlers may emit other ad-hoc codes not listed there (e.g. not_implemented). Examples: `invalid_argument`. |
| `field` | string | No | Optional hint identifying the request field the error refers to, in snake_case (e.g. "slug", "display_name", "token"). Set by handlers that validate multiple fields and want to enable field-targeted UX in clients. Absent when the error does not map to a single field. Examples: `slug`. |
| `message` | string | Yes | Human-readable description of the error. Examples: `limit must be between 1 and 100`. |


---

