GET /consents/{account}/index/{startIndex}
Returns the list of devices in the account that have been excluded from location services. (A POST /locations
request will return an error for excluded devices.) All IoT devices in an account are eligible for location services by default, but you can exclude devices (and include them again) with a POST /consents
request.
See also:
Exclude Devices
Remove devices from the Exclusion list
Each response includes a maximum of 2,000 devices. If the account has more than 2,000 excluded devices (indicated by the hasMoreData
parameter in each response), you must send additional requests to retrieve the rest of the list. Use the startIndex
parameter to return a different set of devices in each response.
GET https://thingspace.verizon.com/api/loc/v1/consents/{account}/index/{startIndex}
You must include the account name in the path, and the startIndex to specify the starting record.
Parameter Name | Data Type | Description |
---|---|---|
account required |
string | The name of the account for which you want to get the list of excluded devices. An account name is usually in the format of 10 digits, a hyphen, and then five more digits. Must include any leading zeros. |
startIndex required |
integer | The zero-based number of the first record to return. Set startIndex=0 for the first request. If hasMoreData is true in the response, use the startIndex value from the response for the next request. |
The request header must contain a current ThingSpace authorization bearer token and a valid VZ-M2M session token.
Parameter Name | Data Type | Description |
---|---|---|
Authorization required |
string | HTTP Authorization bearer token. |
VZ-M2M-Token required |
string | A valid session token returned by POST /api/m2m/v1/session/login. |
None.
Status 200
A success response includes a JSON array that contains the hardware identifiers of all excluded devices, or a Boolean indicating that all devices in the account are excluded. The identifiers may be ESNs, MEIDs, or IMEIs.
Parameter Name | Data Type | Description |
---|---|---|
accountName | string | The billing account that you requested exclusion information for. |
allDevice | boolean | True if all devices in the account are excluded. |
hasMoreData | Boolean | True if there are more excluded devices to retrieve. |
totalCount | integer | The total number of excluded devices. Note that each response includes a maximum of 2,000 devices. |
exclusion | array of strings | A list of identifiers of the devices that are excluded from location service. |
updateTime | string | The time that the consent (exclusion) list was last changed. |
{
"accountName": "2024009649-00001",
"allDevice": false,
"hasMoreData": false,
"totalCount": 4,
"updateTime": "2018-05-18 19:20:50.076 +0000 UTC",
"exclusion": [
"990003420535375",
"420535399000375",
"A100003861E585",
"205353759900034"
]
}
Status 400
All error messages are returned in this format:
{
"errorCode": "The type of error, such as INVALID_REQUEST.",
"errorMessage": "Additional error information."
}
Error codes and messages are listed on the Error Codes page, along with explanations and suggestions for corrective actions.