Sleuth API
The Sleuth REST API provides methods that enables users to:
Register or import their deploys
Create manual changes
Register custom impact values
Sleuth's main public API is built using GraphQL. It's the same API we use internally for developing our applications.
If you're new to GraphQL, Apollo has resources for beginners. The official documentation is another good starting point.
NOTE: the GraphQL API is still under heavy development and is subject to change
Sleuth's GraphQL endpoint is:
We expose the GraphiQL client so you can explore and query the API.
See GraphQL examples to see how to authenticate your requests using Sleuth API Key.
Authentication
The Sleuth REST API requires authentication using the API key from your Sleuth organization.
Provisioning Sleuth with Terraform
For Organizations with many Projects, Code Deployments and Impact Sources configuring Sleuth via the UI can be cumbersome. The Sleuth API can be used to provision resources directly. However, many teams already rely on Terraform to provision their infrastructure and other resources.
Instead of using the API directly to provision Sleuth resources, you can use Terraform and our terraform provider.
Organization and Deployment Slugs
Note that the organization and deployment slugs are not the semantic name of your organization and deployment as shown in the organization settings, which can contain spaces and capitalized characters.
The slugs displayed are the URL of your organization and deployment, with spaces replaced by a hyphen (-) and non-alphabetical characters (e.g., ()@#$%^, etc.) ignored.For example, if you're viewing a deployment called plugin picker (dev) and your organization is called Amazing Software, the URL will display as https://app.sleuth.io/amazing-software/deployments/plugin-picker-dev. Thus, the organization slug is amazing-software, the deployment slug is plugin-picker-dev.
Errors
Codes in the
2xx
range indicate successCodes in the
4xx
range indicate incorrect or incomplete parametersCodes in the
5xx
range indicate an error with Sleuth servers
REST API Details and Examples
Last updated