For the complete documentation index, see llms.txt. This page is also available as Markdown.

AIBOM

This document uses the REST API. For more details, see the Authentication for API page.

Create a new AI-BOM (Early Access)

post

Triggers the creation of a new AI-BOM. The AI-BOM will be created in a background job. Users should query the background job status by using the getAiBomJob endpoint (/orgs/{org_id}/ai_bom_jobs/{job_id}). The response will contain a content-location header pointing to the getAiBomJob endpoint.

Required permissions

  • View Organization (org.read)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
org_idstring · uuidRequired

Org ID

Query parameters
versionstringRequired

Requested API version

Example: 2024-10-15Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
enrichedbooleanOptional

When true, runs additional slower enrichment steps on the AI-BOM.

Default: false
Body
dataone ofRequired
or
or
Responses
202

The request has been accepted for processing, but processing has not yet completed.

application/vnd.api+json
post/orgs/{org_id}/ai_boms
POST /rest/orgs/{org_id}/ai_boms?version=text HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 72

{
  "data": {
    "attributes": {
      "bundle_id": "text"
    },
    "type": "ai_bom_file_bundle"
  }
}
{
  "data": {
    "attributes": {
      "status": "processing"
    },
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "relationships": {
      "ai_bom": {
        "data": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "type": "text"
        }
      }
    },
    "type": "ai_bom_job"
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "first": "https://example.com/api/resource?ending_before=v1.eyJpZCI6IjExIn0K",
    "last": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjMwIn0K",
    "next": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjEwIn0K"
  }
}

Get an AI-BOM. (Early Access)

get

Get a AI-BOM once it's job has finished

Required permissions

  • View Organization (org.read)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
org_idstring · uuidRequired

Org ID

ai_bom_idstring · uuidRequired

The ai_bom id

Query parameters
versionstringRequired

Requested API version

Example: 2024-10-15Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
Responses
200

Successful API response with a single resource

application/vnd.api+json
get/orgs/{org_id}/ai_boms/{ai_bom_id}
GET /rest/orgs/{org_id}/ai_boms/{ai_bom_id}?version=text HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": {
    "attributes": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "type": "ai_bom"
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "first": "https://example.com/api/resource?ending_before=v1.eyJpZCI6IjExIn0K",
    "last": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjMwIn0K",
    "next": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjEwIn0K"
  }
}

Create and upload an AI-BOM (Early Access)

post

Creates an AI-BOM from a file bundle and persists it to the database. Unlike the standard createAiBom endpoint, this endpoint requires a repo_name and will store the AI-BOM for later retrieval and testing. The AI-BOM will be created in a background job. Users should query the background job status by using the getAiBomJob endpoint.

Required permissions

  • Edit Organization (org.edit)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
org_idstring · uuidRequired

Org ID

Query parameters
versionstringRequired

Requested API version

Example: 2024-10-15Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
enrichedbooleanOptional

When true, runs additional slower enrichment steps on the AI-BOM.

Default: false
Body
dataone ofRequired
or
Responses
202

The request has been accepted for processing, but processing has not yet completed.

application/vnd.api+json
post/orgs/{org_id}/ai_boms/upload
POST /rest/orgs/{org_id}/ai_boms/upload?version=text HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 91

{
  "data": {
    "attributes": {
      "bundle_id": "text",
      "repo_name": "text"
    },
    "type": "ai_bom_file_bundle"
  }
}
{
  "data": {
    "attributes": {
      "status": "processing"
    },
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "relationships": {
      "ai_bom": {
        "data": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "type": "text"
        }
      }
    },
    "type": "ai_bom_job"
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "first": "https://example.com/api/resource?ending_before=v1.eyJpZCI6IjExIn0K",
    "last": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjMwIn0K",
    "next": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjEwIn0K"
  }
}

Get an AI-BOM job status (Early Access)

get

Returns the status of an AI-BOM job. The job status is returned in the response body. If the job is completed the response status code will be 303, redirecting to the getAiBom endpoint.

Required permissions

  • View Organization (org.read)
Authorizations
AuthorizationstringRequired

API key value must be prefixed with "Token ".

Path parameters
org_idstring · uuidRequired

Org ID

job_idstring · uuidRequired

The job id

Query parameters
versionstringRequired

Requested API version

Example: 2024-10-15Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$
Responses
200

Successful API response with a single resource

application/vnd.api+json
get/orgs/{org_id}/ai_bom_jobs/{job_id}
GET /rest/orgs/{org_id}/ai_bom_jobs/{job_id}?version=text HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "data": {
    "attributes": {
      "status": "processing"
    },
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "relationships": {
      "ai_bom": {
        "data": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "type": "text"
        }
      }
    },
    "type": "ai_bom_job"
  },
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "first": "https://example.com/api/resource?ending_before=v1.eyJpZCI6IjExIn0K",
    "last": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjMwIn0K",
    "next": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjEwIn0K"
  }
}

Last updated

Was this helpful?