Retrieve Campaign Data Sources
/rest/api/v1.3/campaigns/{campaignName}/attributes/dataSources
Request
-
campaignName: string
Name of the Campaign
Response
- application/json
Default Response
object
Campaign Data Sources Response
-
attributeData:
object attributeData
Campaign attribute data
-
attributeName:
string
Allowed Values:
[ "dataSources" ]
the attribute of the campaign. "dataSources" in this scenario
object
-
dataSources(optional):
array dataSources
Array of Data Sources associated with the Campaign
array
-
Array of:
object Campaign DataSource
Title:
Campaign DataSource
object
Campaign DataSource
-
alias:
string
DataSource alias
-
default:
string
Default value of the DataSource
-
fields:
array fields
An array of Fields of the particular dataSource.
-
path:
string
Path to dataSource
-
type:
string
DataSource type.
array
-
Array of:
object Field
Title:
Field
object
Field
-
alias:
string
Alias for the field name
-
defaultValue:
string
default value of the field
-
lookUpKey:
boolean
whether the field is a lookup key or not
-
name:
string
Name of the field
Examples
Use this interface to get the data sources associated with the specified campaign. Data sources can be of the following types:
- Profile lists (one per campaign)
- Profile extension tables
- Supplemental data
- Segment groups
Required request headers:
FIELDS | DESCRIPTION |
---|---|
Authorization | <AUTH_TOKEN> |
Content-Type | application/json |
Response Notes:
Sample Response Body
{ "attributeName": "dataSources", "attributeData": { "dataSources": [ { "path": "folder/listname", "alias": "alias_name", "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": "folder/tablename", "alias": "alias_name", "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": "folder/tablename", "alias": "alias_name", "fields": [ { "name": "CUSTOM2", "alias": "CUSTOM2", "lookUpKey": false, "defaultValue": null }, { "name": "CUSTOM1", "alias": "CUSTOM1", "lookUpKey": false, "defaultValue": null } ], "type": "SUPPLEMENTAL_TABLE", "default": null }, { "path": "folder/segmentgroup", "alias": "alias_name", "fields": null, "type": "SEGMENT_GROUP", "default": null }, { "path": "folder/segmentgroup", "alias": "alias_name", "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" } ] } }
Troubleshooting Failures
The system returns error responses in the following situations.
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": [] }