# device app states — NCM API

The current state of a device app on each device: whether it installed, is running, or failed. Read-only, a single list call. This is what to poll after creating a device app binding, to confirm the rollout actually landed.

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

### GET /device_app_states/

Get information about device_app_states

Use the GET method on this endpoint to retrieve device_app_states 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_states object |
| account__in | query | in: int<br />out: url | no | Filter for account contains - a comma-separated list of account record IDs |
| router | query | in: int<br />out: url | no | Router where the Device App is installed |
| router__in | query | in: int<br />out: url | no | Filter for router ID contains - a comma-separated list of router record IDs |
| app_version | query | in: int<br />out: url | no | The version ID of the associated device_app_versions |
| app_version__in | query | in: int<br />out: url | no | Filter for app_version contains - a comma-separated list of associated device_app_versions version IDs |
| id | query | integer | no | device_app_states record object ID |
| id__in | query | integer | no | Filter for device_app_states ID contains - a comma-separated list of device_app_states record IDs |
| state | query | string | no | device_app_states object state |
| state__in | query | string | no | Filter for device_app_states state contains - a comma-separated list of state record states |
| 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_states/" \
  -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/241/",
      "app_version": "https://www.cradlepointecm.com/api/v2/device_app_versions/112/",
      "state": "started",
      "router": "https://www.cradlepointecm.com/api/v2/routers/77/",
      "created_at": "2015-08-10T16:19:31.784055+00:00",
      "updated_at": "2015-09-22T10:35:55.182602+00:00",
      "id": "17",
      "resource_url": "https://www.cradlepointecm.com/api/v2/device_apps/17/"
    },
    {}
  ],
  "meta": {
    "limit": 20,
    "next": null,
    "offset": 0,
    "previous": null
  }
}
```
