get https://yourapihubdomain.io/v1/target-groups
This API is used to get all the target groups that are created by the API user in the tenant.
Know your endpoint
Based on the domain you use to log in to Webex Campaign, the endpoint domain for your API varies. For more information, refer to the Know Your API Endpoints section.
Headers
The following table describes the request headers:
Request Header | Description |
---|---|
content-type | application/json |
authorization | Access token or API Secret Key in Bearer format Example: Bearer $(key) |
Request Example
https://<yourdomain>webexcampaign.io/campaignapi/resources/v3/target-groups
https://<yourdomain>webexcampaign.io/campaignapi/resources/v3/target-groups/16710111730000
Response Parameters
This API will return the following response parameters:
Parameter | Description |
---|---|
createdBy | Returns the user id who created the target group |
id | Returns the id of the target group. |
customerName | Returns the tenant name. |
userGroup | Returns the user group in which the target data is created. |
createdOn | Returns the target group created date. |
headerscount | Returns the headers count of the target group. |
allowedChannels | Returns the list of channels that are allowed for the tenant. |
headers | Returns the headers of the target group. |
behaviour | Returns if the target group is Static of Dynamic. S - Static D - Dynamic |
name | Returns the name of the target group. |
description | Returns the description of the target group. |
loadType | Returns how the target group was loaded. The possible options are: 0 - File upload 1 - Segment |
source | Returns the target group source. The possible options are: 0 - File upload 1 - Sftp * 6 - Dynamic Segment |
supportedChannels | Returns the list of channels in which the target group can be used. |
fileName | Returns the file name with which the target group was created. |
targetGroupType | Returns the target group type. |
recordSkipeType | Returns if the records to be skipped incase of error. |
thresholdType | Returns the threshold type. |
thresholdValue | Returns the threshold value. |
isAllowRemoteUpdate | Returns if the remote updates are allowed for the target group. |
totalCount | Returns the total records count of the target group. |
validcount | Returns the valid records count of the target group. |
errorcount | Returns the error records count of the target group. |
lastUpdatedOn | Returns the last updated date of the target group. |
statusValue | Returns the status of the target group. The possible options are: Inprogress ready |
infoBased | Returns the supported channels list in which the target group can be used. |
targetState | Returns the status code of the target group. The possible options are: 0 (Inprogress) 1 (ready) |
Response Example
[
{
"createdBy": "1582274979811",
"id": "16710111730000",
"customerName": "surya",
"userGroup": "marketing",
"createdOn": "14/Dec/2022 15:16",
"headerscount": 2,
"allowedChannels": "App Push - qa_appAsset_Touchstone01null",
"headers": "APPDEVICEID|EMAIL",
"behaviour": "S",
"name": "sks_aap_campaign_14Dec_20221214094613",
"description": "null",
"loadType": 0,
"source": 6,
"supportedChannels": [
"A"
],
"fileName": "",
"targetGroupType": 0,
"recordSkipeType": 0,
"thresholdType": -1,
"thresholdValue": "-1.0",
"isAllowRemoteUpdate": 0,
"totalCount": 0.0,
"validcount": 0.0,
"errorcount": 0.0,
"lastUpdatedOn": "14/Dec/2022 15:16",
"statusValue": "Ready",
"infoBased": "A",
"targetState": 1
},
{
"createdBy": "1582274979811",
"id": "16705874370001",
"customerName": "surya",
"userGroup": "marketing",
"createdOn": "09/Dec/2022 17:33",
"headerscount": 2,
"allowedChannels": "App Push - qa_appAsset_Touchstone01null",
"headers": "CUSTOMERID|EMAIL",
"behaviour": "S",
"name": "QA_Segemnt_Customer_ID_20221209120357",
"description": "null",
"loadType": 1,
"source": 6,
"supportedChannels": [
"A"
],
"fileName": "",
"targetGroupType": 1,
"recordSkipeType": 0,
"thresholdType": -1,
"thresholdValue": "-1.0",
"isAllowRemoteUpdate": 0,
"totalCount": 2.0,
"validcount": 2.0,
"errorcount": 0.0,
"lastUpdatedOn": "09/Dec/2022 17:33",
"statusValue": "Ready",
"infoBased": "A",
"targetState": 1
}
]
Failure Response Codes
The API will return code within the response as per the following table in case of failure scenarios.
HTTP Status Code | Code within API Response | Description |
---|---|---|
400 | 400 | I/O error on post request. Cannot retry due to server authentication, in streaming mode. |
401 | 430 | Authorization failed. This resource is not allowed to access using this TOKEN or KEY |
401 | 498 | Invalid token or Access token expired |
404 | 404 | Not found |
405 | 405 | Method not supported |
500 | 500 | Internal server error |