Branches Management API reference
Complete reference documentation for the Branches resource.
Branches
#Branches are a way to isolate changes to your Knock resources.
List branches
#Returns a paginated list of branches. The branches will be returned in order of their last commit time (newest first).
Endpoint
Query parameters
The environment slug.
The cursor to fetch entries after.
The cursor to fetch entries before.
The number of entries to fetch per-page.
Returns
A paginated list of Branch. Contains a list of entries and page information.
A list of entries.
The timestamp of when the branch was created.
The timestamp of when the branch was deleted.
The timestamp of the most-recent commit in the branch.
A unique slug for the branch. Cannot exceed 255 characters.
The timestamp of when the branch was last updated.
The information about a paginated result.
The cursor to fetch entries after. Will only be present if there are more entries to fetch.
The cursor to fetch entries before. Will only be present if there are more entries to fetch before the current page.
The number of entries to fetch per-page.
Delete a branch
#Deletes a branch by the branch_slug.
Endpoint
Path parameters
The slug of the branch to delete.
Query parameters
The environment slug.
Returns
Get a branch
#Returns a single branch by the branch_slug.
Endpoint
Path parameters
The slug of the branch to retrieve.
Query parameters
The environment slug.
Returns
A branch object.
The timestamp of when the branch was created.
The timestamp of when the branch was deleted.
The timestamp of the most-recent commit in the branch.
A unique slug for the branch. Cannot exceed 255 characters.
The timestamp of when the branch was last updated.
Create a branch
#Creates a new branch off of the development environment with the given slug.
Endpoint
Path parameters
The slug for the new branch to create.
Query parameters
The environment slug.
Returns
A branch object.
The timestamp of when the branch was created.
The timestamp of when the branch was deleted.
The timestamp of the most-recent commit in the branch.
A unique slug for the branch. Cannot exceed 255 characters.
The timestamp of when the branch was last updated.
Branch
#A branch object.
Attributes
The timestamp of when the branch was created.
The timestamp of when the branch was deleted.
The timestamp of the most-recent commit in the branch.
A unique slug for the branch. Cannot exceed 255 characters.
The timestamp of when the branch was last updated.