API Reference
## Stop Diagnostics Observation ### DELETE /devices/attributes/actions/observe Stops existing Diagnostics observation of IOT devices. ### Uses and Requirements You can cancel existing diagnostic reporting. A list of devices must be specified along with the specific RF attributes for which you want diagnostic observation to be stopped. **Note:** There is a known issue with the lightweight machine-to-machine (LWM2M) observation timer expiring. Three things to be aware of: 1. LWM2M has an expiry timer for each observation session 2. LWM2M will only verify if the timer has expired if it receives notifications from the device 3. If the the device stops communicating for whatever reason, LWM2M servers will not send an OBSERVE_DURATION_EXPIRED to ThingSpace (When LWM2M servers receive notification after the observation period that is when it would typically cancel the observe session and send notifications). If this scenario occurs where the device stops communicating prior to observation period expiring the customer will have to manually turn "Request real time streaming" option off via the ThingSpace Portal or use this API To turn off "Request real time streaming" at the portal: 1. log in to the portal 2. Select your device to open **Device Details** 3. Click on the button labeled "Live stream" to open **RF live stream** 4. Click on the switch to toggle "Request real time streaming" off ### Request Components HTTP Request DELETE [https://thingspace.verizon.com/api/diagnostics/v1/devices/attributes/actions/observe](/docs/premium-apis/device-diagnostics/api-endpoints/diagnostics-observations/stopdiagnosticsobservation) ### Resource Path and Query Parameters None ### Header Parameters The request header must contain a current ThingSpace authorization bearer token and a valid VZ-M2M session token, and must set the content-type to JSON. | Parameter Name | Data Type | Description | |:-----------------------:|:---------:|:------------------------------------------------------:| | Authorization required | string | HTTP Authorization bearer token. | | VZ-M2M-Token required | string | A valid session token returned by POST /session/login. | | Content-Type required | string | Must be application/json. | ### Request Body | Parameter Name | Data Type | Description | |:-------------------------:|:----------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------:| | transactionID required | string | The transaction ID of the diagnostics service that you want to cancel. | | accountName required | string | The name of the account for which you want start running Diagnostic Services. An account name is usually numeric, and must include any leading zeros. | | devices required | array of objects | The devices on which you want to stop running diagnostics. | | devices.id required | string | a device identifier value | | devices.kind required | string | type of serial number IMEI ESN MEID | | attributes required | array of objects | The RF parameters that you want to stop observing. | | attributes.name required | string | examples: RADIO_SIGNAL_STRENGTH LINK_QUALITY NETWORK_BEARER CELL_ID | #### Example Request Body ```json { "transactionID": "5f4bd2ff-5d7f-444d-af17-3f6a80bb2a94", "accountName": "TestQAAccount", "devices": [ { "id": "15-digit IMEI", "kind": "IMEI" } ], "attributes": [ { "name": "RADIO_SIGNAL_STRENGTH" }, { "name": "LINK_QUALITY" }, { "name":"NETWORK_BEARER" }, { "name":"CELL_ID" } ], } ``` ### Success Responses **Status 200** A success response contains the current status of the report. | Parameter Name | Data Type | Description | |:--------------:|:------------------:|:----------------------------------------------------------------------:| | createdOn | string($date-time) | The date and time of when this request was created. | | transactionID | string | The transaction ID of the diagnostics service that you want to cancel. | | status | string | Status of the request. | #### Example Success Response ```json { "createdOn": "2019-09-10T19:05:33.330579352Z", "transactionID": "9c7bb124-11f5-4ff3-8a88-0eec1ba99205", "status": "CANCEL_OBSERVE_PENDING" } ``` ### Asynchronous Callback | Parameter Name | Data Type | Description | |:-----------------------------:|:------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| | transactionID | string | The transaction ID of the diagnostics service that you canceled. | | accountName | string | The name of the account for which you want to stop running Diagnostic Services. An account name is usually numeric, and must include any leading zeros. | | device | array of objects | The device on which you stopped running diagnostics. | | device.id | string | A device identifier value. | | device.kind | string | Type of identifier IMEI ESN MEID | | attributes | array of objects | Attributes are streaming RF parameters that you wanted to stop observing.examples: RADIO_SIGNAL_STRENGTH LINK_QUALITY NETWORK_BEARER CELL_ID | | attributes.updatedOn | dateTime | The date and time the status was updated. | | attributes.name | string | Name of the attribute. | | attributes.value | string | Represents the current streaming value for the requested attribute from the device. | | attributes.error | string | The error code and error message. | | attributes.error.errorCode | string | Error code. | | attributes.error.errorMessage | string | Error message. | | status | string | The status of the diagnostic observation. Valid values include: OBSERVE_READY - Requested observation has reached the server and is ready to start observation from the device. OBSERVE_INPROGRESS - Device started sending the requested observation data. CANCEL_OBSERVE_SUCCESS - The Cancel Observe request is successful. OBSERVE_DURATION_EXPIRED - The requested device observation duration is expired. OBSERVE_FAILURE - The requested observation has failed because of an error. CANCEL_OBSERVE_FAILURE - The requested Cancel Observe request failed because of an error. OBSERVE_NOT_ALLOWED - Account allowance is out/no more allowed usage. | | error | string | The error code and error message | | createdOn | string($date-time) | The date and time of when this request was created. | #### Example Callback Success Response ```json { "transactionID":"34c853e1-e9ca-4bf3-ae04-bc6c09210aba", "accountName":"0000123456-00001", "device":{ "id":15-digit IMEI, "kind":"IMEI" }, "attributes":[ { "updatedOn":"2020-02-29 01:07:02.829 +0000 UTC", "name":"CELL_ID", "value":0, "error":{ "errorCode":"", "errorMessage":"" }, "status":"CANCEL_OBSERVE_SUCCESS" } ], "error":{ "errorCode":"", "errorMessage":"" }, "createdOn":"2020-02-29 01:07:02.829 +0000 UTC" } ``` #### Example Callback when device is unable to start observation, with an error ```json { "transactionID":"1b24047e-f35e-4d3e-aa60-675914fcbb15", "accountName":"0000123456-00001", "device":{ "id":15-digit IMEI, "kind":"IMEI" }, "attributes":[ { "updatedOn":"2020-03-20 04:00:29.1488572 +0000 UTC", "name":"RADIO_SIGNAL_STRENGTH", "value":"", "error":{ "errorCode":"INTERNAL_SYSTEM_ERROR", "errorMessage":"9000, Internal system error" }, "status":"CANCEL_OBSERVE_FAILURE" } ], "error":{ "errorCode":"INTERNAL_SYSTEM_ERROR", "errorMessage":"9000, Internal system error" }, "createdOn":"2020-03-20 04:00:29.148856888 +0000 UTC" } ``` ### Failure Responses Status 400 All error messages are returned in this format: ```json { "errorCode": "error code string", "errorMessage": "error message string" } ```