curl --request POST \
--url https://api.example.com/api/projects/{projectId}/branches/{branchId}/revert \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"branchName": "<string>",
"commitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"default": true,
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"baseCommitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdById": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"changeRequests": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"type": "<string>",
"branchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}Creates a new branch that reverts the project state to a specific commit.
curl --request POST \
--url https://api.example.com/api/projects/{projectId}/branches/{branchId}/revert \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"branchName": "<string>",
"commitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"default": true,
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"baseCommitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdById": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>"
},
"changeRequests": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"type": "<string>",
"branchId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}Personal access token is obtained through your profile
Project ID
Branch ID or "main" for the default branch
The newly created revert branch
The newly created revert branch
Branch ID
Branch name
Whether this is the default (main) branch
Project ID
Base commit ID
ID of user who created the branch
Creation timestamp
Last update timestamp
User who created the branch
Show child attributes
Pending change requests
Show child attributes
Was this page helpful?