curl --request GET \
--url https://api.diversion.dev/v0/repos/{repo_id}/branches \
--header 'Authorization: Bearer <token>'
{
"object": "Branch",
"items": [
{
"commit_id": "example_id",
"branch_name": "new-branch-name",
"branch_description": "A description of the branch",
"branch_id": "<string>",
"author": {
"image": "<string>",
"email": "jsmith@example.com",
"full_name": "<string>",
"id": "<string>",
"name": "<string>"
},
"time": 123
}
]
}
Get a list of all branches in the repo
curl --request GET \
--url https://api.diversion.dev/v0/repos/{repo_id}/branches \
--header 'Authorization: Bearer <token>'
{
"object": "Branch",
"items": [
{
"commit_id": "example_id",
"branch_name": "new-branch-name",
"branch_description": "A description of the branch",
"branch_id": "<string>",
"author": {
"image": "<string>",
"email": "jsmith@example.com",
"full_name": "<string>",
"id": "<string>",
"name": "<string>"
},
"time": 123
}
]
}
This API uses OAuth 2 with the implicit grant flow
The repo ID of the repository. Repo name can be used instead of the ID, but usage of ID for permanent linking and API requests is preferred.
3 - 128
"example_id"
Success
The response is of type object
.