Skip to main content
Version: 3.0.0

Imported Data Project API

Imported Data Projects (IDPs) allow customers to import their custom data into the XM Platform. This is particularly useful for importing operational data.

Walkthrough​

To pull data from an external data source into a new Imported Data Project, you make an API call to create the project and additional API calls to add records. First create a Imported Data Project using the POST /imported-data-projects endpoint. The fields defines the schema for your data. Once you've defined your imported data project, you can use the POST /imported-data-projects/{idpSourceId}/records to add data to it. Once you add your data, you can view it in your dashboards or even combine the data with your survey response data.

To demonstrate, we'll use this simple data format:

Page TitlePage Views
Page 188
Page 28
Page 315

Create an IDP​

To add external data rows, you use the POST /imported-data-projects

curl --request POST \
--url https://ca1.qualtrics.com/API/v3/imported-data-projects \
--header 'content-type: application/json' \
--header 'x-api-token: ' \
--data '{
"name": "Google Analytics Data Set",
"uniqueField": "pageTitle",
"fields": [
{
"name": "pageTitle",
"type": "string"
},
{
"name": "pageviews",
"type": "number"
}
]
}'

The above request should give you a response like:

{
"result": {
"name": "Google Analytics Data Set",
"uniqueField": "pageTitle",
"idpSourceId": "dcf04acc768f4ea5",
"fields": [
{
"name": "pageTitle",
"type": "string"
},
{
"name": "pageviews",
"type": "number"
}
]
},
"meta": {
"requestId": "b2fa3cdd-5c43-4d2b-a5d7-e85faf45f3e1",
"httpStatus": "200 - OK"
}
}

In the above response, you will find the idpSourceId. You will need this identifier to make all other calls related to this IDP.

Adding Data to IDP​

To add an external data source, you use the POST /imported-data-projects/{idpSourceId}/records

curl --request POST \
--url https://ca1.qualtrics.com/API/v3/imported-data-projects/idpSourceId/records \
--header 'content-type: application/json' \
--header 'x-api-token: ' \
--data '{
"records": [
{
"pageTitle": "Page 1",
"pageviews": 64
},
{
"pageTitle": "Page 2",
"pageviews": 34
}
]
}'

From this request you should receive a standard 200-OKresponse:

{
"result": {},
"meta": {
"requestId": "c2875d47-e9a8-40b5-ac68-cefa69451474",
"httpStatus": "200 - OK"
}
}

Retrieving Data from an IDP​

To get data from an IDP, you use the GET /imported-data-projects/{idpSourceId}/records/{uniqueField}, where the uniqueField is the value of the unique ID for that row.

curl --request GET \
--url https://ca1.qualtrics.com/API/v3/imported-data-projects/idpSourceId/records/uniqueField \
--header 'x-api-token: '

From this request you should receive a standard 200-OKresponse:

{
"result": {
"pageTitle": "Page 1",
"pageviews": 64
},
"meta": {
"requestId": "c2875d47-e9a8-40b5-ac68-cefa69451474",
"httpStatus": "200 - OK"
}
}

Retrieve idpSourceId for an existing Imported Data Project​

To retrieve the idpSourceId for an existing IDP, go to the UI and open the IDP you want to interact with. Under the Tools dropdown, click Source ID(s) to view your idpSourceId.

Retrieve idpSourceId

Authentication​

This is a schema for x-api-token header authentication.

Security Scheme Type:

apiKey

Header parameter name:

X-API-TOKEN

Contact

Support: support@qualtrics.com

License

Apache 2.0