How can I upload a CycloneDX Artifact through Build API?

Logan Bolding
Logan Bolding
  • Updated

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:

  1. Type: POST

  2. Endpoint Url format: https://[base_url].ketryx.net/api/v1/build-artifacts?project=<PROJECTID>&version=<PROJECTVERSION>

    1. <PROJECTID> is the Ketryx Project ID

    2. <PROJECTVERSION> is the Ketryx Project Version

  3. In your request, head to the ‘Auth’ tab and click on the authorization. Add ‘Bearer Token’ and your API access token in the field.

  4. Next head to the ‘Body’ and Select the CycloneDX file you wish to upload.

 

 

The second request you will make contains the following information:

  1. Type: POST

  2. Endpoint url format: https://[base_url].ketryx.net/api/v1/builds

  3. In your request, head to the ‘Auth’ tab and click on the authorization. Add ‘Bearer Token’ and your API access token in the field.
  4. 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.

 

 

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.