This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

API Versions

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

This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

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

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.

{
  "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.

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

curl -s https://api.endorlabs.com/meta/version | jq .ClientVersion
curl -s https://api.endorlabs.com/meta/version | jq .ClientVersion
"v1.6.322"

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

endorctl --version

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

endorctl --version
endorctl version v1.6.293
A newer version of endorctl is available v1.6.317 - currently v1.6.293