AIBOM
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)
Org ID
Requested API version
2024-10-15
Pattern: ^(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))?))$
The request has been accepted for processing, but processing has not yet completed.
Bad Request: A parameter provided as a part of the request was invalid.
Not Found: The resource being operated on could not be found or you do not have permission to access it.
Internal Server Error: An error was encountered while attempting to process the request.
POST /rest/orgs/{org_id}/ai_boms 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 a AI-BOM once it's job has finished
Required permissions
View Organization (org.read)
Org ID
The ai_bom id
Requested API version
2024-10-15
Pattern: ^(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))?))$
Successful API response with a single resource
Not Found: The resource being operated on could not be found or you do not have permission to access it.
Internal Server Error: An error was encountered while attempting to process the request.
GET /rest/orgs/{org_id}/ai_boms/{ai_bom_id} 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"
}
}
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)
Org ID
The job id
Requested API version
2024-10-15
Pattern: ^(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))?))$
Successful API response with a single resource
Redirect to another resource after async processing.
Not Found: The resource being operated on could not be found or you do not have permission to access it.
Internal Server Error: An error was encountered while attempting to process the request.
GET /rest/orgs/{org_id}/ai_bom_jobs/{job_id} 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?