The DepAegis REST API provides programmatic access to packages, organizations, tokens, scan results, and SBOMs. All endpoints use JSON for request and response bodies.
All API requests are made to the DepAegis API:
https://app.depaegis.com/api/v1All API endpoints require authentication via a bearer token in the Authorization header:
Authorization: Bearer depa_tok_abc123def456...Create tokens via the DepAegis dashboard (Settings → Access Tokens) or programmatically using the POST /api/v1/tokens endpoint.
DELETE /api/v1/tokens/:id.GET /api/v1/packagesReturns a paginated list of all packages the authenticated user can access.
| Parameter | Type | Description |
|---|---|---|
cursor | string | Pagination cursor from a previous response |
limit | integer | Number of results per page (default: 50, max: 200) |
org | string | Filter by organization scope |
type | string | Filter by package format: npm, nuget, oci |
# Example request
curl -H "Authorization: Bearer $TOKEN" \
"https://app.depaegis.com/api/v1/packages?limit=10&org=myorg"
# Response
{
"items": [
{
"name": "@myorg/ui-components",
"type": "npm",
"org": "myorg",
"latestVersion": "2.1.0",
"createdAt": "2026-01-15T10:30:00Z"
}
],
"cursor": "eyJpZCI6MTAwfQ==",
"hasMore": true
}GET /api/v1/packages/:nameReturns metadata for a specific package including all versions.
# Example
curl -H "Authorization: Bearer $TOKEN" \
"https://app.depaegis.com/api/v1/packages/@myorg%2Fui-components"@myorg/package becomes @myorg%2Fpackage.GET /api/v1/packages/:name/versionsReturns all published versions of a package.
| Parameter | Type | Description |
|---|---|---|
cursor | string | Pagination cursor from a previous response |
limit | integer | Number of results per page (default: 50, max: 200) |
DELETE /api/v1/packages/:name/versions/:versionPermanently deletes a specific version. Requires admin or ownerrole in the package's organization.
curl -X DELETE \
-H "Authorization: Bearer $TOKEN" \
"https://app.depaegis.com/api/v1/packages/@myorg%2Fui-components/versions/1.0.0"GET /api/v1/orgsReturns all organizations the authenticated user belongs to.
GET /api/v1/orgs/:org/membersReturns members of an organization. Requires member role or higher.
# Example response
{
"items": [
{
"userId": "usr_abc123",
"email": "alice@example.com",
"role": "owner",
"joinedAt": "2025-06-01T08:00:00Z"
},
{
"userId": "usr_def456",
"email": "bob@example.com",
"role": "publisher",
"joinedAt": "2025-08-15T14:30:00Z"
}
]
}POST /api/v1/tokensCreates a new personal access token. The raw token value is returned only once in the response.
# Request
{
"name": "ci-publish-token",
"scope": "publish",
"expiresIn": "30d"
}
# Response
{
"id": "tok_abc123",
"name": "ci-publish-token",
"scope": "publish",
"token": "depa_tok_abc123def456...",
"expiresAt": "2026-07-11T00:00:00Z",
"createdAt": "2026-06-11T00:00:00Z"
}token field in the response is shown only once. Store it immediately. There is no way to retrieve it later.DELETE /api/v1/tokens/:idRevokes a token by its ID. Any subsequent requests using the revoked token will return 401 Unauthorized.
curl -X DELETE \
-H "Authorization: Bearer $TOKEN" \
"https://app.depaegis.com/api/v1/tokens/tok_abc123"GET /api/v1/packages/:name/scanReturns vulnerability scan results for the latest version of a package. Use the version query parameter to scan a specific version.
| Parameter | Type | Description |
|---|---|---|
version | string | Package version (default: latest) |
# Response
{
"package": "@myorg/ui-components",
"version": "2.1.0",
"scannedAt": "2026-06-11T12:00:00Z",
"status": "completed",
"vulnerabilities": [
{
"id": "CVE-2026-12345",
"severity": "high",
"summary": "Prototype pollution in dependency",
"affectedRange": "<2.0.0",
"fixedIn": "2.0.1"
}
],
"summary": {
"critical": 0,
"high": 1,
"medium": 2,
"low": 0
}
}GET /api/v1/packages/:name/sbomDownloads the Software Bill of Materials for a package in CycloneDX format. Accepts an optional version query parameter.
curl -H "Authorization: Bearer $TOKEN" \
"https://app.depaegis.com/api/v1/packages/@myorg%2Fui-components/sbom?version=2.1.0" \
-o sbom.jsonList endpoints use cursor-based pagination. Each response includes a cursor field and a hasMore boolean:
{
"items": [...],
"cursor": "eyJpZCI6MTAwfQ==",
"hasMore": true
}Pass the cursor value as a query parameter in the next request to fetch the next page. When hasMore is false, there are no more results.
# First page
GET /api/v1/packages?limit=10
# Next page
GET /api/v1/packages?limit=10&cursor=eyJpZCI6MTAwfQ==Errors are returned as JSON with a consistent structure:
{
"error": {
"code": "PACKAGE_NOT_FOUND",
"message": "Package '@myorg/missing-pkg' not found",
"details": {
"name": "@myorg/missing-pkg"
}
}
}| HTTP Status | Error Code | Description |
|---|---|---|
400 | INVALID_REQUEST | Malformed request body or missing required fields |
401 | UNAUTHORIZED | Missing, invalid, or expired authentication token |
403 | FORBIDDEN | Insufficient permissions for the requested operation |
404 | NOT_FOUND | Requested resource does not exist |
409 | CONFLICT | Resource already exists (e.g., version already published) |
429 | RATE_LIMITED | Too many requests. Retry after the time in Retry-After header. |
500 | INTERNAL_ERROR | Unexpected server error. Contact support with the request timestamp if it persists. |
The API enforces rate limits to protect the service. Rate limit headers are included in every response:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 995
X-RateLimit-Reset: 1718100000| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum number of requests allowed in the current window |
X-RateLimit-Remaining | Number of requests remaining in the current window |
X-RateLimit-Reset | Unix timestamp when the rate limit window resets |
Retry-After | Seconds until the rate limit resets (only present on 429 responses) |
Default rate limits by token scope:
| Scope | Limit | Window |
|---|---|---|
read | 1,000 requests | 1 minute |
publish | 500 requests | 1 minute |
admin | 200 requests | 1 minute |