BytesafeDependency Firewall

API

The management API under /v1/<namespace-id>. Endpoints for configuration, rules, exceptions, logs, metrics, observations, audit, webhooks, tokens, teams, and Trusted Builders.

The management API is what the dashboard and the CLI use. Everything lives under the namespace ID prefix:

https://eu-sov-1.bytesafecloud.eu/v1/<namespace-id>/...

Package traffic (the ecosystem protocol endpoints under /npm/, /pypi/, /maven/, /nuget/, /go/, /conda/) shares the same prefix and authentication; those endpoints are documented per ecosystem. This page covers the management surface.

Authentication

Every endpoint except the OIDC exchange requires a token in the Authorization header, Bearer or basic auth; formats, interaction ID suffix, and the credential envelope are in the tokens reference. Endpoints enforce the permissions noted below; all of them additionally require ns:access.

Responses are JSON. Errors carry a requestId for correlation with logs.

Configuration

Method and pathDescriptionPermission
GET /configList firewallsfw:read per firewall
GET /config/<firewall-id>Full config, credentials redactedfw:read
PUT /config/<firewall-id>Upsert full config; creates when the ID is new. The ID must be a valid firewall ID. Plaintext credentials rejected. On create, accepts an owner team in the body and defaults the permissions map when omittedfw:update:config (+fw:create for new)
DELETE /config/<firewall-id>Delete the firewall. 409 when other firewalls inherit from itfw:delete
GET /config/<firewall-id>/historyLast 20 config versionsfw:read
PUT /config/<firewall-id>/version/{version}Roll back to a recorded version; creates a new version. 404 for a version not in historyfw:update:config
PUT /config/<firewall-id>/upstreams/{id}/credentialsSet upstream credentials, plaintext body, per-field mergefw:update:credentials

Config upserts and rollbacks reject an unknown ecosystem, invalid upstream settings, unparseable version ranges, and selector functions that do not support the firewall's ecosystem. A parentId must also name an existing same-ecosystem firewall without creating a cycle (inheritance), and a changed permissions map must not lock the firewall out of management (lockout guard). These validation failures return 400.

Rules and exceptions

Granular alternatives to a full config upsert:

Method and pathDescriptionPermission
GET /config/<firewall-id>/rulesList rulesfw:read
PUT /config/<firewall-id>/rules/{id}Upsert one rulefw:update:rule
DELETE /config/<firewall-id>/rules/{id}Delete one rulefw:update:rule
GET /config/<firewall-id>/exceptionsList exceptionsfw:read
PUT /config/<firewall-id>/exceptions/{id}Upsert one exceptionfw:update:exception
DELETE /config/<firewall-id>/exceptions/{id}Delete one exceptionfw:update:exception

Rule and exception upserts reject an unparseable version range or a selector function that does not support the firewall's ecosystem.

License sets

Named lists of SPDX license IDs, referenced by license selector rules. See Enforce license policy.

Method and pathDescriptionPermission
GET /license-setsList license setsnone beyond ns:access
POST /license-setsCreate one (name, description, licenses)ns:update:licenses
PUT /license-sets/{licenseSet}Updatens:update:licenses
DELETE /license-sets/{licenseSet}Delete. 409 while any firewall rule references itns:update:licenses

Logs, metrics, observations, audit

Method and pathDescription
GET /logQuery firewall log entries, newest first. Params: firewall, user, allUsers, search, limit (default 100, max 1000), before (opaque cursor). Returns {entries, nextCursor}. Defaults to the caller's own entries; see Logs
GET /log/streamServer-sent events: last 10 entries, then new ones live. Same params
GET /metricsNamespace metrics. Params: periodMinutes (default 1440, max 43200), bucketMinutes (rollup size, max 1440). See Metrics
GET /metrics/firewall/<firewall-id>Same shape for one firewall
GET /observationsPackage usage inventory. Params: firewall, period (today, 7d, 30d, 90d), pageSize, pageToken. See Observations
GET /auditAudit events. Params: action, resourceType, resourceId, actorUserId, outcome, from, to, limit (max 1000), offset. See Audit log

Webhooks

Push firewall, audit, configuration, and publish events to your own systems; wire format and delivery behavior in the webhooks reference, setup in Receive webhook events.

Method and pathDescriptionPermission
GET /webhooksList webhooks, secrets redactednone beyond ns:access
POST /webhooksCreate (name, description, url, enabled, eventTypes, optional firewalls scope). The 201 response carries the plaintext signing secretns:update:webhooks
GET /webhooks/{webhook}Detail, secret redactednone beyond ns:access
PUT /webhooks/{webhook}Update configuration; the secret is untouchedns:update:webhooks
DELETE /webhooks/{webhook}Delete the webhook and its buffered eventsns:update:webhooks
GET /webhooks/{webhook}/secretThe decrypted signing secret, plus the previous secret during its 24-hour rotation windowns:update:webhooks
POST /webhooks/{webhook}/rotate-secretGenerate a new secret immediately; the old one keeps verifying for 24 hoursns:update:webhooks
POST /webhooks/{webhook}/testSend one signed test event synchronously, optional body {"type": ...}; returns status, response body, and durationns:update:webhooks
POST /webhooks/{webhook}/unquarantineRelease a quarantined webhook; delivery resumes immediatelyns:update:webhooks
GET /webhooks/{webhook}/deliveriesDelivery records. Params: limit (default 50, max 128), offsetnone beyond ns:access
GET /webhooks/{webhook}/deliveries/{delivery}One delivery with full payload and endpoint responsenone beyond ns:access
GET /webhooks/{webhook}/metricsDelivery metrics. Param periodMinutes (max 10080)none beyond ns:access

Tokens and identity

Method and pathDescriptionPermission
GET /whoamiThe calling identity and its permissionsany
GET /tokens/personalList your own Personal Access Tokensany
POST /tokens/personalCreate a PAT (name, validForHours, optional permissions, firewalls)ns:create:pat
GET /tokens/serviceList Service Access Tokensns:create:service-token
POST /tokens/serviceCreate a SAT (same body shape)ns:create:service-token
DELETE /tokens/{token}Revoke a token by deleting it; it stops validating immediately. Own PAT: always allowed. SAT: ns:create:service-token. Another user's PAT: team:updatesee description

Teams

Method and pathDescriptionPermission
GET /teamsList teamsteam:read
POST /teamsCreate a teamteam:update
PUT /teams/{team}Update name, description, permissionsteam:update
DELETE /teams/{team}Delete a teamteam:delete
GET /teams/{team}/membersList membersteam:read
POST /teams/{team}/membersAdd a memberteam:update:membership
DELETE /teams/{team}/members/{userId}Remove a memberteam:update:membership

Trusted Builders and OIDC

Method and pathDescriptionPermission
GET /trusted-buildersList Trusted Buildersns:create:service-token
POST /trusted-buildersRegister one (name, repositoryOwner, repository, repositoryId, permissions, firewalls, enabled)ns:create:service-token
PUT /trusted-builders/{builder}Updatens:create:service-token
DELETE /trusted-builders/{builder}Deletens:create:service-token
POST /oidc/exchangeExchange a GitHub OIDC ID token ({"idToken": ...}) for a 15-minute SAT. Unauthenticatednone

Advisories

Method and pathDescription
GET /advisories/{purl}Vulnerability advisories for a package URL

On this page