> ## Documentation Index
> Fetch the complete documentation index at: https://docs.endorlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.endorlabs.com/feedback

```json
{
  "path": "/developers-api/rest-api/about/versions/index",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# API Versions

> Learn how to specify which REST API version to use whenever you make a request to the Endor Labs REST API.

## About API versioning

The Endor Labs REST API uses explicit versioning. Endor Labs ships breaking changes only in a new API version.

New endpoints, fields, and enum values are backwards compatible within the same version.

For every new API version that Endor Labs releases, the URL specifies the major version. For example, `https://api.endorlabs.com/v1/namespaces/my_namespace/projects` uses version 1 of the endpoint, per the **v1** path segment.

Each resources have their versions specified in the field **meta.version**. For example the following resource has version 1 per the **v1** value for the field  **meta.version**.

```json theme={null}
{
  "meta": {
    "create_time": "2023-12-05T00:04:21.853Z",
    "kind": "Project",
    "name": "https://github.com/my_organization/my_repository.git",
    "update_time": "2024-05-01T16:50:03.830911988Z",
    "version": "v1"
  },
  "uuid": "656e69058032bf0abaaeb681"
}
```

When using the `endorctl` command-line tool to access the API, new endpoints, fields, or enum values are not available if your version of endorctl is older than the API version. Make sure to keep `endorctl` up-to-date to access the latest features and endpoints. For more information, see [Install and configure endorctl](https://docs.endorlabs.com/endorctl/install-and-configure/).

## Check latest API version using curl

To check the latest API version using curl, run the following command:

```bash theme={null}
curl -s https://api.endorlabs.com/meta/version | jq .ClientVersion
```

### Example request using curl

```bash theme={null}
curl -s https://api.endorlabs.com/meta/version | jq .ClientVersion
"v1.6.322"
```

## Check latest endorctl version

To get both the current and the latest version of `endorctl`, run the following command:

```bash theme={null}
endorctl --version
```

Along with your current version, you see a notification like the following if a newer `endorctl` version is available.

### Example request using endorctl

```bash theme={null}
endorctl --version
endorctl version v1.6.293
A newer version of endorctl is available v1.6.317 - currently v1.6.293
```
