# configuration managers — NCM API

The configuration applied to each device, and the endpoint through which you change it. Read, replace and patch, since configurations attach to devices rather than existing standalone. This is where config drift is detected and corrected, and the change is recorded in the audit log.

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

## Authentication

This is a v2 endpoint (`/api/v2/` path). Every request requires ALL FOUR API-key headers:

| Header | Description |
| --- | --- |
| X-CP-API-ID | Cradlepoint API ID |
| X-CP-API-KEY | Cradlepoint API key |
| X-ECM-API-ID | ECM API ID |
| X-ECM-API-KEY | ECM API key |

Keys are generated in the NCM UI under API Keys, separately from v3 tokens. The v2 and v3 auth schemes are NOT interchangeable: a v3 Bearer token is rejected on v2 endpoints.

### GET /configuration_managers/

Get information about configuration_managers

Use the GET method on this endpoint to retrieve configuration_managers 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 contains the configuration_managers record |
| account__in | query | in: int<br />out: url | no | Filter for account contains - a comma-separated list of account IDs |
| id | query | integer | no | ID of a configuration_managers record |
| id__in | query | integer | no | Filter for ID contains - a comma-separated list of configuration_managers record IDs |
| router | query | in: int<br />out: url | no | Router ID |
| router__in | query | in: int<br />out: url | no | Filter for router ID contains - a comma-separated list of router-record IDs |
| synched | query | boolean | no | True if device configuration is synced |
| suspended | query | boolean | no | True if device configuration sync is paused |
| expand | query | string (account | router) | 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/configuration_managers/" \
  -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/<account number>/",
      "actual": [
        {
          "ecm": {
            "config_version": 28
          },
          "gre": {
            "tunnels": {
              "0": {
                "_id_": "00000000-e18b-3714-86cd-152498cbeeec",
                "dhcp_enabled": false,
                "enabled": true,
                "exception_route_mode": "route",
                "fail_back_to": "",
                "fail_over_to": "",
                "keep_alive_enabled": true,
                "keep_alive_period": 10,
                "keep_alive_retries": 3,
                "key": null,
                "local_network": "10.0.0.1",
                "name": "GRE Tunnel",
                "nemo": false,
                "netmask": "255.255.255.252",
                "remote_gateway": "166.18.88.35",
                "remote_network": "10.0.0.2",
                "routes": [
                  {}
                ],
                "ttl": 64,
                "wan_dev": "disabled",
                "wan_trigger_field": "uid",
                "wan_trigger_predicate": "is",
                "wan_trigger_value": ""
              }
            }
          },
          "routing": {
            "eigrp": {
              "routers": {
                "0": {
                  "asn": 100,
                  "enabled": true,
                  "interfaces": [
                    {
                      "authentication": [],
                      "bandwidth": 100,
                      "device": "00000000-e18b-3714-86cd-152498cbeeec",
                      "hello_interval": 10,
                      "hold_time": 40,
                      "throughput_delay": 100
                    }
                  ],
                  "neighbors": [],
                  "networks": [],
                  "redistribute": [],
                  "router_id": "1.1.1.1",
                  "timers_active_time_disabled": false
                }
              }
            }
          },
          "stats": {
            "client_usage": {
              "enabled": true
            }
          },
          "system": {
            "admin": {
              "product_name": "AER2200-600M"
            },
            "gps": {
              "enabled": true
            },
            "show_cloud_setup": false,
            "system_id": "AER2200-b09-Home",
            "ui_activated": true,
            "users": {
              "0": {
                "password": "*"
              }
            }
          },
          "wan": {
            "connectionsets": {
              "0": {
                "mode": "loadbalance"
              }
            },
            "datacap": {
              "enabled": true
            },
            "rules2": {
              "0": {
                "connectionset": 1,
                "failureCheck": {
                  "mode": "active_ping",
                  "ping_target": "192.168.0.1"
                }
              },
              "1": {
                "failureCheck": {
                  "idle_seconds": 30,
                  "mode": "active_ping",
                  "ping_target": "192.168.0.1"
                }
              },
              "2": {
                "failureCheck": {
                  "idle_seconds": 30,
                  "mode": "active_ping",
                  "ping_target": "192.168.0.1"
                }
              },
              "3": {
                "failureCheck": {
                  "idle_seconds": 30,
                  "mode": "active_ping",
                  "ping_target": "192.168.0.1"
                }
              },
              "4": {
                "failureCheck": {
                  "idle_seconds": 30,
                  "mode": "active_ping",
                  "ping_target": "192.168.0.1"
                }
              }
            },
            "swans": {
              "criteria": {
                "datausage": {
                  "enabled": true
                }
              },
              "enabled": true
            }
          },
          "wlan": {
            "radio": {
              "0": {
                "bss": {
                  "0": {
                    "ssid": "AER2200-b09-JE-Home"
                  }
                }
              }
            }
          }
        },
        []
      ],
      "configuration": [
        {
          "gre": {
            "tunnels": {
              "00000000-e18b-3714-86cd-152498cbeeec": {
                "_id_": "00000000-e18b-3714-86cd-152498cbeeec",
                "dhcp_enabled": false,
                "enabled": true,
                "exception_route_mode": "route",
                "fail_back_to": "",
                "fail_over_to": "",
                "keep_alive_enabled": true,
                "keep_alive_period": 10,
                "keep_alive_retries": 3,
                "key": null,
                "local_network": "10.0.0.1",
                "name": "GRE Tunnel",
                "nemo": false,
                "netmask": "255.255.255.252",
                "remote_gateway": "166.18.88.35",
                "remote_network": "10.0.0.2",
                "routes": {
                  "0": {}
                },
                "ttl": 64,
                "wan_dev": "disabled",
                "wan_trigger_field": "uid",
                "wan_trigger_predicate": "is",
                "wan_trigger_value": ""
              }
            }
          },
          "routing": {
            "eigrp": {
              "routers": {
                "0": {
                  "asn": 100,
                  "enabled": true,
                  "interfaces": {
                    "0": {
                      "authentication": [],
                      "bandwidth": 100,
                      "device": "00000000-e18b-3714-86cd-152498cbeeec",
                      "hello_interval": 10,
                      "hold_time": 40,
                      "throughput_delay": 100
                    }
                  },
                  "neighbors": [],
                  "networks": [],
                  "redistribute": [],
                  "router_id": "1.1.1.1",
                  "timers_active_time_disabled": false
                }
              }
            }
          },
          "stats": {
            "client_usage": {
              "enabled": true
            }
          },
          "system": {
            "admin": {
              "product_name": "AER2200-600M"
            },
            "gps": {
              "enabled": true
            },
            "show_cloud_setup": false,
            "system_id": "AER2200-b09-Home",
            "ui_activated": true,
            "users": {
              "0": {
                "password": "*"
              }
            }
          },
          "wan": {
            "connectionsets": {
              "0": {
                "mode": "loadbalance"
              }
            },
            "datacap": {
              "enabled": true
            },
            "rules2": {
              "00000000-a81d-3590-93ca-8b1fcfeb8e14": {
                "_id_": "00000000-a81d-3590-93ca-8b1fcfeb8e14",
                "connectionset": 1,
                "failureCheck": {
                  "mode": "active_ping",
                  "ping_target": "192.168.0.1"
                }
              },
              "00000001-a81d-3590-93ca-8b1fcfeb8e14": {
                "_id_": "00000001-a81d-3590-93ca-8b1fcfeb8e14",
                "failureCheck": {
                  "idle_seconds": 30,
                  "mode": "active_ping",
                  "ping_target": "192.168.0.1"
                }
              },
              "00000002-a81d-3590-93ca-8b1fcfeb8e14": {
                "_id_": "00000002-a81d-3590-93ca-8b1fcfeb8e14",
                "failureCheck": {
                  "idle_seconds": 30,
                  "mode": "active_ping",
                  "ping_target": "192.168.0.1"
                }
              },
              "00000003-a81d-3590-93ca-8b1fcfeb8e14": {
                "_id_": "00000003-a81d-3590-93ca-8b1fcfeb8e14",
                "failureCheck": {
                  "idle_seconds": 30,
                  "mode": "active_ping",
                  "ping_target": "192.168.0.1"
                }
              },
              "00000004-a81d-3590-93ca-8b1fcfeb8e14": {
                "_id_": "00000004-a81d-3590-93ca-8b1fcfeb8e14",
                "failureCheck": {
                  "idle_seconds": 30,
                  "mode": "active_ping",
                  "ping_target": "192.168.0.1"
                }
              }
            },
            "swans": {
              "criteria": {
                "datausage": {
                  "enabled": true
                }
              },
              "enabled": true
            }
          },
          "wlan": {
            "radio": {
              "0": {
                "bss": {
                  "0": {
                    "ssid": "AER2200-b09-JE-Home"
                  }
                }
              }
            }
          }
        },
        []
      ],
      "id": "2163609",
      "pending": [
        {},
        []
      ],
      "resource_url": "https://www.cradlepointecm.com/api/v2/configuration_managers/2163609/",
      "router": "https://www.cradlepointecm.com/api/v2/routers/2162719/",
      "suspended": false,
      "synched": true,
      "target": [
        {
          "ecm": {
            "config_version": 28
          },
          "gre": {
            "tunnels": {
              "00000000-e18b-3714-86cd-152498cbeeec": {
                "_id_": "00000000-e18b-3714-86cd-152498cbeeec",
                "dhcp_enabled": false,
                "enabled": true,
                "exception_route_mode": "route",
                "fail_back_to": "",
                "fail_over_to": "",
                "keep_alive_enabled": true,
                "keep_alive_period": 10,
                "keep_alive_retries": 3,
                "key": null,
                "local_network": "10.0.0.1",
                "name": "GRE Tunnel",
                "nemo": false,
                "netmask": "255.255.255.252",
                "remote_gateway": "166.18.88.35",
                "remote_network": "10.0.0.2",
                "routes": {
                  "0": {}
                },
                "ttl": 64,
                "wan_dev": "disabled",
                "wan_trigger_field": "uid",
                "wan_trigger_predicate": "is",
                "wan_trigger_value": ""
              }
            }
          },
          "routing": {
            "eigrp": {
              "routers": {
                "0": {
                  "asn": 100,
                  "enabled": true,
                  "interfaces": {
                    "0": {
                      "authentication": [],
                      "bandwidth": 100,
                      "device": "00000000-e18b-3714-86cd-152498cbeeec",
                      "hello_interval": 10,
                      "hold_time": 40,
                      "throughput_delay": 100
                    }
                  },
                  "neighbors": [],
                  "networks": [],
                  "redistribute": [],
                  "router_id": "1.1.1.1",
                  "timers_active_time_disabled": false
                }
              }
            }
          },
          "stats": {
            "client_usage": {
              "enabled": true
            }
          },
          "system": {
            "admin": {
              "product_name": "AER2200-600M"
            },
            "gps": {
              "enabled": true
            },
            "show_cloud_setup": false,
            "system_id": "AER2200-b09-Home",
            "ui_activated": true,
            "users": {
              "0": {
                "password": "*"
              }
            }
          },
          "wan": {
            "connectionsets": {
              "0": {
                "mode": "loadbalance"
              }
            },
            "datacap": {
              "enabled": true
            },
            "rules2": {
              "00000000-a81d-3590-93ca-8b1fcfeb8e14": {
                "_id_": "00000000-a81d-3590-93ca-8b1fcfeb8e14",
                "connectionset": 1,
                "failureCheck": {
                  "mode": "active_ping",
                  "ping_target": "192.168.0.1"
                }
              },
              "00000001-a81d-3590-93ca-8b1fcfeb8e14": {
                "_id_": "00000001-a81d-3590-93ca-8b1fcfeb8e14",
                "failureCheck": {
                  "idle_seconds": 30,
                  "mode": "active_ping",
                  "ping_target": "192.168.0.1"
                }
              },
              "00000002-a81d-3590-93ca-8b1fcfeb8e14": {
                "_id_": "00000002-a81d-3590-93ca-8b1fcfeb8e14",
                "failureCheck": {
                  "idle_seconds": 30,
                  "mode": "active_ping",
                  "ping_target": "192.168.0.1"
                }
              },
              "00000003-a81d-3590-93ca-8b1fcfeb8e14": {
                "_id_": "00000003-a81d-3590-93ca-8b1fcfeb8e14",
                "failureCheck": {
                  "idle_seconds": 30,
                  "mode": "active_ping",
                  "ping_target": "192.168.0.1"
                }
              },
              "00000004-a81d-3590-93ca-8b1fcfeb8e14": {
                "_id_": "00000004-a81d-3590-93ca-8b1fcfeb8e14",
                "failureCheck": {
                  "idle_seconds": 30,
                  "mode": "active_ping",
                  "ping_target": "192.168.0.1"
                }
              }
            },
            "swans": {
              "criteria": {
                "datausage": {
                  "enabled": true
                }
              },
              "enabled": true
            }
          },
          "wlan": {
            "radio": {
              "0": {
                "bss": {
                  "0": {
                    "ssid": "AER2200-b09-JE-Home"
                  }
                }
              }
            }
          }
        },
        []
      ],
      "version_number": 28
    }
  ],
  "meta": {
    "limit": 20,
    "next": null,
    "offset": 0,
    "previous": null
  }
}
```

### PUT /configuration_managers/{id}/

Update a configuration_managers record

Update a configuration_managers record, by ID

| 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 | The ID of the configuration_managers record to modify |

**Request body**

**Example request**

```bash
curl -X PUT "https://www.cradlepointecm.com/api/v2/configuration_managers/{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>" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
```

**Response 200** — Example response.

```json
{
  "configuration": [
    {},
    []
  ]
}
```

### PATCH /configuration_managers/{id}/

Update a configuration_managers record

<p>This method updates a configuration_managers for associated id.</p>

| 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 | The ID of the configuration_managers record to modify |

**Request body**

**Example request**

```bash
curl -X PATCH "https://www.cradlepointecm.com/api/v2/configuration_managers/{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>" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
```

**Response 200** — Example response.

```json
{
  "0": "value for data at position 0",
  "1": "value for data at position 1"
}
```
