The endpoint path takes 2 slugs which direct the deploy to the correct code deployment:
ORG_SLUG: found in the URL of your Sleuth org, immediately following https://app.sleuth.io/
DEPLOYMENT_SLUG: found in the URL, following the prefix https://app.sleuth.io/org_slug/deployments/
Authentication
Each request must contain an Authorization header including an Access Token. We recommend using an Access Token withlimited scope which can only be used for deploy registration.
You can manage your org's tokens it in the Organization Settings -> Access Tokens page.
Parameters
Name
Type
Comments
sha*
string
The git SHA of the commit to be registered as a deploy.
Name
Type
Comments
environment
string
The environment to register the deploy against. If not provided Sleuth will use the default environment of the Project.
date
string
ISO 8601 deployment date and time string
branch
string
If your code deployment's target environment is mapped to a branch prefix (rather than a specific branch), you must include the deploy’s full branch name as the parameter branch.
tags
string
A single string or a comma-delimited list of tags. Defaults to tags calculated by matching paths defined in your .sleuth/TAGS file.
ℹ️ Please note that tags must start with the # symbol, and can only contain:
lowercase letters,
numbers, and
symbols - and _ .
ignore_if_duplicate
string
If the value is provided and set to true Sleuth won't return a 400 error if we see a SHA that has already been registered.
email
string
Email address of author
links
string
A key/value pair consisting of the link name and the link itself in the following format:
mylink=http://my.link
If you need to send multiple then send a JSON body POST where the links are a dictionary of values.
Returned if any of the input parameters are invalid, e.g.:
- sha isn't provided
- branch doesn't match the configured branch
- date format isn't valid
- author is not a valid email
- we're unable to validate if the sha exists in the remote system
The response text will indicate the nature of the error:
String of message problem
401
API key not valid or the deployment is not in the specified organization
String of message problem
Examples
Make sure you replace the values surrounded by< and >with your own values.