Data Version Export API Code Samples
Selection of code samples that demonstrate the use of the Data Version Export 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 Version Export" in API Reference.
Retrieve a list of all data versions
Use this sample request to retrieve all the data versions in your Visier tenant. The returned data versions are the data versions you can export using the Data Version Export API.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1alpha/data/data-version-exports/data-versions' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns all available data versions that you can export.
{
"dataVersions": [
{
"dataVersion": "9110004",
"dataCategory": "",
"created": "1624514036672"
},
{
"dataVersion": "9110003",
"dataCategory": "",
"created": "1624508235073"
},
{
"dataVersion": "9110002",
"dataCategory": "",
"created": "1624503809771"
}
]
}
Schedule a data version export job
Use this sample request to start a data version export job. In this sample, the job will generate a full export for the data version 1234567. The response returns a jobUuid that you can use to check the export job status. To check the export job status, see Retrieve a data version export job's status.
curl -X POST --url 'https://{vanity_name}.api.visier.io/v1alpha/data/data-version-exports/jobs' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
-d '{
"dataVersionNumber": "1234567",
"baseDataVersionNumber": ""
}'
The response returns the export job's UUID.
{
"jobUuid": "c19e2f2b-e8eb-4925-9d7c-228ccce7de1c"
}
Retrieve a data version export job's status
Use this sample request to retrieve the status of a data version export job. After the job completes successfully, the response returns an exportUuid that you can use to retrieve the details of the export. To retrieve the export details, see Retrieve the details of a data version export.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1alpha/data/data-version-exports/jobs/c19e2f2b-e8eb-4925-9d7c-228ccce7de1c' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
If the job has completed successfully, the response returns the export UUID.
{
"jobUuid": "c19e2f2b-e8eb-4925-9d7c-228ccce7de1c",
"completed": true,
"failed": false,
"exportUuid": "73846160-9c47-11ed-bc10-ebc0e0091820"
}
If the job hasn't completed yet, the response returns an empty export UUID.
{
"jobUuid": "c19e2f2b-e8eb-4925-9d7c-228ccce7de1c",
"completed": false,
"failed": false,
"exportUuid": ""
}
Retrieve the details of a data version export
Use this sample request to retrieve the details of a specific data version export. The response returns information about the data version, such as the data version number, tables, columns, and files. To download a file from the export, see Download a file from a data version export.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1alpha/data/data-version-exports/exports/73846160-9c47-11ed-bc10-ebc0e0091820' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns the export information.
{
"uuid": "73846160-9c47-11ed-bc10-ebc0e0091820",
"timestamp": "1672531200000",
"dataVersionNumber": "1234567",
"baseDataVersionNumber": "",
"tables": [
{
"name": "Applicant",
"commonColumns": {
"columns": [],
"files": []
},
"newColumns": {
"columns": [
{
"name": "ApplicantID",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": true
},
{
"name": "ValidityStart",
"dataType": "Date",
"allowsNull": false,
"isPrimaryKeyComponent": true
},
{
"name": "ValidityEnd",
"dataType": "Date",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Applicant_Stage",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Applicant_Status",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Applicant_Sub_Stage",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Application_Source",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Application_Source_Detail",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Applied_Date",
"dataType": "Date",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "CandidateID",
"dataType": "String",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Currency_Code",
"dataType": "String",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Offer_Expiration",
"dataType": "Date",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Offer_Relocation_Amount",
"dataType": "Number",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Offer_Salary_Amount",
"dataType": "Number",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Offer_Signing_Bonus_Amount",
"dataType": "Number",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Referral_Status",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Relocation_Status",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "RequisitionID",
"dataType": "String",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Resume_URL",
"dataType": "String",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Total_Interview_Cost",
"dataType": "Number",
"allowsNull": true,
"isPrimaryKeyComponent": false
}
],
"files": [
{
"fileId": 0,
"filename": "Applicant_part0.csv.gz"
}
]
},
"deletedColumns": []
}
],
"newTables": [
"Applicant"
],
"deletedTables": []
}
Retrieve the details of all data version exports
Use this sample request to retrieve any existing data version exports. The response returns all available exports and their details, such as the data version number, tables, columns, and files. To download a file from the export, see Download a file from a data version export.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1alpha/data/data-version-exports' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns the details of each data version export.
{
"dataVersionExports": [
{
"uuid": "06a84de4-989c-4e0b-8771-4f41fcce81b6",
"timestamp": "1672531200000",
"dataVersionNumber": "1234567",
"baseDataVersionNumber": "1234568",
"tables": [
{
"name": "Applicant",
"commonColumns": {
"columns": [
{
"name": "ApplicantID",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": true
},
{
"name": "ValidityStart",
"dataType": "Date",
"allowsNull": false,
"isPrimaryKeyComponent": true
},
{
"name": "ValidityEnd",
"dataType": "Date",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Applicant_Stage",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Applicant_Status",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Applicant_Sub_Stage",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Application_Source",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Application_Source_Detail",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Applied_Date",
"dataType": "Date",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "CandidateID",
"dataType": "String",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Currency_Code",
"dataType": "String",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Offer_Expiration",
"dataType": "Date",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Offer_Relocation_Amount",
"dataType": "Number",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Offer_Salary_Amount",
"dataType": "Number",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Offer_Signing_Bonus_Amount",
"dataType": "Number",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Referral_Status",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Relocation_Status",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "RequisitionID",
"dataType": "String",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Total_Interview_Cost",
"dataType": "Number",
"allowsNull": true,
"isPrimaryKeyComponent": false
}
],
"files": [
{
"fileId": 0,
"filename": "Applicant_part0.csv.gz"
}
]
},
"newColumns": {
"columns": [],
"files": []
},
"deletedColumns": [
"Resume_URL"
]
},
{
"name": "Candidate",
"commonColumns": {
"columns": [],
"files": []
},
"newColumns": {
"columns": [
{
"name": "CandidateID",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": true
},
{
"name": "ValidityStart",
"dataType": "Date",
"allowsNull": false,
"isPrimaryKeyComponent": true
},
{
"name": "ValidityEnd",
"dataType": "Date",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Accumulated_Work_Experience",
"dataType": "Number",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Birth_Date",
"dataType": "Date",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Created_Date",
"dataType": "Date",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Current_Employer",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Current_Job_Title",
"dataType": "String",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Current_Total_Compensation",
"dataType": "Number",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Disability_Status",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "EmployeeID",
"dataType": "String",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Ethnicity",
"dataType": "Integer",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "First_Name",
"dataType": "String",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Gender",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Highest_Education_Level_Achieved",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Last_Modified_Date",
"dataType": "Date",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Last_Name",
"dataType": "String",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "LinkedIn_URL",
"dataType": "String",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Location_0",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Location_1",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Location_2",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Location_3",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Location_4",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Technical_Skills_Level",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Union_Bargaining_Unit",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Union_Description",
"dataType": "String",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Union_Seniority_Date",
"dataType": "Date",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Union_Status",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Veteran_Status",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "_DisplayName_Ethnicity_",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
}
],
"files": [
{
"fileId": 1,
"filename": "Candidate_part0.csv.gz"
}
]
},
"deletedColumns": []
}
],
"newTables": [
"Candidate"
],
"deletedTables": []
},
{
"uuid": "9f08e6f5-288b-4783-aa9f-4bb49eeb8a70",
"timestamp": "1672531200000",
"dataVersionNumber": "1234567",
"baseDataVersionNumber": "",
"tables": [
{
"name": "Applicant",
"commonColumns": {
"columns": [],
"files": []
},
"newColumns": {
"columns": [
{
"name": "ApplicantID",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": true
},
{
"name": "ValidityStart",
"dataType": "Date",
"allowsNull": false,
"isPrimaryKeyComponent": true
},
{
"name": "ValidityEnd",
"dataType": "Date",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Applicant_Stage",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Applicant_Status",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Applicant_Sub_Stage",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Application_Source",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Application_Source_Detail",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Applied_Date",
"dataType": "Date",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "CandidateID",
"dataType": "String",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Currency_Code",
"dataType": "String",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Offer_Expiration",
"dataType": "Date",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Offer_Relocation_Amount",
"dataType": "Number",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Offer_Salary_Amount",
"dataType": "Number",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Offer_Signing_Bonus_Amount",
"dataType": "Number",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Referral_Status",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "Relocation_Status",
"dataType": "String",
"allowsNull": false,
"isPrimaryKeyComponent": false
},
{
"name": "RequisitionID",
"dataType": "String",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Resume_URL",
"dataType": "String",
"allowsNull": true,
"isPrimaryKeyComponent": false
},
{
"name": "Total_Interview_Cost",
"dataType": "Number",
"allowsNull": true,
"isPrimaryKeyComponent": false
}
],
"files": [
{
"fileId": 0,
"filename": "Applicant_part0.csv.gz"
}
]
},
"deletedColumns": []
}
],
"newTables": [
"Applicant"
],
"deletedTables": []
}
]
}
Download a file from a data version export
Use this sample request to download a file from a data version export. The file is the final output of Visier's data processing job and represents the state of your data in the exported data version. Data version export files are in CSV format, compressed with gzip. You can download one file per API request.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1alpha/data/data-version-exports/exports/73846160-9c47-11ed-bc10-ebc0e0091820/files/0' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-o ./{file_name}.gz
The response returns one or more CSV files that contain the columns and values for the table. For example, the Employee table file contains columns like EmployeeID, First_Name, Last_Name, Birth_Date, Job_Name, and Performance_Rating. For more information, see File format.