> For the complete documentation index, see [llms.txt](https://docs.globalalerting.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.globalalerting.com/web-api/deleted-devices.md).

# Deleted Devices

## GET /V2/{tenantVarCode}/deleteddevices

> Returns deleted devices for specified tenant. Requires AccessAllDevices permission.

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Deleted Devices"}],"paths":{"/V2/{tenantVarCode}/deleteddevices":{"get":{"tags":["Deleted Devices"],"summary":"Returns deleted devices for specified tenant. Requires AccessAllDevices permission.","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}},{"name":"subtenants","in":"query","description":"When 'subtenants=true' the list contains devices for the tenant and all subtenants","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeletedDeviceRecord"}}},"application/json;IEEE754Compatible=false":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeletedDeviceRecord"}}},"application/json;IEEE754Compatible=true":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeletedDeviceRecord"}}},"application/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeletedDeviceRecord"}}},"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeletedDeviceRecord"}}},"application/octet-stream":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeletedDeviceRecord"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeletedDeviceRecord"}}},"text/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeletedDeviceRecord"}}},"text/csv":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeletedDeviceRecord"}}}}}}}}},"components":{"schemas":{"DeletedDeviceRecord":{"type":"object","properties":{"TenantCode":{"type":"string","description":"Tenant Var Code","nullable":true},"TenantDescription":{"type":"string","description":"Name used to describe the tenant (max 250 characters)","nullable":true},"DeviceId":{"type":"string","description":"A string that uniquely identifies the device.","nullable":true},"DeviceType":{"type":"string","description":"A string enumeration that defines the device type.","nullable":true},"FriendlyName":{"type":"string","description":"A string used to more easily identify the device","nullable":true},"Username":{"type":"string","description":"Redacted username (email address) of the last assigned owner of the device","nullable":true},"SecondaryDeviceId":{"type":"string","description":"Secondary Device Id for devices that send messages with multiple device identifiers.","nullable":true},"IridiumImei":{"type":"string","description":"Device IMEI","nullable":true},"SimNumber":{"type":"string","description":"Device Sim Number (ICCID)","nullable":true},"PhoneNumber":{"type":"string","description":"Device phone number (can be used only if device supports phone number property)","nullable":true},"DateDeleted":{"type":"string","description":"The date (UTC) that the device was deleted from the platform","format":"date-time"},"DeletedBy":{"type":"string","description":"Redacted username (email address) of the user that deleted the device","nullable":true}},"additionalProperties":false}}}}
```

## GET /V2/{tenantVarCode}/deleteddevices/{deviceId}

> Returns deleted devices for specified tenant and device id. Requires AccessAllDevices permission.

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"Deleted Devices"}],"paths":{"/V2/{tenantVarCode}/deleteddevices/{deviceId}":{"get":{"tags":["Deleted Devices"],"summary":"Returns deleted devices for specified tenant and device id. Requires AccessAllDevices permission.","operationId":"SearchDeletedDevices","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}},{"name":"deviceId","in":"path","description":"Device Id","required":true,"schema":{"type":"string"}},{"name":"subtenants","in":"query","description":"When 'subtenants=true' the list contains devices for the tenant and all subtenants","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeletedDeviceRecord"}}},"application/json;IEEE754Compatible=false":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeletedDeviceRecord"}}},"application/json;IEEE754Compatible=true":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeletedDeviceRecord"}}},"application/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeletedDeviceRecord"}}},"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeletedDeviceRecord"}}},"application/octet-stream":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeletedDeviceRecord"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeletedDeviceRecord"}}},"text/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeletedDeviceRecord"}}},"text/csv":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeletedDeviceRecord"}}}}}}}}},"components":{"schemas":{"DeletedDeviceRecord":{"type":"object","properties":{"TenantCode":{"type":"string","description":"Tenant Var Code","nullable":true},"TenantDescription":{"type":"string","description":"Name used to describe the tenant (max 250 characters)","nullable":true},"DeviceId":{"type":"string","description":"A string that uniquely identifies the device.","nullable":true},"DeviceType":{"type":"string","description":"A string enumeration that defines the device type.","nullable":true},"FriendlyName":{"type":"string","description":"A string used to more easily identify the device","nullable":true},"Username":{"type":"string","description":"Redacted username (email address) of the last assigned owner of the device","nullable":true},"SecondaryDeviceId":{"type":"string","description":"Secondary Device Id for devices that send messages with multiple device identifiers.","nullable":true},"IridiumImei":{"type":"string","description":"Device IMEI","nullable":true},"SimNumber":{"type":"string","description":"Device Sim Number (ICCID)","nullable":true},"PhoneNumber":{"type":"string","description":"Device phone number (can be used only if device supports phone number property)","nullable":true},"DateDeleted":{"type":"string","description":"The date (UTC) that the device was deleted from the platform","format":"date-time"},"DeletedBy":{"type":"string","description":"Redacted username (email address) of the user that deleted the device","nullable":true}},"additionalProperties":false}}}}
```
