# device app versions — NCM API

The published versions of each device app, so you can see what is available to deploy and what a device is running. List versions or delete one by ID; versions are created by uploading through NetCloud Manager rather than through this endpoint.

Base URL: https://www.cradlepointecm.com/api/v2

### GET /device_app_versions/

Get information about device_app_versions

Use the GET method on this endpoint to retrieve device_app_versions records. Use the available filtering fields to narrow or broaden your search.

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| X-ECM-API-ID | header | string | yes | <strong>ECM API app Id</strong> |
| X-ECM-API-KEY | header | string | yes | <strong>ECM API app key</strong> |
| X-CP-API-ID | header | string | yes | <strong>Cradlepoint API app Id</strong> |
| X-CP-API-KEY | header | string | yes | <strong>Cradlepoint API access key</strong> |
| account | query | in: int<br />out: url | no | Account that owns the Device App Versions object |
| account__in | query | in: int<br />out: url | no | Filter for account ID contains - a comma-separated list of account record IDs |
| app | query | in: int<br />out: url | no | Associated device_apps object |
| app__in | query | in: int<br />out: url | no | Filter for app contains - a comma-separated list of device_apps record IDs |
| id | query | integer | no | ID of a device_app_versions record |
| id__in | query | integer | no | Filter for device_app_versions ID contains - a comma-separated list of Device App Versions record IDs |
| state | query | string (Ready | Started) | no | State of a device_app_versions object (Ready, Started, Stopped) |
| state__in | query | string | no | Filter for state contains - a comma-separated list of states (see the state field above for state values) |
| expand | query | string (account) | no | Specifies that the returned value for the passed in attribute be expanded in the response body. |
| limit | query | integer | no | Restricts the number of records returned in a recordset to this value. Max value is 500. |
| offset | query | integer | no | Specifies where (an index) in a recordset to begin returning records. |

**Example request**

```bash
curl "https://www.cradlepointecm.com/api/v2/device_app_versions/" \
  -H "X-CP-API-ID: <cp-api-id>" \
  -H "X-CP-API-KEY: <cp-api-key>" \
  -H "X-ECM-API-ID: <ecm-api-id>" \
  -H "X-ECM-API-KEY: <ecm-api-key>"
```

**Response 200** — Example response.

```json
{
  "data": [
    {
      "account": "https://www.cradlepointecm.com/api/v2/accounts//",
      "app": "https://www.cradlepointecm.com/api/v2/device_apps/1442/",
      "created_at": "2021-02-10T22:44:22.763337+00:00",
      "id": "8613",
      "resource_url": "https://www.cradlepointecm.com/api/v2/device_app_versions/8613/",
      "state": "ready",
      "state_details": "",
      "updated_at": "2021-02-10T22:44:23.073839+00:00",
      "version": "2.0.0"
    }
  ],
  "meta": {
    "limit": 20,
    "next": null,
    "offset": 0,
    "previous": null
  }
}
```

### DELETE /device_app_versions/{id}/

Delete a device_app_versions record

Use the DELETE method on this endpoint to delete a device_app_versions record. This method requires the ID of the device_app_versions record to delete. Performing a DELETE action removes the record from NetCloud and can't be reversed.

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| X-ECM-API-ID | header | string | yes | <strong>ECM API app Id</strong> |
| X-ECM-API-KEY | header | string | yes | <strong>ECM API app key</strong> |
| X-CP-API-ID | header | string | yes | <strong>Cradlepoint API app Id</strong> |
| X-CP-API-KEY | header | string | yes | <strong>Cradlepoint API access key</strong> |
| id | path | integer | yes | ID of the device_app_versions object to delete |

**Example request**

```bash
curl -X DELETE "https://www.cradlepointecm.com/api/v2/device_app_versions/{id}/" \
  -H "X-CP-API-ID: <cp-api-id>" \
  -H "X-CP-API-KEY: <cp-api-key>" \
  -H "X-ECM-API-ID: <ecm-api-id>" \
  -H "X-ECM-API-KEY: <ecm-api-key>"
```

**Response 200** — No response was specified
