Get Target Groups API

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 HeaderDescription
content-typeapplication/json
authorizationAccess 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:

ParameterDescription
createdByReturns the user id who created the target group
idReturns the id of the target group.
customerNameReturns the tenant name.
userGroupReturns the user group in which the target data is created.
createdOnReturns the target group created date.
headerscountReturns the headers count of the target group.
allowedChannelsReturns the list of channels that are allowed for the tenant.
headersReturns the headers of the target group.
behaviourReturns if the target group is Static of Dynamic.
S - Static
D - Dynamic
nameReturns the name of the target group.
descriptionReturns the description of the target group.
loadTypeReturns how the target group was loaded. The possible options are:
0 - File upload
1 - Segment
sourceReturns the target group source. The possible options are:
0 - File upload
1 - Sftp
* 6 - Dynamic Segment
supportedChannelsReturns the list of channels in which the target group can be used.
fileNameReturns the file name with which the target group was created.
targetGroupTypeReturns the target group type.
recordSkipeTypeReturns if the records to be skipped incase of error.
thresholdTypeReturns the threshold type.
thresholdValueReturns the threshold value.
isAllowRemoteUpdateReturns if the remote updates are allowed for the target group.
totalCountReturns the total records count of the target group.
validcountReturns the valid records count of the target group.
errorcountReturns the error records count of the target group.
lastUpdatedOnReturns the last updated date of the target group.
statusValueReturns the status of the target group. The possible options are:
Inprogress
ready
infoBasedReturns the supported channels list in which the target group can be used.
targetStateReturns 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 CodeCode within API ResponseDescription
400400I/O error on post request. Cannot retry due to server authentication, in streaming mode.
401430Authorization failed. This resource is not allowed to access using this TOKEN or KEY
401498Invalid token or Access token expired
404404Not found
405405Method not supported
500500Internal server error
Language