# Release

## Get all releases for a fleet

> \## Release Resource Fields\
> \
> \| Field |\
> \| :--- |\
> \| \`id\` |\
> \| \`created\_at\` |\
> \| \`belongs\_to\_\_application\` |\
> \| \`is\_created\_by\_\_user\` |\
> \| \`raw\_version\` |\
> \| \`semver\` |\
> \| \`semver\_major\` |\
> \| \`semver\_minor\` |\
> \| \`semver\_patch\` |\
> \| \`semver\_prerelease\` |\
> \| \`semver\_build\` |\
> \| \`revision\` |\
> \| \`variant\` |\
> \| \`commit\` |\
> \| \`composition\` |\
> \| \`status\` |\
> \| \`source\` |\
> \| \`build\_log\` |\
> \| \`start\_timestamp\` |\
> \| \`end\_timestamp\` |\
> \| \`update\_timestamp\` |\
> \| \`is\_invalidated\` |\
> \| \`release\_version\` |\
> \| \`contract\` |\
> \
> \
> \---\
> \
> \`GET /v7/release\`\
> \
> \
> \### Usage Variations\
> \
> \--- \
> \#### Get a release ID given a specific fleet and version\
> \`GET /v7/release?$filter=belongs\_to\_\_application eq \<FLEET ID> and raw\_version eq '\<RAW VERSION>'&$select=id\`\
> \
> \--- \
> \#### Get a release ID given a specific fleet and commit\
> \`GET /v7/release?$filter=belongs\_to\_\_application eq \<FLEET ID> and commit eq '\<COMMIT HASH>'&$select=id\`

```json
{"openapi":"3.0.0","info":{"title":"Balena API Spec","version":"7.0.0"},"servers":[{"url":"https://api.balena-cloud.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/v7/release#Release":{"get":{"tags":["Release"],"summary":"Get all releases for a fleet","description":"## Release Resource Fields\n\n| Field |\n| :--- |\n| `id` |\n| `created_at` |\n| `belongs_to__application` |\n| `is_created_by__user` |\n| `raw_version` |\n| `semver` |\n| `semver_major` |\n| `semver_minor` |\n| `semver_patch` |\n| `semver_prerelease` |\n| `semver_build` |\n| `revision` |\n| `variant` |\n| `commit` |\n| `composition` |\n| `status` |\n| `source` |\n| `build_log` |\n| `start_timestamp` |\n| `end_timestamp` |\n| `update_timestamp` |\n| `is_invalidated` |\n| `release_version` |\n| `contract` |\n\n\n---\n\n`GET /v7/release`\n\n\n### Usage Variations\n\n--- \n#### Get a release ID given a specific fleet and version\n`GET /v7/release?$filter=belongs_to__application eq <FLEET ID> and raw_version eq '<RAW VERSION>'&$select=id`\n\n--- \n#### Get a release ID given a specific fleet and commit\n`GET /v7/release?$filter=belongs_to__application eq <FLEET ID> and commit eq '<COMMIT HASH>'&$select=id`"}}}}
```

## Get the release raw\_version field

> \`GET /v7/release(\<ID>)\`\
> \
> The raw\_version field is returned only when explicitly requested with $select.

```json
{"openapi":"3.0.0","info":{"title":"Balena API Spec","version":"7.0.0"},"servers":[{"url":"https://api.balena-cloud.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/v7/release({ID})":{"get":{"tags":["Release"],"summary":"Get the release raw_version field","description":"`GET /v7/release(<ID>)`\n\nThe raw_version field is returned only when explicitly requested with $select.","parameters":[{"name":"ID","in":"path","required":true}]}}}}
```
