# activity logs — NCM API

Actions taken in NetCloud Manager, recorded as activities: who did what, and when. Read-only, a single list call. Use it for operational history across the account; the audit log covers changes to individual objects, and router logs covers events the device itself reported.

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

### GET /activity_logs/

Get information about activity_logs

<p>Use the activity_logs endpoint to retrieve NCM activity log information.</p><p>Example URL</p><pre> https://www.cradlepointecm.com/api/v2/activity_logs/</pre>

| 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 | integer | no | The ID of your account |
| created_at__exact | query | string | no | The exact date/time when the activity log event was created |
| created_at__lt | query | string | no | Less than date/time filtering operator for when the activity log event was created |
| created_at__lte | query | string | no | Less than or equal date/time filtering operator for when the activity log event was created |
| created_at__gt | query | string | no | Greater than date/time filtering operator for when the activity log event was created |
| created_at__gte | query | string | no | Greater than or equal date/time filtering operator for when the activity log event was created |
| action__timestamp__exact | query | string | no | The exact date/time when the action occurred |
| action__timestamp__lt | query | string | no | Less than date/time filtering operator for when action occurred |
| action__timestamp__lte | query | string | no | Less than or equal date/time filtering operator for when action occurred |
| action__timestamp__gt | query | string | no | Greater than date/time filtering operator for when action occurred |
| action__timestamp__gte | query | string | no | Greater than or equal date/time filtering operator for when action occurred |
| actor__id | query | string | no | The user ID of the actor who took the action |
| object__id | query | string | no | The exact ID of the object for the activity |
| action__id__exact | query | string | no | The exact ID of the action of the activity |
| actor__type | query | string (system | api_key | router | sso_user | access_point) | no | Type of actor who took the action |
| action__type | query | string (create | delete | update | request | report | register | unregister | activate) | no | Type of action taken |
| object__type | query | string (group | router | schedule | task | api_key | net_device | notifier | feature_binding | authorization | remote_connection | remote_connection_profile | remote_lan_management | access_point | network) | no | Type of object the action was taken upon |
| 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/activity_logs/" \
  -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": [
    {
      "action": {
        "after": {
          "account": {
            "id": "8432354",
            "name": "API-created-subaccount"
          }
        },
        "before": {
          "account": {
            "id": "36304",
            "name": "New Subaccount Name"
          }
        },
        "id": "ceac0376-675c-11eb-bf0a-56fa34ed58df3",
        "timestamp": "2021-02-05T02:49:46.696383Z",
        "type": 3,
        "type_name": "update"
      },
      "actor": {
        "email": "actor@email.address",
        "id": "045fgBd0s344tzah0g",
        "type": 5,
        "type_name": "sso_user"
      },
      "object": {
        "id": "119012951",
        "role": {
          "id": "4",
          "name": "account_read_only"
        },
        "type": 12,
        "type_name": "authorization",
        "user": {
          "email": "user@email.address",
          "id": "vOAwbBPFbagt12l9"
        }
      }
    }
  ],
  "meta": {
    "limit": 20,
    "next": "https://www.cradlepointecm.com/api/v2/activity_logs/?action__id__lt=8f9db4d2-6a5d-11eb-a58d-5269e9f352ab"
  }
}
```
