Visual Git
Visual Git API are desinged to address the task of facilitating users in effortlessly synchronizing snapshots with the desired branch lines.
Sync snapshots
Request parameters
Curl Request
curl -sL -XPOST
--data '{"project_id": 4xxx25, "target_branch_filter": "feature-branch"}'
-H 'Content-Type: application/json'
-H "Authorization: Token token=$PROJECT_TOKEN"
-
project_id* String
The ID of your Percy project.
-
target_branch_filter* String
The name of the branch or branches that you want to sync the snapshots to.
-
snapshot_name_list String
A list of snapshot names that you want to sync. If this property is not provided, all snapshots from the master branch will be synced.
Response attributes 200 OK
JSON
Response
{
"data": {
"type": "branchline-histories",
"id": "30",
"attributes": {
"action": "synced",
"status": "running",
"reason": null,
"source-branch": "master",
"target-branch-filter": "*"
},
"relationships": {
"snapshots": {}
}
}
}
-
attributes Object
Details of test session.
-
action String
Displays
action
as synced. -
status String
Displays
status
as completed. -
reason String
Displays reason what status != running.
-
source-branch String
Branch name from which sync was performed (mostly base-branch).
-
target-branch-filter String
Branch name on which the sync happened.
-
-
relationships Object
Details of test session.
-
snapshots Object
Data of snapshots.
-
Sync status
Request parameters
Curl Request
`curl -sL -XGET -H 'Content-Type: application/json' -H "Authorization: Token token=$USER_ADMIN_TOKEN"
https://percy.io/api/v1/branchline/sync/{sync_id} | jq`
-
sync_id* String
ID of the sync operation that you want to check the status of.
Response attributes 200 OK
JSON
Response
{
"data": {
"type": "branchline-histories",
"id": "30",
"attributes": {
"action": "synced",
"status": "completed",
"reason": null,
"source-branch": "master",
"target-branch-filter": "*"
},
"relationships": {
"snapshots": {}
}
}
}
-
attributes Object
Details of test session.
-
action String
Displays
action
as synced. -
status String
Displays
status
as completed. -
reason String
Displays reason what status != running.
-
source-branch String
Branch name from which sync was performed (mostly base-branch).
-
target-branch-filter String
Branch name on which the sync happened.
-
-
relationships Object
Details of test session.
-
snapshots Object
Data of snapshots.
-
Merge snapshots
Request parameters
Curl Request
curl --request POST \
--url https://percy.io/api/v1/branchline/merge \
--header 'Authorization: Token token=$PROJECT_TOKEN' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--data '{ "data":{ "attributes":{}, "relationships":{ "build":{"data":{"type":"builds","id": "BUILD_ID"}}, }, "type":"branchline-histories"} }'
-
RAW_BODY* String
Replace BUILD_ID with the id of the build you want to merge.
Response attributes 200 OK
JSON
Response
{
"data": {
"type": "branchline-histories",
"id": "5",
"attributes": {
"action": "merged",
"status": "completed",
"reason": null,
"source-branch": "feature_1",
"target-branch-filter": "master"
},
"relationships": {
"snapshots": {}
}
}
}
-
attributes Object
Details of test session.
-
action String
Displays
action
as synced. -
status String
Displays
status
as running. -
reason String
Displays reason what status != running.
-
source-branch String
Branch name from which sync was performed (mostly base-branch).
-
target-branch-filter String
Branch name on which the sync happened.
-
-
relationships Object
Details of test session.
-
snapshots Object
Data of snapshots.
-
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.