Object Configuration API Code Samples
Selection of code samples that demonstrate the use of the Object Configuration 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 "Object Configuration" in API Reference.
Calculation concepts
This section provides sample requests for calculation concept requests.
Retrieve all calculation concepts
Use this sample request to get all the calculation concepts available in production.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/admin/calculation-concepts' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns details about each calculation concept, including its uuid and name.
{
"concepts": [
{
"uuid": "87752ef2-e89e-4303-b1eb-2ecd58ec22ad",
"name": "Employee Exit Model"
},{
"uuid": "5bbc79b9-231a-4e3e-a10e-f8e1da72638c",
"name": "Total Cost of Workforce"
},{
"uuid": "9c6b866e-a39a-4b82-9cf9-0ac688e74cb8",
"name": "Employee Starts Model"
}
]
}
Retrieve the configuration of a calculation concept
Use this sample request to get the details of a specific calculation concept's configuration.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/admin/calculation-concepts/87752ef2-e89e-4303-b1eb-2ecd58ec22ad \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns configuration details about the calculation concept, including its perspectives and analyticObjectFilters.
{
"uuid": "87752ef2-e89e-4303-b1eb-2ecd58ec22ad",
"name": "Employee Exit Model",
"configuration": {
"perspectives": [
{
"perspectiveId": "5151c931-48e8-4918-a22e-f83f3918a8c4",
"perspectiveName": "Actual",
"perspectiveNodes": [
{
"selectionConceptUuid": "d0b056fc-3d27-46fb-9289-7cf7f1ba80ab",
"symbolName": "isExitActualSystemTermination",
"analyticObjectFilters": [
{
"analyticObjectUuid": "46c4f53a-fca9-455d-9fd1-47e5fadf1474",
"symbolName": "Employee_Exit",
"dimensions": [
{
"dimensionId": "582769d6-8b51-3673-b2ed-2c12de33daad",
"symbolName": "Termination_Reason"
}
]
}
]
},
{
"selectionConceptUuid": "76ae5301-4163-439a-ab02-e8441f65b93f",
"symbolName": "isExitActualReductionInForce",
"analyticObjectFilters": [
{
"analyticObjectUuid": "46c4f53a-fca9-455d-9fd1-47e5fadf1474",
"symbolName": "Employee_Exit",
"dimensions": [
{
"dimensionId": "582769d6-8b51-3673-b2ed-2c12de33daad",
"symbolName": "Termination_Reason"
}
]
}
]
}
]
}
]
}
}
Map dimension members to nodes in a calculation concept
Use this sample request to configure a calculation concept.
curl -X PUT --url 'https://{vanity_name}.api.visier.io/v1/admin/calculation-concepts/87752ef2-e89e-4303-b1eb-2ecd58ec22ad/configure \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json'
-d '{
"perspectivesToMap": [{
"perspectiveId": "5151c931-48e8-4918-a22e-f83f3918a8c4",
"perspectiveNodes": [{
"selectionConceptUuid": "4fcd0a59-dc1d-46ce-be04-a7559ac89f97",
"symbolName": "isExitActualResignation",
"analyticObjectFilters": [{
"analyticObjectUuid": "46c4f53a-fca9-455d-9fd1-47e5fadf1474",
"dimensions": [{
"dimensionId": "582769d6-8b51-3673-b2ed-2c12de33daad",
"dimensionMembers": [{
"dimensionMember": ["Resignation"]
},{
"dimensionMember": ["Other Exit"]
}]
}]
}]
}]
}]
}’
The response returns the configured concept's ID, the project ID that was published to production, and a message about the request.
{
"conceptId": "87752ef2-e89e-4303-b1eb-2ecd58ec22ad",
"projectId": "931efe83-8e3c-4b87-8cbf-156bafc13524",
"message": "Published concept changes"
}
Selection concepts
This section provides sample requests for selection concept requests.
Retrieve all selection concepts
Use this sample request to get all the selection concepts available in production.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/admin/selection-concepts' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns details about each selection concept, including its uuid and name.
{
"concepts": [
{
"uuid": "6413a8b7-5e58-45ac-b513-ffcc9928b9ee",
"name": "Sales"
},{
"uuid": "e9cca02f-dec7-4409-8e61-af9a1a4f5f07",
"name": "Passive Candidate"
}
]
}
Retrieve the configuration of a selection concept
Use this sample request to get the details of a specific selection concept's configuration.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/admin/selection-concepts/8c03c1b0-42e7-4d0e-8f64-1fee64962739 \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns configuration details about the calculation concept, including its name and analyticObjectFilters.
{
"uuid": "8c03c1b0-42e7-4d0e-8f64-1fee64962739",
"name": "Total Hours Paid",
"configuration": {
"analyticObjectFilters": [
{
"analyticObjectUuid": "2a4463ee-6dd0-452a-bbb1-4fe10e48d411",
"symbolName": "Compensation_Payout",
"dimensions": [
{
"dimensionId": "84008324-22ac-4418-ac6c-c3001a44d9c1",
"symbolName": "Payout_Type"
}
]
}
]
}
}
Map dimension members to a selection concept
Use this sample request to configure a selection concept.
curl -X PUT --url 'https://{vanity_name}.api.visier.io/v1/admin/selection-concepts/8c03c1b0-42e7-4d0e-8f64-1fee64962739/configure \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json'
-d '{
"analyticObjectFiltersToMap": [{
"analyticObjectUuid": "2a4463ee-6dd0-452a-bbb1-4fe10e48d411",
"dimensions": [{
"dimensionId": "84008324-22ac-4418-ac6c-c3001a44d9c1",
"dimensionMembers": [{
"dimensionMember": ["Level 5"]
}, {
"dimensionMember": ["Level 4"]
}]
}]
}]
}’
The response returns the configured concept's ID, the project ID that was published to production, and a message about the request.
{
"conceptId": "87752ef2-e89e-4303-b1eb-2ecd58ec22ad",
"projectId": "931efe83-8e3c-4b87-8cbf-156bafc13524",
"message": "Published concept changes"
}