Get all data sources associated with a campaign
Use this endpoint to retrieve all data sources associated with a campaign. Data sources can be of the following types:
- Profile list (one per campaign)
- Profile extension table
- Supplemental data
- Segment group
- Dynamic variable
Service URL:
rest/api/v1.3/campaigns/{campaignName}/attributes/dataSources
Required Path Parameters:
campaignName
- Name of the campaign to fetch data sources for.
Request Method:
GET
Request Header:
Authorization=<AUTH_TOKEN>
Content-Type=application/json
Request Body - Required Properties:
Not applicable
Sample Response Body
{
"attributeName": "dataSources",
"attributeData": {
"dataSources": [
{
"path": "VK/vk_list",
"alias": "vk_list",
"fields": [
{
"name": "COUNTRY_",
"alias": "COUNTRY_",
"lookUpKey": true,
"defaultValue": null
},
{
"name": "CREATED_DATE_",
"alias": "CREATED_DATE_",
"lookUpKey": true,
"defaultValue": null
},
{
"name": "CITY_",
"alias": "CITY_",
"lookUpKey": true,
"defaultValue": null
}
],
"type": "PROFILE_LIST",
"default": null
},
{
"path": "VK/Fatigue persona email- vk_list",
"alias": "Fatigue_persona_email__vk_list",
"fields": [
{
"name": "FATIGUE_PERSONA",
"alias": "FATIGUE_PERSONA",
"lookUpKey": false,
"defaultValue": null
},
{
"name": "MODIFIED_DATE_",
"alias": "MODIFIED_DATE_",
"lookUpKey": false,
"defaultValue": null
}
],
"type": "PET",
"default": null
},
{
"path": "VK/mySupplementalTable",
"alias": "mySupplementalTable",
"fields": [
{
"name": "CUSTOM2",
"alias": "CUSTOM2",
"lookUpKey": false,
"defaultValue": null
},
{
"name": "CUSTOM1",
"alias": "CUSTOM1",
"lookUpKey": false,
"defaultValue": null
}
],
"type": "SUPPLEMENTAL_TABLE",
"default": null
},
{
"path": "VK/dummysegmentgroup",
"alias": "dummysegmentgroup",
"fields": null,
"type": "SEGMENT_GROUP",
"default": null
},
{
"path": "VK/anothersemgmentgroup",
"alias": "anothersemgmentgroup",
"fields": null,
"type": "SEGMENT_GROUP",
"default": null
},
{
"path": "var1",
"alias": "var1",
"fields": null,
"type": "DYNAMIC_VARIABLE",
"default": "afsd"
},
{
"path": "var2",
"alias": "var2",
"fields": null,
"type": "DYNAMIC_VARIABLE",
"default": "asdf"
},
{
"path": "var3",
"alias": "var3",
"fields": null,
"type": "DYNAMIC_VARIABLE",
"default": "asdf"
}
]
}
}
Sample Responses in case of failure:
Not an email campaign: Requests fail if the campaign specified is not an email campaign. The error resembles:
{
"type": "",
"title": "Not a valid campaign",
"errorCode": "CAMPAIGN_IS_INVALID",
"detail": "Only applicable for Email campaigns whereas [WS_SMS_DAPI_REST] is a Sms campaign",
"errorDetails": []
}
Campaign not found: Requests fail if the campaign specified cannot be found. The error resembles:
{
"type": "",
"title": "Campaign not found",
"errorCode": "CAMPAIGN_NOT_FOUND",
"detail": "Campaign not found with name [testCampaignDataources]",
"errorDetails": []
}
Campaign contains invalids characters: Requests fail if the campaign specified contains invalid characters. The error resembles:
{
"type": "",
"title": "Invalid request parameters",
"errorCode": "INVALID_PARAMETER",
"detail": "Invalid characters in the Campaign name: testCampaignDat$aources",
"errorDetails": []
}
Campaign name too long: Requests fail if the campaign name exceeds 150 characters. The error resembles:
{
"type": "",
"title": "Invalid request parameters",
"errorCode": "INVALID_PARAMETER",
"detail": "Maximum characters allowed for Campaign name: testCampaignDatasourcestestCampaignDatasourcestestCampaignDatasourcestestCampaignDatasourcestestCampaignDatasourcestestCampaignDatasourcestestCampaignDatasourcestestCampaignDatasourcestestCampaignDatasourcestestCampaignDatasourcestestCampaignDatasources is 150",
"errorDetails": []
}
Invalid attribute type: Requests fail if an invalid attribute is given in the URL. The error resembles:
{
"type": "",
"title": "Invalid request parameters",
"errorCode": "INVALID_PARAMETER",
"detail": "Invalid attribute name :data",
"errorDetails": []
}