Authorization: Bearer header. See
Authentication for private keys and token signing.
Base config
SetPIERRE_ORG to your organization name. For the default domain, set the API base URL as shown:
/api suffix is the
common path prefix; the examples append paths such as /meta to it.
The organization settings page in the dashboard shows your exact API host and Git host. The OpenAPI
document declares the server https://api.{org}.code.storage. Here, {org} is the subdomain of
your API host, which is usually your organization name. Every operation path starts with /api.
Replace YOUR_JWT_TOKEN with a token from the
signing examples. Send it in the Authorization
header:
Requests and responses
Use the method, path, and content types shown on the endpoint page. Responses can contain JSON, file content, archives, or diffs. Check the response status and content type before you read its body. Use the current endpoints for new integrations.Pagination
For endpoints that support cursor pagination, uselimit to request a page size and cursor to
continue a previous request. Defaults, maximum page sizes, and result fields vary by endpoint.
When a response includes has_more and next_cursor:
- Read the results from the response field documented for that endpoint.
- If
has_moreistrue, passnext_cursoras the next request’scursor. Keep other filters unchanged. - Stop when
has_moreisfalse.
Error handling
Errors use RFC 9457 problem details with theapplication/problem+json content type:
codeis a stable, snake_case value. Branch oncode.detailis a message for people. Its text can change.errorrepeatsdetailfor older clients.
Error codes
Each HTTP status has a generic code. A specific code replaces it when you must take a different action. New codes can be added. Treat an unknown code as the generic code for its status. Generic codes:
Specific codes:
github_repository_inaccessible uses 412, or the 4xx status that GitHub returns, for example 422.
The “Error codes” section of the OpenAPI document description has the same list.
Resolve authentication errors
A401 means that the request has no supported credential. A 403 with the detail
Invalid or expired token means that Code Storage cannot verify the token.
Resolve token errors lists each cause and the
400, 403, and 404 responses for scopes and the repo claim.