OpenAPI
About 210 wordsLess than 1 minute
Open API is CNB's public HTTP interface, covering code hosting, organization members, pipelines, artifact repositories and more, for third-party systems to integrate with or scripts to call.
When to use: when an external system needs to read or write CNB resources — for example, syncing repositories and members to your own platform, creating issues in bulk with a script, or writing build results back to a business system. The platform also provides CNB CLI and Skills to call these interfaces from the command line or an AI assistant.
API Service Address
The API service and documentation address is https://api.cnb.build.
API Documentation Addresses
- OpenAPI documentation page:
https://api.cnb.build(Open in new window) - Swagger JSON:
https://api.cnb.build/swagger.json(Open in new window)
Calling Methods
Header Information
Authorization: Used for authentication, format:Bearer ${token}, where${token}is the access token.Accept: Fill in the corresponding value based on the optional types listed under Response content type in the API documentation, e.g.application/json.
Request Example
curl request example:
curl -X "GET" \
-H "accept: application/json" \
-H "Authorization: Bearer 1Z00000000000000000000000vA" \
"https://api.cnb.build/user/groups?page=1&page_size=10"For repository events related APIs, see Repository Events.