cdp.connection.list
The cdp.connection.list command is used to find and return a list of Connections.
TR50 Request with useSearch and iterator
The following example shows a request using useSearch and iterator parameter:
{
"cmd": {
"command": "cdp.connection.list",
"params": {
"useSearch": true,
"iterator": "new",
"limit": "50"
}
}
}
TR50 Response gets the iterator value
When the initial request is made, the parameter iterator should be assigned new. The returned result will then include an additional parameter of iterator containing a temporary unique value related to the initial query made. Example response for the above request:
{
"cmd": {
"success": true,
"params": {
"count": 100,
"fields": [
{list of field keys}
],
"iterator": "DnF1ZXJ5VGhlbkZldGNoBQAAAAAADZtEFkFKQmlqRHZWUk5hb1ZHalRua1RKeEEAAAAAABErWxZjR3ZfNzZpbFJPdWZDUVBkdVdVQ0NBAAAAAAANm0MWQUpCaWpEdlZSTmFvVkdqVG5rVEp4QQAAAAAAEStcFmNHdl83NmlsUk91ZkNRUGR1V1VDQ0EAAAAAABErXRZjR3ZfNzZpbFJPdWZDUVBkdVdVQ0NB",
"result": [
{list of result objects}
]
}
}
}
TR50 Request with iterator value
This value should be passed on to the iterator parameter for the subsequent requests to iterate through the result set until the entire result set has been returned. A subsequent request after the initial response is shown below:
{
"cmd": {
"command": "cdp.connection.list",
"params": {
"useSearch": true,
"iterator": "DnF1ZXJ5VGhlbkZldGNoBQAAAAAADZtEFkFKQmlqRHZWUk5hb1ZHalRua1RKeEEAAAAAABErWxZjR3ZfNzZpbFJPdWZDUVBkdVdVQ0NBAAAAAAANm0MWQUpCaWpEdlZSTmFvVkdqVG5rVEp4QQAAAAAAEStcFmNHdl83NmlsUk91ZkNRUGR1V1VDQ0EAAAAAABErXRZjR3ZfNzZpbFJPdWZDUVBkdVdVQ0NB",
"limit": "50"
}
}
}
When there is no more data to iterate through you will get the following response:
{
"cmd": {
"success": false,
"errorMessages": [
"Search has reached end of results."
],
"errorCodes": [
-90058
]
}
}
TR50 Request without iterator
{
"cmd": {
"command": "cdp.connection.list",
"params": {
"sort": "+iccid",
"offset": "0",
"limit": "50",
"tags": [
"tag1",
"tag2"
],
"ids": [
"5413264000ad5e898b48408e",
"548408413264de05e898b00a",
"5264005e84130ade898b4840"
]
}
}
}
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
show | Array | An array of field names of the data columns to return. | |
sort | String | sort is an optional parameter that defines the sort order of the result set. It allows to arrange the list in either ascending(+) or descending(-) order. It is possible to sort cdp.connection.list in any of the parameters within the fields in the response. | |
useSearch | Boolean | When useSearch is set to true, it will improve the performance of the operation In some cases there is a delay between making changes and when they will be visible to the search database, this delay is typically less than 5 seconds. As such, if you perform an update call, and subsequently call a list, you may not see the results of your operation. |
|
iterator | String | iterator is used in conjunction with the useSearch to iterate through the returned results. Initial request should be given the value new. Further requests should be given the value got in from the response. For more information, see the example below at the end of this section with the iterator and useSearch. | |
offset | Integer | The starting list offset, used for pagination. Defaults to 0 if not specified. | |
limit | Integer | Limits the number of results returned. Defaults to 2000. | |
showCount | Boolean | By default, it is set to true. If set to false, the response will not include the count. Setting it to false will improve the response time but you will not know the total size of the result set. | |
tags | Array | If specified, the command will only return Connections that have all tags in this parameter. | |
ids | Array | If specified, the command will only return Connections that match the ids specified in this parameter. | |
iccids | Array | If specified, the command will
only return Connections that match the
iccids specified in this
parameter. esns, imsis, imeis, meids, and msisdns are not supported |
TR50 Response
If the command is sent successfully a success message and the list of Connections is returned. Otherwise, an error and error message will be returned.
{
"cmd": {
"success": true,
"params": {
"count": 316,
"fields": [
"apn",
"carrier",
"cdp",
"custom1",
"custom2",
"custom3",
"custom4",
"customer",
"dateActivated",
"dateAdded",
"dateModified",
"esn",
"estimatedMonthData",
"hasDataUsage",
"hasSmsUsage",
"hasVoiceUsage",
"iccid",
"id",
"imei",
"imsi",
"meid",
"inSession",
"ipAddress",
"isRoaming",
"lastSessionEnd",
"lastSync.session",
"lastSync.location",
"lastSync.dataUsage",
"lastSync.smsUsage",
"lastSync.voiceUsage",
"locLat",
"locLng",
"locAddress",
"msisdn",
"ratePlan",
"radioAccessTech",
"ratePlanId",
"status",
"terminalId",
"usageMonthData",
"usageMonthSms",
"usageMonthVoice",
"billingPlanCode",
"vasPackageCode"
],
"result": [
{
"id": "58c213fdbafd035684783f65",
"orgId": "533ef300310023164500007f",
"ownerOrgId": "533ef300310023164500007f",
"permission": "rw",
"configId": "5640fdb5b2157c7d917fd71b",
"identity": "ICCID: 89014103277055991512",
"iccid": "89014103277055991512",
"carrier": "AT&T",
"terminalId": "B0129DB1",
"imsi": "310410705599151",
"imei": "356144040370849",
"msisdn": "5886392515",
"ratePlan": "50MB Evaluation Plan",
"ratePlanId": 3438,
"status": "activated",
"dateAdded": "2014-08-25T10:49:24Z",
"dateModified": "2017-08-09T12:33:15Z",
"estimatedMonthData": 16.739394187927,
"usageMonthData": 14.959177017212,
"apn": "a105.2way.net",
"inSession": true,
"ipAddress": "10.21.3.134",
"radioAccessTech": "UTRAN",
"locLat": 26.39525,
"locLng": -80.11353,
"locAddress": {
"streetNumber": "",
"street": "5300 Broken Sound Blvd",
"city": "Boca Raton",
"state": "FL",
"zipCode": "33487",
"country": "US"
},
"customer": "ILSTECH",
"hasDataUsage": true,
"cdp": {
"deviceType": "SIM-2FF",
"contractId": 47312,
"networkId": 601,
"networkCode": "AT:3G:DAT",
"id1": "5886392515",
"ratePlanCode": "ATEV50MB",
"regStatus": "Activated",
"created": "2014-08-25T10:49:24",
"updated": "2017-08-09T12:33:15",
"custom1": "Option CloudGate"
},
"lastSync": {
"session": "2019-03-29T14:28:15.941Z",
"location": "2019-03-29T13:51:48.609Z",
"dataUsage": "2019-03-29T07:09:28.536Z"
},
...
}
]
}
}
}
Response Parameters
Name | Type | Description |
---|---|---|
count | Integer | The total number of matched Connections. |
fields | Array | An array of field names of data columns capable of being returned. |
result | Array | The array of Connection objects |
Result Array Object
Name | Type | Description |
---|---|---|
id | String | The id of the Connection. |
orgId | String | The current organization id |
ownerOrgId | String | If the Connection is shared, then the ownerOrgid displays the id of the organization to which it belongs to. If a Connection is not shared then the orgid and the ownerOrgid are the same. For more information on sharing a Connection, see Sharing a Connection |
permission | String | The permissions for the Connection in the current organization. |
configId | String | The CDP configuration id of the Connection. |
configName | String | The CDP configuration name associated with the Connection. |
identity | String | Displays a Connection identifier along with the value. For example: ICCID: 8901271224212337421, MEID: 91A1B9B1000000, ID: 53237c1afe2a110ab4deacf7 |
iccid | String | The ICCID value of the Connection. |
imsi | String | The IMSI value of the Connection. |
imei | String | The IMEI value of the Connection. |
meid | String | The MEID value of the Connection. |
esn | String | The ESN value of the Connection. |
identity | String | Displays a Connection identifier along with the value. For example: ICCID: 8901271224212337421, MEID: 91A1B9B1000000, ID: 53237c1afe2a110ab4deacf7 |
msisdn | String | The MSISDN value of the Connection. |
terminalId | String | ID of the terminal. |
ratePlan | String | The rate plan used by the Connection. |
ratePlanId | String | ID of the rate plan. |
status | String | The status of the Connection. |
inSession | Bool | If the Connection is in session. |
lastSessionEnd | String | Last session end time of the Connection. |
ipAddress | String | IP address of the Connection. |
isRoaming | Bool | If the Connection is roaming or not. |
dateActivated | String | Connection activated date. |
dateAdded | String | Connection added date. |
dateModified | String | Connection last modified date. |
customer | String | The customer associated with this Connection. |
hasDataUsage | Boolean | Appears only when the Connection has Data records. |
hasSmsUsage | Boolean | Appears only when the Connection has SMS records. |
hasVoiceUsage | Boolean | Appears only when the Connection has Data records. |
usageMonthData | Float | The month to date data used. |
usageMonthSms | Float | The month to date SMS used. |
usageMonthVoice | Float | The month to date voice used. |
estimatedMonthData | Float | Estimated about of data use to be used month-to-date. |
updatedBy | String | The user that last updated this Connection. |
updatedOn | String | The date when the last update occurred. |
apn | String | Access point name. |
carrier | String | Carrier of the Connection. |
cdp | Array | CDP specific information related to the Connection. |
custom1-4 | String | The custom1, custom2, custom3 and custom4 fields represent optional values assigned to the Connection. |
carrierCustom1-4 | String | The carrierCustom1, carrierCustom2, carrierCustom3 and carrierCustom4 fields represent optional values assigned by the carrier to the Connection. |
lastSync | Array | An array of timestamps of when various elements in the Connection were last synced. For more information on Last Sync, see the table below. |
locLat | Float | Latitude of the Connection. |
locLng | Float | Longitude of the Connection. |
locAddress | Array | Address of the Connection. |
radioAccessTech | String | Radio access tech (e.g. WLAN, GAN, etc.). |
billingPlanCode | String | Billing plan code. |
vasPackageCode | String | VAS package code. |
configId | String | ID of the CDP config. |
Last Sync
Name | Type | Description |
---|---|---|
session | String | When the session was last synced. |
location | String | When the location was last synced. |
dataUsage | String | When the data usage was last synced. |
smsUsage | String | When the SMS usage was last synced. |
voiceUsage | String | When the voice usage was last synced. |