Production Versions API Code Samples
Selection of code samples that demonstrate the use of the Production Versions API. Copy and edit these code samples to suit your needs.
When using the code samples, remember to replace:
- {vanity_name} with your tenant name
- {api_key} with your API key
- {security_token} with a valid security token
These code samples may not include all available parameters and request body fields for each endpoint. For the endpoint's full request schema, see "Production Versions" in API Reference.
Retrieve a list of all production versions
Use this sample to retrieve all the production versions for your tenant.
curl GET --url 'https://{vanity_name}.api.visier.io/v1beta/admin/production-versions' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns the details of the production versions.
{
"publishedVersions": [
{
"id": "49cf48cd-7637-4153-b4c2-84f76586fed3",
"name": "Talent acquisition module implementation",
"description": "Implement a TA module as a SKU that we can offer to customers.",
"versionNumber": 39
},
{
"id": "37569c5f-aa29-46b6-a6cc-3bd84ddae5de",
"name": "Map requisition source data",
"description": "Map source data for requisitions to the corresponding analytic objects.",
"versionNumber": 38
}
]
}
Perform an operation on production versions
Use this sample to export the project changes of the requested production versions and their related files, such as any guidebook images. It exports the project changes for production versions between versions 27260db4-5d2d-49f3-90da-daf903fefb32 and f630cd00-6522-43d3-af26-d52831b03126, excluding versions c9f476b4-27c6-4aea-a0a2-c6c70141ed37 and 37569b5f-aa29-46b6-a6cc-3bd84ddae5de.
curl POST --url 'https://{vanity_name}.api.visier.io/v1beta/admin/production-versions' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type:application/json' \
-H 'Accept:application/zip'
-d '{
"operation": "export",
"exportParameters": {
"startVersion": "27260db4-5d2d-49f3-90da-daf903fefb32",
"endVersion": "f630cd00-6522-43d3-af26-d52831b03126",
"excludedVersions": [
"c9f476b4-27c6-4aea-a0a2-c6c70141ed37",
"37569b5f-aa29-46b6-a6cc-3bd84ddae5de"
]
}
}'
The response returns a ZIP file containing any relevant image files and a JSON file with the production project changes.
Perform an operation on a specific production version
Use this sample to roll back your production version to version f20b4700-7f61-4ff5-99cf-a8a24c3025a9
curl POST --url 'https://{vanity_name}.api.visier.io/v1beta/admin/production-versions/f20b4700-7f61-4ff5-99cf-a8a24c3025a9' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type:application/json' \
-H 'Accept:application/zip'
-d '{
"operation": "rollBackTo",
}'
The response returns the details of the roll back operation.
{
"rollBackTo": {
"id": "f20b4700-7f61-4ff5-99cf-a8a24c3025a9",
"name": "Map requisition source data - Rollback Project",
"description": "Map requisition source data - Rollback Project",
"capabilities": [
"owner"
]
}
}