In order to upload a CycloneDx Artifact to the Ketryx Build API you will need to make two HTTP requests. In order to complete these HTTP requests, we recommend using an API Client like POSTMAN or Bruno.
The first request you will make contains the following information:
-
Type: POST
-
Endpoint Url format: https://[base_url].ketryx.net/api/v1/build-artifacts?project=<PROJECTID>&version=<PROJECTVERSION>
-
<PROJECTID> is the Ketryx Project ID
-
<PROJECTVERSION> is the Ketryx Project Version
-
-
In your request, head to the ‘Auth’ tab and click on the authorization. Add ‘Bearer Token’ and your API access token in the field.
-
Next head to the ‘Body’ and Select the CycloneDX file you wish to upload.
The second request you will make contains the following information:
-
Type: POST
-
Endpoint url format: https://[base_url].ketryx.net/api/v1/builds
- In your request, head to the ‘Auth’ tab and click on the authorization. Add ‘Bearer Token’ and your API access token in the field.
- Next head to the ‘Body’ and fill in the body with the following JSON format:
{
"project": "<PROJECTID>",
"version": "<PROJECTVERSION>",
"buildName": "<BUILDNAME>",
"artifacts": [
{
"id": "<ARTIFACTID>",
"type": "cyclonedx-json"
}
]
}
<PROJECTID> is the Ketryx Project ID
<PROJECTVERSION> is the Ketryx Project Version
<ARTIFACTID> is the id that was generated from your first API call.
<BUILDNAME> is the name of the build you would like to report to.
Your CycloneDX artifact should now be populated within Ketryx.
Comments
0 comments
Please sign in to leave a comment.