Data Query API Code Samples

Selection of code samples that demonstrate the use of the Data Query 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 "Data Query" in API Reference.

Basic aggregate query

Headcount query

This sample request retrieves 1 month of Headcount data up to January 1, 2021. It does not use any group bys or filters.

POST /v1/data/query/aggregate

Copy
curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/aggregate' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{   
    "query": {
        "source": {
            "metric": "employeeCount"
        },
        "timeIntervals": {
            "fromDateTime": "2021-01-01"
        }
    }
}'
Copy
import requests
import json

url = 'https://{vanity_name}.api.visier.io/v1/data/query/aggregate'
headers = {
    'apikey': '{api_key}',
    'Cookie': 'VisierASIDToken={security_token}',
    'Content-Type': 'application/json'
}
data = {
    "query": {
        "source": {"metric": "employeeCount"},
        "timeIntervals": {"fromDateTime": "2021-01-01"}
    }
}

response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())
Copy
const fetch = require('node-fetch');

const data = JSON.stringify({
    query: {
        source: { metric: 'employeeCount' },
        timeIntervals: { fromDateTime: '2021-01-01' }
    }
});

fetch('https://{vanity_name}.api.visier.io/v1/data/query/aggregate', {
    method: 'POST',
    headers: {
        'apikey': '{api_key}',
        'Cookie': 'VisierASIDToken={security_token}',
        'Content-Type': 'application/json'
    },
    body: data
})
.then(response => response.json())
.then(json => console.log(json))
.catch(error => console.error('Error:', error));

POST /v1/data/query/sql

Copy
curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/sql' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{
    "query": "SELECT employeeCount(), Visier_Time, level(Function, \"Function\") FROM Employee WHERE Visier_Time IN periods(date(\"2021-01-01\"), 1, period(1, Month)) AND Permanent IN (\"True\")"
}'
Copy
import requests
import json

url = 'https://{vanity_name}.api.visier.io/v1/data/query/sql'
headers = {
    'apikey': '{api_key}',
    'Cookie': 'VisierASIDToken={security_token}',
    'Content-Type': 'application/json'
}
data = {
    "query": 'SELECT employeeCount(), Visier_Time, level(Function, "Function") FROM Employee WHERE Visier_Time IN periods(date("2021-01-01"), 1, period(1, Month)) AND Permanent IN ("True")'
}

response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())
Copy
const fetch = require('node-fetch');
const data = JSON.stringify({
query: 'SELECT employeeCount(), Visier_Time, level(Function, "Function") FROM Employee WHERE Visier_Time IN periods(date("2021-01-01"), 1, period(1, Month)) AND Permanent IN ("True")'});
fetch('https://{vanity_name}.api.visier.io/v1/data/query/sql', {
    method: 'POST',
    headers: {
        'apikey': '{api_key}',
        'Cookie': 'VisierASIDToken={security_token}',
        'Content-Type': 'application/json'
    },
    body: data
})
.then(response => response.json())
.then(json => console.log(json))
.catch(error => console.error('Error:', error));

Aggregate query with filters

Headcount query filtered by Permanent employees

This sample request retrieves 1 month of data for Headcount filtered by Permanent employees up to January 1, 2021. The data is grouped by Function.

POST /v1/data/query/aggregate

Copy
curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/aggregate' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{   
    "query": {
        "source": {
            "metric": "employeeCount"
        },
        "timeIntervals": {
            "fromDateTime": "2021-01-01"
        },
        "filters": [{
            "memberSet": {
                "dimension": {
                    "name": "Permanent",
                    "qualifyingPath": "Employee"
                },
                "values": {
                    "included": [{
                        "path": ["True"]
                    }]
                }
            }
        }],
        "axes": [
            {
                "dimensionLevelSelection": {
                    "dimension": {
                        "name": "Function",
                        "qualifyingPath": "Employee"
                    },
                    "levelIds": [
                        "Function"
                    ]
                }
            }
        ]
    }
}'
Copy
import requests
import json

url = 'https://{vanity_name}.api.visier.io/v1/data/query/aggregate'
headers = {
    'apikey': '{api_key}',
    'Cookie': 'VisierASIDToken={security_token}',
    'Content-Type': 'application/json'
}
data = {
    "query": {
        "source": {"metric": "employeeCount"},
        "timeIntervals": {"fromDateTime": "2021-01-01"},
        "filters": [{
            "memberSet": {
                "dimension": {
                    "name": "Permanent",
                    "qualifyingPath": "Employee"
                },
                "values": {
                    "included": [{"path
                    : ["True"]}]
                }
            }
        }],
        "axes": [{
            "dimensionLevelSelection": {
                "dimension": {
                    "name": "Function",
                    "qualifyingPath": "Employee"
                },
                "levelIds": ["Function"]
            }
        }]
    }
}

response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())
Copy
const fetch = require('node-fetch');

const data = JSON.stringify({
    query: {
        source: { metric: 'employeeCount' },
        timeIntervals: { fromDateTime: '2021-01-01' },
        filters: [{
            memberSet: {
                dimension: {
                    name: 'Permanent',
                    qualifyingPath: 'Employee'
                },
                values: {
                    included: [{ path: ['True'] }]
                }
            }
        }],
        axes: [{
            dimensionLevelSelection: {
                dimension: {
                    name: 'Function',
                    qualifyingPath: 'Employee'
                },
                levelIds: ['Function']
            }
        }]
    }
});

fetch('https://{vanity_name}.api.visier.io/v1/data/query/aggregate', {
    method: 'POST',
    headers: {
        'apikey': '{api_key}',
        'Cookie': 'VisierASIDToken={security_token}',
        'Content-Type': 'application/json'
    },
    body: data
})
.then(response => response.json())
.then(json => console.log(json))
.catch(error => console.error('Error:', error));

POST /v1/data/query/sql

Copy
curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/sql' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{
    "query": "SELECT employeeCount(), Visier_Time, level(Function, \"Function\") FROM Employee WHERE Visier_Time IN periods(date(\"2021-01-01\"), 1, period(1, Month)) AND Permanent IN (\"True\")"
}'
Copy
import requests
import json

url = 'https://{vanity_name}.api.visier.io/v1/data/query/sql'
headers = {
    'apikey': '{api_key}',
    'Cookie': 'VisierASIDToken={security_token}',
    'Content-Type': 'application/json'
}
data = {
    "query": 'SELECT employeeCount(), Visier_Time, level(Function, "Function") FROM Employee WHERE Visier_Time IN periods(date("2021-01-01"), 1, period(1, Month)) AND Permanent IN ("True")'
}

response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())
Copy
const fetch = require('node-fetch');

const data = JSON.stringify({
    query: 'SELECT employeeCount(), Visier_Time, level(Function, "Function") FROM Employee WHERE Visier_Time IN periods(date("2021-01-01"), 1, period(1, Month)) AND Permanent IN ("True")'
});

fetch('https://{vanity_name}.api.visier.io/v1/data/query/sql', {
    method: 'POST',
    headers: {
        'apikey': '{api_key}',
        'Cookie': 'VisierASIDToken={security_token}',
        'Content-Type': 'application/json'
    },
    body: data
})
.then(response => response.json())
.then(json => console.log(json))
.catch(error => console.error('Error:', error));

Aggregate queries with trailing time

Employee Exit Rate query with 2 months trailing time

This sample request retrieves 2 periods of Exit Rate. Each periods has 3 months trailing time up to January 1, 2021. It does not use any group bys or filters.

POST /v1/data/query/aggregate

Copy
curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/aggregate' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{   
    "query": {
        "source": {
            "metric": "Exit_Model.Rate.Exit"
        },
        "timeIntervals": {
            "fromDateTime": "2021-01-01",
            "intervalCount": 2,
            "trailingPeriodType": "MONTH",
            "trailingPeriodCount": 3
        }
    }
}'
Copy
import requests
import json

url = 'https://{vanity_name}.api.visier.io/v1/data/query/aggregate'
headers = {
    'apikey': '{api_key}',
    'Cookie': 'VisierASIDToken={security_token}',
    'Content-Type': 'application/json'
}
data = {
    "query": {
        "source": {"metric": "Exit_Model.Rate.Exit"},
        "timeIntervals": {
            "fromDateTime": "2021-01-01",
            "intervalCount": 2,
            "trailingPeriodType": "MONTH",
            "trailingPeriodCount": 3
        }
    }
}

response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())
Copy
const fetch = require('node-fetch');

const data = JSON.stringify({
    query: {
        source: { metric: 'Exit_Model.Rate.Exit' },
        timeIntervals: {
            fromDateTime: '2021-01-01',
            intervalCount: 2,
            trailingPeriodType: 'MONTH',
            trailingPeriodCount: 3
        }
    }
});

fetch('https://{vanity_name}.api.visier.io/v1/data/query/aggregate', {
    method: 'POST',
    headers: {
        'apikey': '{api_key}',
        'Cookie': 'VisierASIDToken={security_token}',
        'Content-Type': 'application/json'
    },
    body: data
})
.then(response => response.json())
.then(json => console.log(json))
.catch(error => console.error('Error:', error));

Employee Exit Rate query with 6 months forward trailing time

This sample request retrieves 2 periods of Exit Rate. Each period has 6 months trailing time starting from January 1, 2021. It does not use any group bys or filters.

POST /v1/data/query/aggregate

Copy

cURL sample request with JSON body

cURL sample request with JSON bodycurl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/aggregate' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{   
    "query": {
        "source": {
            "metric": "Exit_Model.Rate.Exit"
        },
        "timeIntervals": {
            "fromDateTime": "2021-01-01",
            "intervalCount": 2,
            "direction": "FORWARD",
            "trailingPeriodType": "MONTH",
            "trailingPeriodCount": 6
        }
    }
}'

Headcount query filtered by Women employees

This sample request retrieves 1 month of data for Headcount filtered by Women employees up to January 1, 2021. It does not use a group by.

POST /v1/data/query/aggregate

Copy

cURL sample request with JSON body

curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/aggregate' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{   
    "query": {
        "source": {
            "metric": "employeeCount"
        },
        "timeIntervals": {
            "fromDateTime": "2021-01-01"
        },
        "filters": [{
            "selectionConcept": {
                "name": "isFemale",
                "qualifyingPath": "Employee"
            }
        }]
    }
}'

POST /v1/data/query/sql

Copy
cURL sample request with SQL-like body
curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/sql' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{
    "query": "SELECT employeeCount(), Visier_Time FROM Employee WHERE Visier_Time IN periods(date(\"2021-01-01\"), 1, period(1, Month)) AND isFemale = TRUE"
}'

Headcount query filtered by Direct Manager

This sample request retrieves 1 months of data for Headcount filtered by Direct Manager up to January 1, 2021. It does not use any group bys.

POST /v1/data/query/aggregate

Copy

cURL sample request with JSON body

curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/aggregate' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{   
    "query": {
        "source": {
            "metric": "employeeCount"
        },
        "timeIntervals": {
            "fromDateTime": "2021-01-01"
        },
        "filters": [{
            "memberSet": {
                "dimension": {
                    "name": "Permanent",
                    "qualifyingPath": "Employee.Direct_Manager"
                },
                "values": {
                    "included": [{
                        "path": ["True"]
                    }]
                }
            }
        }]
    }
}'

POST /v1/data/query/sql

Copy
cURL sample request with SQL-like body
curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/sql' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{
    "query": "SELECT employeeCount(), Visier_Time FROM Employee WHERE Visier_Time IN periods(date(\"2021-01-01\"), 1, period(1, Month)) AND Direct_Manager.Permanent IN (\"True\")"
}'

Aggregate query for multiple periods

Headcount query for 4 time periods

This sample request retrieves 4 quarters of data for Headcount up to January 1, 2021. It does not use any group bys or filters.

POST /v1/data/query/aggregate

Copy

cURL sample request with JSON body

curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/aggregate' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{   
    "query": {
        "source": {
            "metric": "employeeCount"
        },
        "timeIntervals": {
            "fromDateTime": "2021-01-01",
            "intervalPeriodType": "QUARTER",
            "intervalCount": 4
        }
    }
}`

POST /v1/data/query/sql

Copy
cURL sample request with SQL-like body
curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/sql' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{
    "query": "SELECT employeeCount(), Visier_Time FROM Employee WHERE Visier_Time IN periods(date(\"2021-01-01\"), 4, period(1, Quarter))"
}'

Aggregate query with groupings

Headcount query grouped by Job Function and Pay Level

This sample request retrieves 1 months of data for Headcount grouped by Job Function and Pay Level up to January 1, 2021.

POST /v1/data/query/aggregate

Copy

cURL sample request with JSON body

curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/aggregate' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{   
    "query": {
        "source": {
            "metric": "employeeCount"
        },
        "timeIntervals": {
            "fromDateTime": "2021-01-01"
        },
        "axes": [{
            "dimensionLevelSelection": {
                "dimension": {
                    "name": "Function",
                    "qualifyingPath": "Employee"
                },
                "levelIds": [
                    "Function"
                ]
            }
        }, {
            "dimensionLevelSelection": {
                "dimension": {
                    "name": "Pay_Level",
                    "qualifyingPath": "Employee"
                },
                "levelIds": [
                    "Pay_Level"
                ]
            }
        }]
    }
}'

POST /v1/data/query/sql

Copy
cURL sample request with SQL-like body
curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/sql' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{
    "query": "SELECT employeeCount(), Visier_Time, level(Function, \"Function\"), level(Pay_Level, \"Pay_Level\") FROM Employee WHERE Visier_Time IN periods(date(\"2021-01-01\"), 1, period(1, Month))"
}'

Aggregate query with parameters

Days Worked Over Maximum Consecutive Limit query with the Maximum Consecutive Working Days Limit parameter set to 1

This sample request retrieves 4 intervals each containing 3 months of data for Days Worked Over Maximum Consecutive Limit up to January 1, 2021 with the Maximum Consecutive Working Days Limit parameter set to 1. Some metrics use parameters (dynamic values) in their formulas that allow you to change how the metric is calculated. In this example, you can change the parameter to set the maximum number of consecutive days an employee is able to work. Working streaks that exceed this limit during the period will be included in the calculation. It does not use any group bys or filters.

POST /v1/data/query/aggregate

Copy

JSON sample request body

curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/aggregate' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{   
    "query": {
        "source": {
            "metric": "daysWorkedOverMaxConsecutiveLimit"
        },
        "parameterValues": [{
            "numericValue": {
                "parameterId": "daysWorkedOverMaxConsecutiveLimit.Max_Consecutive_Working_Days_Limit_Parameter",
                "value": 1
            }
        }],
        "timeIntervals": {
            "fromDateTime": "2021-01-01",
            "intervalPeriodCount": 3,
            "intervalCount": 4
        }
    }
}'

POST /v1/data/query/sql

Copy
cURL sample request with SQL-like body
curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/sql' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{
    "query": "SELECT daysWorkedOverMaxConsecutiveLimit(Max_Consecutive_Working_Days_Limit_Parameter = 1), Visier_Time FROM Employee WHERE Visier_Time IN periods(date(\"2021-01-01\"), 4, period(3, Month))"
}'

Basic list query

List query for Employee first name, last name, and organization

This sample request retrieves 1 month of Employee data for the employees' first names, last names, and organizations. It does not use any group bys or filters.

POST /v1/data/query/list

Copy

cURL sample request with JSON body

curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/list' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{   
    "source": {
        "analyticObject": "Employee"
    },
    "columns": [{
        "columnName": "First Name",
        "columnDefinition": {
            "property": {
                "name": "Employee.First_Name",
                "qualifyingPath": "Employee"
            }
        }
    }, {
        "columnName": "Last Name",
        "columnDefinition": {
            "property": {
                "name": "Employee.Last_Name",
                "qualifyingPath": "Employee"
            }
        }
    }, {
        "columnName": "Organization",
        "columnDefinition": {
            "dimension": {
                "name": "Organization_Hierarchy",
                "qualifyingPath": "Employee"
            }
        }
    }],
    "timeInterval": {
        "fromDateTime": "2021-01-01"
    }
}'

POST /v1/data/query/sql

Copy
cURL sample request with SQL-like body
curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/sql' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '
{
    "query": "SELECT Employee.First_Name, Employee.Last_Name, Organization_Hierarchy FROM Employee WHERE Visier_Time BETWEEN date(\"2020-12-01\") AND date(\"2021-01-01\")"
}`

List query with filters and sorting

List query for Employee first name, last name, and organization filtered by Woman

This sample request retrieves 1 month of women employees' first names, last names, and organizations. It does not use any group bys. The result is sorted by first name and then last name.

POST /v1/data/query/list

Copy

cURL sample request with JSON body

curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/list' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{   
    "source": {
        "analyticObject": "Employee"
    },
    "filters": [{
        "selectionConcept": {
            "name": "isFemale",
            "qualifyingPath": "Employee"
        }
    }],
    "columns": [{
        "columnName": "First Name",
        "columnDefinition": {
            "property": {
                "name": "Employee.First_Name",
                "qualifyingPath": "Employee"
            }
        }
    }, {
        "columnName": "Last Name",
        "columnDefinition": {
            "property": {
                "name": "Employee.Last_Name",
                "qualifyingPath": "Employee"
            }
        }
    }, {
        "columnName": "Organization",
        "columnDefinition": {
            "dimension": {
                "name": "Organization_Hierarchy",
                "qualifyingPath": "Employee"
            }
        }
    }],
    "sortOptions": [
      { 
        "columnIndex": 0,
        "sortDirection": "SORT_ASCENDING"
      },
      { 
        "columnIndex": 1,
        "sortDirection": "SORT_ASCENDING"
    }],
    "timeInterval": {
        "fromDateTime": "2021-01-01"
    }
}'

POST /v1/data/query/sql

Copy
cURL sample request with SQL-like body
curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/sql' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{
    "query": "SELECT Employee.First_Name, Employee.Last_Name, Organization_Hierarchy FROM Employee WHERE Visier_Time BETWEEN date(\"2020-12-01\") AND date(\"2021-01-01\") AND isFemale = TRUE"
}'

List query for Employee first name, last name, and organization filtered by HR

This sample request retrieves 1 month of HR employees' first names, last names, and organizations. It does not use any group bys. The result is sorted by first name and then last name.

POST /v1/data/query/list

Copy

cURL sample request with JSON body

curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/list' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{   
    "source": {
        "analyticObject": "Employee"
    },
    "filters": [{
          "formula": "include(Employee.Organization_Hierarchy, list(list(\"HR\")))"
    }],
    "columns": [{
        "columnName": "First Name",
        "columnDefinition": {
            "property": {
                "name": "Employee.First_Name",
                "qualifyingPath": "Employee"
            }
        }
    }, {
        "columnName": "Last Name",
        "columnDefinition": {
            "property": {
                "name": "Employee.Last_Name",
                "qualifyingPath": "Employee"
            }
        }
    }, {
        "columnName": "Organization",
        "columnDefinition": {
            "dimension": {
                "name": "Organization_Hierarchy",
                "qualifyingPath": "Employee"
            }
        }
    }],
    "sortOptions": [
      { 
        "columnIndex": 0,
        "sortDirection": "SORT_ASCENDING"
      },
      { 
        "columnIndex": 1,
        "sortDirection": "SORT_ASCENDING"
    }],
    "timeInterval": {
        "fromDateTime": "2021-01-01"
    }
}'

Multi-value property list query

Multi-value property query for employee compensation items

This sample request retrieves 1 month of compensation items, the employee ID of the employee who is being compensated, the compensation type, and the compensation amount. It does not use any group bys or filters.

POST /v1/data/query/list

Copy

cURL sample request with JSON body

curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/data/query/list' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'Content-Type: application/json' \
--data '{   
    "source": {
        "analyticObject": "Employee.Employee_Budgeted_Compensation"
    },
    "columns": [{
        "columnName": "Employee.Employee.EmployeeID",
        "columnDefinition": {
          "property": {
            "name": "Employee.EmployeeID",
            "qualifyingPath": "Employee"
          }
        }
      }, {
        "columnName": "compensationType",
        "columnDefinition": {
          "formula": "Compensation_Type"
        }
      },
      {
        "columnName": "compensationAmount",
        "columnDefinition": {
          "formula": "Employee_Budgeted_Compensation.Compensation_Amount"
        }
      }],
    "timeInterval": {
        "fromDateTime": "2021-01-01"
    }
}'