Skip to main content
PUT
/
api
/
repos
/
{namespace}
/
{repo_name}
/
branches
/
{branch_name}
Update a branch to a new commit
curl --request PUT \
  --url https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/branches/{branch_name} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "commit_id": "84c76a5b2e9a2637f9091991475c404d"
}
'
{
  "status": "<string>",
  "status_message": "<string>",
  "branch": {
    "commit_id": "<string>",
    "name": "<string>"
  },
  "oxen_version": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

namespace
string
required

Namespace of the repository

repo_name
string
required

Name of the repository

branch_name
string
required

Name of the branch to update

Body

application/json

The commit ID to update the branch head to.

commit_id
string
required

Response

Branch updated

status
string
required
status_message
string
required
branch
object
required
oxen_version
string | null