Project API
API to manage projects, versions, and documents in Ketryx
Ketryx exposes an API to manage projects programmatically. There is also a formal OpenAPI specification defining this API, and a separate page about authentication and API keys.
Projects
Gets a list of Ketryx projects in the current organization.
Project name to filter for
Start listing projects at the given index. Defaults to 0.
Maximum number of projects to return. Defaults to no limit.
GET /api/v1/projects HTTP/1.1
Host: app.ketryx.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"projects": [
{
"id": "text",
"name": "text"
}
]
}
Name of the new project
My project
POST /api/v1/projects HTTP/1.1
Host: app.ketryx.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 127
{
"name": "My project",
"repositories": [
{
"url": "text",
"mainRef": "text",
"releaseRef": "text",
"authUser": "text",
"authToken": "text"
}
]
}
{
"id": "text"
}
Project
GET /api/v1/projects/{projectId} HTTP/1.1
Host: app.ketryx.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"name": "text",
"repositories": [
{
"url": "text",
"mainRef": "text",
"releaseRef": "text",
"hasAuth": true
}
]
}
Object with advanced setting names as keys and a JSON value for each setting
{ "statusMapping": { "Backlog": "OPEN", "Done": "RESOLVED" } }
POST /api/v1/projects/{projectId} HTTP/1.1
Host: app.ketryx.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 193
{
"repositories": [
{
"url": "text",
"mainRef": "text",
"releaseRef": "text",
"authUser": "text",
"authToken": "text"
}
],
"settings": "{ \"statusMapping\": { \"Backlog\": \"OPEN\", \"Done\": \"RESOLVED\" } }"
}
{
"id": "text"
}
DELETE /api/v1/projects/{projectId} HTTP/1.1
Host: app.ketryx.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Versions
Gets a list of versions in the given project.
GET /api/v1/projects/{projectId}/versions HTTP/1.1
Host: app.ketryx.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"versions": [
{
"id": "text",
"name": "text"
}
]
}
My project
POST /api/v1/projects/{projectId}/versions HTTP/1.1
Host: app.ketryx.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 21
{
"name": "My project"
}
{
"id": "text"
}
Version
POST /api/v1/projects/{projectId}/versions/{versionId} HTTP/1.1
Host: app.ketryx.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 224
{
"name": "text",
"referencedVersions": [
{
"project": {
"id": "KXPRJ49GQYFQ5RR9KRTPWTRTC39YZ9W"
},
"version": {
"id": "KXPRJ49GQYFQ5RR9KRTPWTRTC39YZ9W"
}
}
],
"repositorySettings": [
{
"url": "text",
"releaseRefPattern": "refs/tags/version-1.0"
}
]
}
DELETE /api/v1/projects/{projectId}/versions/{versionId} HTTP/1.1
Host: app.ketryx.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Generated documents
Use this API to generate and download the SBOM document for a given project. Optionally, a certain version ID can be specified:
If no
versionId
is specified, the document for the "current draft" state (corresponding to the main analyzed branch, not specific to a certain version) is downloaded.If a
versionId
is specified, the document is generated for the given version (and its corresponding release ref).
By default, the response is an Excel file in binary form (xslx
). Optionally, a format
parameter with value cyclonedx
can be used to generate and download the SBOM document in CycloneDX JSON format (specifically, CyclonedX version 1.5).
Ketryx version ID. If not specified, defaults to using the "current draft" state.
SBOM format to return. Defaults to "xslx".
cyclonedx
Possible values: GET /api/v1/projects/{projectId}/generated-documents/sbom HTTP/1.1
Host: app.ketryx.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Last updated
Was this helpful?