Using the Anchore API
The Anchore Enterprise API is a combination of the open-source Anchore Engine external API as well as enterprise-only extensions. The has been documented using the OpenAPI Specification (Swagger) and the source can be found in the swagger.yaml document within the external API service. There are also a variety of ways in which the API specification can be accessed.
The API specifications for this release of Anchore Enterprise are available from the documentation.
Enterprise Service APIs
This service, typically called
apiext in deployment templates has two specifications that are combined to provide the full API for the service:
Swagger JSON from a Deployment
The JSON definition for the Engine API specification for your specific instance of Anchore can be downloaded from a running Anchore Enterprise service at the following URI:
This API is compatible with Anchore Engine to ensure an easy transition from using Engine to Enterprise. Additional features and extensions are available from other service endpoints (e.g. reporting and notifications) or via the Enterprise extension specification below.
Anchore Enterprise includes additional API calls and features not available in Anchore Engine. These use a distinct base route and separate specification file. The file is available at:
Local Swagger UI
Finally, Anchore includes the ability to deploy a sidecar set of containers that provide a local Swagger UI, allowing for the API to be viewed and tested within a web browser. The Swagger UI is accessed by first enabling an nginx proxy service and swagger-ui service that run alongside your anchore engine deployment, and then directing your browser at the nginx proxy service.
To enable in a quickstart deployment (using docker-compose), simply uncomment the two service sections (the ‘anchore-swagger-ui-nginx’ and ‘anchore-swagger-ui’ services) at the end of the default docker-compose.yaml before starting up anchore, according to the regular Quickstart Guide. Once enabled, you can then direct your browser at your server, port 8080, and start browsing and testing API calls.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.