CodeCollections are Git repositories that contain codebundles — reusable troubleshooting and automation scripts used by SLIs, SLOs, and Runbooks. The API provides read-only access to browse collections, branches, and codebundle metadata.
List CodeCollections
Retrieve all code collections available on the platform.
|
|
|
|---|---|
|
Method |
|
|
Path |
|
|
Auth |
Bearer token required |
Query Parameters
|
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
|
integer |
No |
Page number for pagination |
Response 200 OK
{
"count": 5,
"next": null,
"previous": null,
"results": [
{
"name": "rw-cli-codecollection",
"repoUrl": "https://github.com/runwhen-contrib/rw-cli-codecollection",
"createdAt": "2026-01-01T00:00:00Z"
}
]
}
Get CodeCollection Detail
Retrieve details of a specific code collection.
|
|
|
|---|---|
|
Method |
|
|
Path |
|
|
Auth |
Bearer token required |
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
string |
The name of the code collection |
Response 200 OK
Returns the full code collection object with repository metadata.
Get CodeCollection Sync Status
Check the synchronization status of a code collection with its upstream Git repository.
|
|
|
|---|---|
|
Method |
|
|
Path |
|
|
Auth |
Bearer token required |
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
string |
The name of the code collection |
Response 200 OK
Returns the current sync state of the code collection.
Get CodeCollection Branch
Retrieve information about a specific branch of a code collection.
|
|
|
|---|---|
|
Method |
|
|
Path |
|
|
Auth |
Bearer token required |
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
string |
The name of the code collection |
|
|
string |
The branch name (e.g., |
Response 200 OK
Returns branch metadata and available codebundles.
Get Repository Content
Browse the file tree of a code collection branch.
|
|
|
|---|---|
|
Method |
|
|
Path |
|
|
Auth |
Bearer token required |
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
string |
The name of the code collection |
|
|
string |
The branch name |
|
|
string |
File or directory path within the repository |
Response 200 OK
Returns the file or directory listing at the specified path.
List SLXs in Branch
Retrieve all SLX definitions available in a code collection branch.
|
|
|
|---|---|
|
Method |
|
|
Path |
|
|
Auth |
Bearer token required |
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
string |
The name of the code collection |
|
|
string |
The branch name |
Response 200 OK
Returns a list of SLX definitions found in the specified branch.
Get Codebundle Stats
Retrieve statistics about codebundles in a code collection (e.g., usage counts, version info).
|
|
|
|---|---|
|
Method |
|
|
Path |
|
|
Auth |
Bearer token required |
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
string |
The name of the code collection |
Response 200 OK
Returns codebundle statistics for the collection.
Parse Codebundle
Parse a codebundle from a Git repository to extract its metadata and configuration.
|
|
|
|---|---|
|
Method |
|
|
Path |
|
|
Auth |
Bearer token required |
Query Parameters
|
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
|
string |
No |
The Git repository URL |
|
|
string |
No |
The branch or tag reference |
|
|
string |
No |
Path to the codebundle within the repository |
Response 200 OK
Returns the parsed codebundle metadata including tasks, parameters, and dependencies.