# Devices

Download the [specification](https://api.kpnthings.com/openapi-specifications/devices)

In addition to the standard create, retrieve, update, delete, and list actions, devices expose two important sub-collections.&#x20;

The **device-groups** sub-resource allows you to view and manage the groups a device belongs to, complementing the platform’s top-level [`/device-groups`](/kpn-things/general-functions/apis/device-groups.md) resource.&#x20;

The **network-adapters** sub-resource provides access to the physical connectivity interfaces of a device—such as cellular (IMEI-based), LoRa (DevEUI-based), or generic internet adapters—which determine how the device connects to the platform.&#x20;

## Retrieve devices, filtered by search term and / or client ID.

> Retrieve all devices that match the query parameters given. If a search parameter is provided, devices whose name or description (partially) match are returned.

```json
{"openapi":"3.1.0","info":{"title":"Things Device API","version":"0.15.0"},"servers":[{"url":"https://api.kpnthings.com","description":"Things API Environment"}],"security":[{"BearerAuth":["device.read"]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"parameters":{"cursor":{"name":"cursor","in":"query","description":"String that encodes all necessary information to retrieve a page.","style":"form","explode":true,"schema":{"type":"string","format":"cursor"}},"limit":{"name":"limit","in":"query","description":"Limit the number of results (per page).","style":"form","explode":true,"schema":{"type":"integer","default":50}},"sort":{"name":"sort","in":"query","description":"Sorting fields separated by comma. Default order is Ascending (ASC), minus(-) should be used in front of field name for Descending (DESC) order.","style":"form","explode":true,"schema":{"type":"string"}}},"schemas":{"PageOfDevices":{"type":"object","allOf":[{"$ref":"#/components/schemas/Page"},{"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DeviceResponse"}}}}],"description":"A paginated list of devices","title":"PageOfDevices"},"Page":{"type":"object","description":"Page of items","properties":{"items":{"type":"array","items":{}},"next":{"type":"string","format":"uri","description":"Pagination link pointing to the next page. Only provided when not at the last page."},"prev":{"type":"string","format":"uri","description":"Pagination link pointing to the previous page. Only provided when not at the first page."}},"required":["items"],"title":"Page"},"DeviceResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/Device"},{"type":"object","description":"Embedded items for the device","properties":{"_embedded":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"},"deviceSpecification":{"$ref":"#/components/schemas/DeviceSpecification"}}}}}],"description":"Device with optional embedded entities","title":"DeviceResponse"},"Device":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the device","readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the device is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the device.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the device is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the device.","readOnly":true},"name":{"type":"string","description":"Name of this device","maxLength":255,"minLength":1,"pattern":"^(?!\\s*$).+"},"status":{"$ref":"#/components/schemas/DeviceStatus"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"A JSON object containing key-value metadata"},"barcode":{"type":"string","description":"Barcode of the device"},"description":{"type":"string","description":"Description of this device","maxLength":255},"clientId":{"type":"string","format":"uuid","description":"ID of owning client"},"projectId":{"type":"string","format":"uuid","description":"ID of the project the device belongs to"},"deviceSpecificationId":{"type":"string","format":"uuid","description":"ID of the device specification of the device"},"networkAdapters":{"type":"array","description":"List of network adapters attached to the device","items":{"$ref":"#/components/schemas/NetworkAdapter"}}},"required":["clientId","deviceSpecificationId","name","projectId"],"title":"Device"},"DeviceStatus":{"type":"string","description":"Status of the device. Known values include: ACTIVE and INACTIVE"},"NetworkAdapter":{"type":"object","description":"A network adapter","discriminator":{"propertyName":"type","mapping":{"cellular":"#/components/schemas/CellularNetworkAdapter","generic":"#/components/schemas/GenericNetworkAdapter","lora":"#/components/schemas/LoraNetworkAdapter"}},"oneOf":[{"$ref":"#/components/schemas/CellularNetworkAdapter"},{"$ref":"#/components/schemas/GenericNetworkAdapter"},{"$ref":"#/components/schemas/LoraNetworkAdapter"}],"properties":{"type":{"type":"string","description":"The type of network adapter. Known values are: cellular, generic and lora"},"urn":{"description":"The URN for this network adapter","readOnly":true}},"required":["type","urn"],"title":"NetworkAdapter"},"CellularNetworkAdapter":{"type":"object","description":"Network adapter used to connect to cellular (mobile) networks","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'cellular' for CellularNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"imei":{"type":"string","description":"The International Mobile Equipment Identity (IMEI) that identifies the cellular adapter","maxLength":16,"minLength":15},"iccId":{"type":"string","description":"The Integrated Circuit Card Identifier (ICCID) that identifies the SIM chip","maxLength":22,"minLength":18},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["imei","type"],"title":"CellularNetworkAdapter"},"GenericNetworkAdapter":{"type":"object","description":"Generic network adapter that provides access to the public Internet","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'generic' for GenericNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"dvnUuid":{"type":"string","format":"uuid","description":"The unique identifier for this network adapter; defaults to the device ID, but may be set to a different value"},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["dvnUuid","type"],"title":"GenericNetworkAdapter"},"LoraNetworkAdapter":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'lora' for LoraNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"devEui":{"type":"string","description":"The Device Extended Unique Identifier (DevEUI) that identifies the LoRa node","maxLength":16},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["devEui","type"],"title":"LoraNetworkAdapter"},"Project":{"type":"object","description":"Project in KPN Things that serves as a container for devices, destinations, flows and metadata","properties":{"id":{"type":"string","format":"uuid","description":"The entity ID","readOnly":true},"clientId":{"type":"string","format":"uuid","description":"ID of owning client"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the project is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the project.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the project is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the project.","readOnly":true},"name":{"allOf":[{"$ref":"#/components/schemas/NonBlankString"},{"type":"string","description":"The project name"}]},"description":{"allOf":[{"$ref":"#/components/schemas/NonBlankString"},{"type":"string","description":"A short description of the project"}]},"definition":{"$ref":"#/components/schemas/ProjectDefinition"}},"required":["clientId","definition","id","name"],"title":"Project"},"NonBlankString":{"type":"string","description":"Must not be empty or contain only whitespace.","minLength":1,"pattern":".*\\S.*"},"ProjectDefinition":{"type":"object","description":"Describes the type and constraints of a KPN Things Project","properties":{"type":{"type":"string","description":"The project type. Known values include: ASSET_INSURANCE_E2E, ASSET_TRACKING_E2E, ASSET_TRACKING_RESELLER, CONDITION_MONITORING_E2E, CUSTOM, CUSTOM_RESELLER, EXPLORER, EXPLORER_WITH_M2M, FILL_LEVEL_E2E, FILL_LEVEL_RESELLER, FREEMIUM, FREEMIUM_WITH_M2M, MODULAR, MODULAR_RESTRICTED, TAILORED and UNLIMITED"},"maxDevices":{"type":"integer","format":"int32","description":"The maximum number of devices that can be registered under a project. -1 means unbounded."},"maxDestinations":{"type":"integer","format":"int32","description":"The maximum number of destinations that can be registered under a project. -1 means unbounded."},"maxDeviceGroups":{"type":"integer","format":"int32","description":"The maximum number of device groups that can be registered under a project. -1 means unbounded."}},"required":["type"],"title":"ProjectDefinition"},"DeviceSpecification":{"type":"object","description":"The specification for a device","properties":{"id":{"type":"string","format":"uuid","description":"The id of the device specification","readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the device specification is created in the system","readOnly":true},"createdBy":{"type":"string","description":"The user who created the device specification","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the device is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the device specification","readOnly":true},"name":{"type":"string","description":"Name of this device specification"},"description":{"type":"string","description":"Description of this device specification"},"manufacturer":{"type":"string","description":"The manufacturer of the device this specification is about"},"model":{"type":"string","description":"The model of the device the specification is about"},"managed":{"type":"boolean","default":false,"description":"Indicates whether the device specification is managed by KPN"},"availability":{"type":"string","default":"PRIVATE","description":"The availability of the device specification","enum":["GLOBAL","PRIVATE"]},"clientId":{"type":"string","format":"uuid","description":"ID of owning client"}},"required":["clientId","manufacturer","model","name"],"title":"DeviceSpecification"},"Problem":{"type":"object","description":"Error information details","properties":{"type":{"type":"string","format":"uri-reference","default":"about:blank","description":"A URI reference that uniquely identifies the problem type only in the\ncontext of the provided API. Opposed to the specification in RFC-9457,\nit is neither recommended to be dereferenceable and point to a\nhuman-readable documentation nor globally unique for the problem type."},"title":{"type":"string","description":"A short summary of the problem type. Written in English and readable\nfor engineers, usually not suited for non technical stakeholders and\nnot localized."},"status":{"type":"integer","format":"int32","description":"The HTTP status code generated by the origin server for this occurrence\nof the problem.","exclusiveMaximum":600,"minimum":100},"detail":{"type":"string","description":"A human readable explanation specific to this occurrence of the\nproblem that is helpful to locate the problem and give advice on how\nto proceed. Written in English and readable for engineers, usually not\nsuited for non technical stakeholders and not localized."},"instance":{"type":"string","format":"uri-reference","description":"A URI reference that identifies the specific occurrence of the problem,\ne.g. by adding a fragment identifier or sub-path to the problem type.\nMay be used to locate the root of this problem in the source code."}},"title":"Problem"}},"responses":{"badRequest":{"description":"Request is missing required information or invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"paths":{"/devices":{"get":{"summary":"Retrieve devices, filtered by search term and / or client ID.","description":"Retrieve all devices that match the query parameters given. If a search parameter is provided, devices whose name or description (partially) match are returned.","operationId":"searchDevices","parameters":[{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/sort"},{"name":"q","in":"query","description":"Include only devices whose name or description contain the search term.  Matching is done case-insensitively.","style":"form","explode":true,"schema":{"type":"string","minLength":1}},{"name":"clientId","in":"query","description":"Include only owned devices that match the provided clientId.  If clientId is omitted, all owned devices are included.","style":"form","explode":true,"schema":{"type":"string","format":"uuid"}},{"name":"barcode","in":"query","description":"Include only devices owned by the client partially matching barcode.","style":"form","explode":true,"schema":{"type":"string"}},{"name":"deviceSpecificationId","in":"query","description":"Filter devices by their device specification.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"createdBefore","in":"query","description":"Include only devices created before the provided date and time. The date-time must be in ISO 8601 format.","style":"form","explode":true,"schema":{"type":"string","format":"date-time"}},{"name":"createdSince","in":"query","description":"Include only devices created at or after the provided date and time. The date-time must be in ISO 8601 format.","style":"form","explode":true,"schema":{"type":"string","format":"date-time"}},{"name":"modifiedBefore","in":"query","description":"Include only devices modified before the provided date and time. The date-time must be in ISO 8601 format.","style":"form","explode":true,"schema":{"type":"string","format":"date-time"}},{"name":"modifiedSince","in":"query","description":"Include only devices modified at or after the provided date and time. The date-time must be in ISO 8601 format.","style":"form","explode":true,"schema":{"type":"string","format":"date-time"}},{"name":"embed","in":"query","description":"Results to embed in the response.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["project","deviceSpecification"]}}}],"responses":{"200":{"description":"Page of filtered devices. Only devices that are accessible to the caller are returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageOfDevices"}}}},"400":{"$ref":"#/components/responses/badRequest"}}}}}}
```

## Create a new device.

> Create a new device.

```json
{"openapi":"3.1.0","info":{"title":"Things Device API","version":"0.15.0"},"servers":[{"url":"https://api.kpnthings.com","description":"Things API Environment"}],"security":[{"BearerAuth":["device.write"]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Device":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the device","readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the device is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the device.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the device is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the device.","readOnly":true},"name":{"type":"string","description":"Name of this device","maxLength":255,"minLength":1,"pattern":"^(?!\\s*$).+"},"status":{"$ref":"#/components/schemas/DeviceStatus"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"A JSON object containing key-value metadata"},"barcode":{"type":"string","description":"Barcode of the device"},"description":{"type":"string","description":"Description of this device","maxLength":255},"clientId":{"type":"string","format":"uuid","description":"ID of owning client"},"projectId":{"type":"string","format":"uuid","description":"ID of the project the device belongs to"},"deviceSpecificationId":{"type":"string","format":"uuid","description":"ID of the device specification of the device"},"networkAdapters":{"type":"array","description":"List of network adapters attached to the device","items":{"$ref":"#/components/schemas/NetworkAdapter"}}},"required":["clientId","deviceSpecificationId","name","projectId"],"title":"Device"},"DeviceStatus":{"type":"string","description":"Status of the device. Known values include: ACTIVE and INACTIVE"},"NetworkAdapter":{"type":"object","description":"A network adapter","discriminator":{"propertyName":"type","mapping":{"cellular":"#/components/schemas/CellularNetworkAdapter","generic":"#/components/schemas/GenericNetworkAdapter","lora":"#/components/schemas/LoraNetworkAdapter"}},"oneOf":[{"$ref":"#/components/schemas/CellularNetworkAdapter"},{"$ref":"#/components/schemas/GenericNetworkAdapter"},{"$ref":"#/components/schemas/LoraNetworkAdapter"}],"properties":{"type":{"type":"string","description":"The type of network adapter. Known values are: cellular, generic and lora"},"urn":{"description":"The URN for this network adapter","readOnly":true}},"required":["type","urn"],"title":"NetworkAdapter"},"CellularNetworkAdapter":{"type":"object","description":"Network adapter used to connect to cellular (mobile) networks","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'cellular' for CellularNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"imei":{"type":"string","description":"The International Mobile Equipment Identity (IMEI) that identifies the cellular adapter","maxLength":16,"minLength":15},"iccId":{"type":"string","description":"The Integrated Circuit Card Identifier (ICCID) that identifies the SIM chip","maxLength":22,"minLength":18},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["imei","type"],"title":"CellularNetworkAdapter"},"GenericNetworkAdapter":{"type":"object","description":"Generic network adapter that provides access to the public Internet","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'generic' for GenericNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"dvnUuid":{"type":"string","format":"uuid","description":"The unique identifier for this network adapter; defaults to the device ID, but may be set to a different value"},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["dvnUuid","type"],"title":"GenericNetworkAdapter"},"LoraNetworkAdapter":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'lora' for LoraNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"devEui":{"type":"string","description":"The Device Extended Unique Identifier (DevEUI) that identifies the LoRa node","maxLength":16},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["devEui","type"],"title":"LoraNetworkAdapter"},"DeviceCreationResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/Device"},{"type":"object","description":"Embedded items for the device","properties":{"_embedded":{"type":"object","properties":{"bindings":{"type":"array","description":"Bindings that were provisioned together with the device","items":{"$ref":"#/components/schemas/BindingCreationResponse"}}}}}}],"description":"Device with optional embedded entities","title":"DeviceCreationResponse"},"BindingCreationResponse":{"type":"object","description":"A provisioned binding of a device to one of the Things Platform connectors","discriminator":{"propertyName":"type","mapping":{"lora":"#/components/schemas/LoraBindingCreationResponse"}},"oneOf":[{"$ref":"#/components/schemas/LoraBindingCreationResponse"}],"properties":{"id":{"type":"string","format":"uuid","description":"The id of the binding.","readOnly":true},"type":{"type":"string","description":"The type of provisioned binding. Known values are: lora"},"deviceId":{"$ref":"#/components/schemas/DeviceId","description":"The id of the device that is bound to the connector by the binding."},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the binding is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the binding.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the binding is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the binding.","readOnly":true}},"required":["deviceId","type"],"title":"BindingCreationResponse"},"LoraBindingCreationResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/LoraBinding"},{"type":"object","description":"LoRa binding creation response","properties":{"type":{"type":"string","default":"lora","description":"The type of binding. Must be lora for LoraBinding"},"_embedded":{"type":"object","properties":{"credentials":{"type":"object","properties":{"appKey":{"type":"string","description":"The encryption key used for messages during every over the air activation.","pattern":"^[0-9a-fA-F]{32}$"}}}}}},"required":["type"]}],"description":"LoraBinding with generated credentials","title":"LoraBindingWithGeneratedCredentials"},"LoraBinding":{"type":"object","description":"A binding of a device to the LoRa connector.","properties":{"id":{"type":"string","format":"uuid","description":"The id of the binding.","readOnly":true},"type":{"type":"string","description":"The type of binding; must be 'lora' for LoraBinding."},"deviceId":{"$ref":"#/components/schemas/DeviceId","description":"The id of the device that is bound to the LoRa connector by the binding."},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the binding is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the binding.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the binding is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the binding.","readOnly":true},"appEui":{"type":"string","description":"A globally unique identifier of the target application server. Must be a hex value with size 16 (8 bytes)","pattern":"^[0-9a-fA-F]{16}$"},"appKey":{"type":"string","description":"The encryption key used for messages during every over the air activation.","pattern":"^[0-9a-fA-F]{32}$","writeOnly":true},"connectivityPlan":{"$ref":"#/components/schemas/LoraConnectivityPlan"},"deviceProfile":{"$ref":"#/components/schemas/LoraDeviceProfile"},"status":{"$ref":"#/components/schemas/LoraBindingStatus"}},"required":["appEui","connectivityPlan","deviceId","deviceProfile","status"],"title":"LoraBinding"},"DeviceId":{"type":"string","format":"device-id","description":"A device identifier in one of several supported formats.","oneOf":[{"$ref":"#/components/schemas/DeviceId-uuid"},{"$ref":"#/components/schemas/DeviceId-imei"},{"$ref":"#/components/schemas/DeviceId-deveui"},{"$ref":"#/components/schemas/DeviceId-dvnuuid"},{"$ref":"#/components/schemas/DeviceUrn-imei"},{"$ref":"#/components/schemas/DeviceUrn-deveui"},{"$ref":"#/components/schemas/DeviceUrn-dvnuuid"}],"title":"DeviceId"},"DeviceId-uuid":{"type":"string","format":"uuid","description":"Things Device UUID","title":"UuidDeviceId"},"DeviceId-imei":{"type":"string","description":"IMEI-based device ID","pattern":"(?i)^imei:[0-9]{15,16}$","title":"ImeiDeviceId"},"DeviceId-deveui":{"type":"string","description":"LoRaWAN DevEUI device ID","pattern":"(?i)^deveui:[a-f0-9]{16}$","title":"DevEuiDeviceId"},"DeviceId-dvnuuid":{"type":"string","description":"DVNUUID-based device ID","pattern":"(?i)^dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}?$","title":"DvnUuidDeviceId"},"DeviceUrn-imei":{"type":"string","description":"IMEI-based device URN","pattern":"(?i)^urn:dev:imei:[0-9]{15,16}:?$","title":"ImeiDeviceUrn"},"DeviceUrn-deveui":{"type":"string","description":"LoRaWAN DevEUI device URN","pattern":"(?i)^urn:dev:deveui:[a-f0-9]{16}:?$","title":"DevEuiDeviceUrn"},"DeviceUrn-dvnuuid":{"type":"string","description":"DVNUUID-based device URN","pattern":"(?i)^urn:dev:dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}:?$","title":"DvnUuidDeviceUrn"},"LoraConnectivityPlan":{"type":"object","description":"Plan that contains the specifications of the LoRa connectivity for a device.","properties":{"id":{"type":"string","default":"kpn-cs/kpn-things-channel-mask-tdoa","description":"The id of the LoRa connectivity plan."},"name":{"type":"string","description":"Human readable name of the LoRa connectivity plan.","readOnly":true}},"required":["id"],"title":"LoraConnectivityPlan"},"LoraDeviceProfile":{"type":"object","description":"Profile that contains the specifications of the device class and the movement speed of a LoRa device.","properties":{"id":{"type":"string","default":"Slow moving V 1.0 Class A","description":"Identifier of the LoRa device profile."},"name":{"type":"string","description":"Human readable name of the LoRa device profile.","readOnly":true}},"required":["id"],"title":"LoraDeviceProfile"},"LoraBindingStatus":{"type":"string","description":"The status of a LoRa binding. Known values include: INVENTORY and ACTIVE","title":"LoraBindingStatus"},"Problem":{"type":"object","description":"Error information details","properties":{"type":{"type":"string","format":"uri-reference","default":"about:blank","description":"A URI reference that uniquely identifies the problem type only in the\ncontext of the provided API. Opposed to the specification in RFC-9457,\nit is neither recommended to be dereferenceable and point to a\nhuman-readable documentation nor globally unique for the problem type."},"title":{"type":"string","description":"A short summary of the problem type. Written in English and readable\nfor engineers, usually not suited for non technical stakeholders and\nnot localized."},"status":{"type":"integer","format":"int32","description":"The HTTP status code generated by the origin server for this occurrence\nof the problem.","exclusiveMaximum":600,"minimum":100},"detail":{"type":"string","description":"A human readable explanation specific to this occurrence of the\nproblem that is helpful to locate the problem and give advice on how\nto proceed. Written in English and readable for engineers, usually not\nsuited for non technical stakeholders and not localized."},"instance":{"type":"string","format":"uri-reference","description":"A URI reference that identifies the specific occurrence of the problem,\ne.g. by adding a fragment identifier or sub-path to the problem type.\nMay be used to locate the root of this problem in the source code."}},"title":"Problem"}},"responses":{"badRequest":{"description":"Request is missing required information or invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"paths":{"/devices":{"post":{"summary":"Create a new device.","description":"Create a new device.","operationId":"createDevice","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}},"required":true},"responses":{"201":{"description":"The newly created device.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceCreationResponse"}}}},"400":{"$ref":"#/components/responses/badRequest"}}}}}}
```

## GET /devices/{deviceId}

> Retrieve a device by ID.

```json
{"openapi":"3.1.0","info":{"title":"Things Device API","version":"0.15.0"},"servers":[{"url":"https://api.kpnthings.com","description":"Things API Environment"}],"security":[{"BearerAuth":["device.read"]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DeviceId":{"type":"string","format":"device-id","description":"A device identifier in one of several supported formats.","oneOf":[{"$ref":"#/components/schemas/DeviceId-uuid"},{"$ref":"#/components/schemas/DeviceId-imei"},{"$ref":"#/components/schemas/DeviceId-deveui"},{"$ref":"#/components/schemas/DeviceId-dvnuuid"},{"$ref":"#/components/schemas/DeviceUrn-imei"},{"$ref":"#/components/schemas/DeviceUrn-deveui"},{"$ref":"#/components/schemas/DeviceUrn-dvnuuid"}],"title":"DeviceId"},"DeviceId-uuid":{"type":"string","format":"uuid","description":"Things Device UUID","title":"UuidDeviceId"},"DeviceId-imei":{"type":"string","description":"IMEI-based device ID","pattern":"(?i)^imei:[0-9]{15,16}$","title":"ImeiDeviceId"},"DeviceId-deveui":{"type":"string","description":"LoRaWAN DevEUI device ID","pattern":"(?i)^deveui:[a-f0-9]{16}$","title":"DevEuiDeviceId"},"DeviceId-dvnuuid":{"type":"string","description":"DVNUUID-based device ID","pattern":"(?i)^dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}?$","title":"DvnUuidDeviceId"},"DeviceUrn-imei":{"type":"string","description":"IMEI-based device URN","pattern":"(?i)^urn:dev:imei:[0-9]{15,16}:?$","title":"ImeiDeviceUrn"},"DeviceUrn-deveui":{"type":"string","description":"LoRaWAN DevEUI device URN","pattern":"(?i)^urn:dev:deveui:[a-f0-9]{16}:?$","title":"DevEuiDeviceUrn"},"DeviceUrn-dvnuuid":{"type":"string","description":"DVNUUID-based device URN","pattern":"(?i)^urn:dev:dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}:?$","title":"DvnUuidDeviceUrn"},"DeviceResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/Device"},{"type":"object","description":"Embedded items for the device","properties":{"_embedded":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"},"deviceSpecification":{"$ref":"#/components/schemas/DeviceSpecification"}}}}}],"description":"Device with optional embedded entities","title":"DeviceResponse"},"Device":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the device","readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the device is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the device.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the device is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the device.","readOnly":true},"name":{"type":"string","description":"Name of this device","maxLength":255,"minLength":1,"pattern":"^(?!\\s*$).+"},"status":{"$ref":"#/components/schemas/DeviceStatus"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"A JSON object containing key-value metadata"},"barcode":{"type":"string","description":"Barcode of the device"},"description":{"type":"string","description":"Description of this device","maxLength":255},"clientId":{"type":"string","format":"uuid","description":"ID of owning client"},"projectId":{"type":"string","format":"uuid","description":"ID of the project the device belongs to"},"deviceSpecificationId":{"type":"string","format":"uuid","description":"ID of the device specification of the device"},"networkAdapters":{"type":"array","description":"List of network adapters attached to the device","items":{"$ref":"#/components/schemas/NetworkAdapter"}}},"required":["clientId","deviceSpecificationId","name","projectId"],"title":"Device"},"DeviceStatus":{"type":"string","description":"Status of the device. Known values include: ACTIVE and INACTIVE"},"NetworkAdapter":{"type":"object","description":"A network adapter","discriminator":{"propertyName":"type","mapping":{"cellular":"#/components/schemas/CellularNetworkAdapter","generic":"#/components/schemas/GenericNetworkAdapter","lora":"#/components/schemas/LoraNetworkAdapter"}},"oneOf":[{"$ref":"#/components/schemas/CellularNetworkAdapter"},{"$ref":"#/components/schemas/GenericNetworkAdapter"},{"$ref":"#/components/schemas/LoraNetworkAdapter"}],"properties":{"type":{"type":"string","description":"The type of network adapter. Known values are: cellular, generic and lora"},"urn":{"description":"The URN for this network adapter","readOnly":true}},"required":["type","urn"],"title":"NetworkAdapter"},"CellularNetworkAdapter":{"type":"object","description":"Network adapter used to connect to cellular (mobile) networks","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'cellular' for CellularNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"imei":{"type":"string","description":"The International Mobile Equipment Identity (IMEI) that identifies the cellular adapter","maxLength":16,"minLength":15},"iccId":{"type":"string","description":"The Integrated Circuit Card Identifier (ICCID) that identifies the SIM chip","maxLength":22,"minLength":18},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["imei","type"],"title":"CellularNetworkAdapter"},"GenericNetworkAdapter":{"type":"object","description":"Generic network adapter that provides access to the public Internet","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'generic' for GenericNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"dvnUuid":{"type":"string","format":"uuid","description":"The unique identifier for this network adapter; defaults to the device ID, but may be set to a different value"},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["dvnUuid","type"],"title":"GenericNetworkAdapter"},"LoraNetworkAdapter":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'lora' for LoraNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"devEui":{"type":"string","description":"The Device Extended Unique Identifier (DevEUI) that identifies the LoRa node","maxLength":16},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["devEui","type"],"title":"LoraNetworkAdapter"},"Project":{"type":"object","description":"Project in KPN Things that serves as a container for devices, destinations, flows and metadata","properties":{"id":{"type":"string","format":"uuid","description":"The entity ID","readOnly":true},"clientId":{"type":"string","format":"uuid","description":"ID of owning client"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the project is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the project.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the project is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the project.","readOnly":true},"name":{"allOf":[{"$ref":"#/components/schemas/NonBlankString"},{"type":"string","description":"The project name"}]},"description":{"allOf":[{"$ref":"#/components/schemas/NonBlankString"},{"type":"string","description":"A short description of the project"}]},"definition":{"$ref":"#/components/schemas/ProjectDefinition"}},"required":["clientId","definition","id","name"],"title":"Project"},"NonBlankString":{"type":"string","description":"Must not be empty or contain only whitespace.","minLength":1,"pattern":".*\\S.*"},"ProjectDefinition":{"type":"object","description":"Describes the type and constraints of a KPN Things Project","properties":{"type":{"type":"string","description":"The project type. Known values include: ASSET_INSURANCE_E2E, ASSET_TRACKING_E2E, ASSET_TRACKING_RESELLER, CONDITION_MONITORING_E2E, CUSTOM, CUSTOM_RESELLER, EXPLORER, EXPLORER_WITH_M2M, FILL_LEVEL_E2E, FILL_LEVEL_RESELLER, FREEMIUM, FREEMIUM_WITH_M2M, MODULAR, MODULAR_RESTRICTED, TAILORED and UNLIMITED"},"maxDevices":{"type":"integer","format":"int32","description":"The maximum number of devices that can be registered under a project. -1 means unbounded."},"maxDestinations":{"type":"integer","format":"int32","description":"The maximum number of destinations that can be registered under a project. -1 means unbounded."},"maxDeviceGroups":{"type":"integer","format":"int32","description":"The maximum number of device groups that can be registered under a project. -1 means unbounded."}},"required":["type"],"title":"ProjectDefinition"},"DeviceSpecification":{"type":"object","description":"The specification for a device","properties":{"id":{"type":"string","format":"uuid","description":"The id of the device specification","readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the device specification is created in the system","readOnly":true},"createdBy":{"type":"string","description":"The user who created the device specification","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the device is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the device specification","readOnly":true},"name":{"type":"string","description":"Name of this device specification"},"description":{"type":"string","description":"Description of this device specification"},"manufacturer":{"type":"string","description":"The manufacturer of the device this specification is about"},"model":{"type":"string","description":"The model of the device the specification is about"},"managed":{"type":"boolean","default":false,"description":"Indicates whether the device specification is managed by KPN"},"availability":{"type":"string","default":"PRIVATE","description":"The availability of the device specification","enum":["GLOBAL","PRIVATE"]},"clientId":{"type":"string","format":"uuid","description":"ID of owning client"}},"required":["clientId","manufacturer","model","name"],"title":"DeviceSpecification"},"Problem":{"type":"object","description":"Error information details","properties":{"type":{"type":"string","format":"uri-reference","default":"about:blank","description":"A URI reference that uniquely identifies the problem type only in the\ncontext of the provided API. Opposed to the specification in RFC-9457,\nit is neither recommended to be dereferenceable and point to a\nhuman-readable documentation nor globally unique for the problem type."},"title":{"type":"string","description":"A short summary of the problem type. Written in English and readable\nfor engineers, usually not suited for non technical stakeholders and\nnot localized."},"status":{"type":"integer","format":"int32","description":"The HTTP status code generated by the origin server for this occurrence\nof the problem.","exclusiveMaximum":600,"minimum":100},"detail":{"type":"string","description":"A human readable explanation specific to this occurrence of the\nproblem that is helpful to locate the problem and give advice on how\nto proceed. Written in English and readable for engineers, usually not\nsuited for non technical stakeholders and not localized."},"instance":{"type":"string","format":"uri-reference","description":"A URI reference that identifies the specific occurrence of the problem,\ne.g. by adding a fragment identifier or sub-path to the problem type.\nMay be used to locate the root of this problem in the source code."}},"title":"Problem"}},"responses":{"badRequest":{"description":"Request is missing required information or invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"paths":{"/devices/{deviceId}":{"get":{"summary":"Retrieve a device by ID.","operationId":"getDevice","parameters":[{"name":"deviceId","in":"path","description":"Device identifier.","required":true,"style":"simple","schema":{"$ref":"#/components/schemas/DeviceId"}},{"name":"embed","in":"query","description":"Results to embed in the response.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["project","deviceSpecification"]}}}],"responses":{"200":{"description":"The device.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceResponse"}}}},"400":{"$ref":"#/components/responses/badRequest"}}}}}}
```

## PUT /devices/{deviceId}

> Update a device.

```json
{"openapi":"3.1.0","info":{"title":"Things Device API","version":"0.15.0"},"servers":[{"url":"https://api.kpnthings.com","description":"Things API Environment"}],"security":[{"BearerAuth":["device.write"]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DeviceId":{"type":"string","format":"device-id","description":"A device identifier in one of several supported formats.","oneOf":[{"$ref":"#/components/schemas/DeviceId-uuid"},{"$ref":"#/components/schemas/DeviceId-imei"},{"$ref":"#/components/schemas/DeviceId-deveui"},{"$ref":"#/components/schemas/DeviceId-dvnuuid"},{"$ref":"#/components/schemas/DeviceUrn-imei"},{"$ref":"#/components/schemas/DeviceUrn-deveui"},{"$ref":"#/components/schemas/DeviceUrn-dvnuuid"}],"title":"DeviceId"},"DeviceId-uuid":{"type":"string","format":"uuid","description":"Things Device UUID","title":"UuidDeviceId"},"DeviceId-imei":{"type":"string","description":"IMEI-based device ID","pattern":"(?i)^imei:[0-9]{15,16}$","title":"ImeiDeviceId"},"DeviceId-deveui":{"type":"string","description":"LoRaWAN DevEUI device ID","pattern":"(?i)^deveui:[a-f0-9]{16}$","title":"DevEuiDeviceId"},"DeviceId-dvnuuid":{"type":"string","description":"DVNUUID-based device ID","pattern":"(?i)^dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}?$","title":"DvnUuidDeviceId"},"DeviceUrn-imei":{"type":"string","description":"IMEI-based device URN","pattern":"(?i)^urn:dev:imei:[0-9]{15,16}:?$","title":"ImeiDeviceUrn"},"DeviceUrn-deveui":{"type":"string","description":"LoRaWAN DevEUI device URN","pattern":"(?i)^urn:dev:deveui:[a-f0-9]{16}:?$","title":"DevEuiDeviceUrn"},"DeviceUrn-dvnuuid":{"type":"string","description":"DVNUUID-based device URN","pattern":"(?i)^urn:dev:dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}:?$","title":"DvnUuidDeviceUrn"},"Device":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the device","readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the device is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the device.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the device is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the device.","readOnly":true},"name":{"type":"string","description":"Name of this device","maxLength":255,"minLength":1,"pattern":"^(?!\\s*$).+"},"status":{"$ref":"#/components/schemas/DeviceStatus"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"A JSON object containing key-value metadata"},"barcode":{"type":"string","description":"Barcode of the device"},"description":{"type":"string","description":"Description of this device","maxLength":255},"clientId":{"type":"string","format":"uuid","description":"ID of owning client"},"projectId":{"type":"string","format":"uuid","description":"ID of the project the device belongs to"},"deviceSpecificationId":{"type":"string","format":"uuid","description":"ID of the device specification of the device"},"networkAdapters":{"type":"array","description":"List of network adapters attached to the device","items":{"$ref":"#/components/schemas/NetworkAdapter"}}},"required":["clientId","deviceSpecificationId","name","projectId"],"title":"Device"},"DeviceStatus":{"type":"string","description":"Status of the device. Known values include: ACTIVE and INACTIVE"},"NetworkAdapter":{"type":"object","description":"A network adapter","discriminator":{"propertyName":"type","mapping":{"cellular":"#/components/schemas/CellularNetworkAdapter","generic":"#/components/schemas/GenericNetworkAdapter","lora":"#/components/schemas/LoraNetworkAdapter"}},"oneOf":[{"$ref":"#/components/schemas/CellularNetworkAdapter"},{"$ref":"#/components/schemas/GenericNetworkAdapter"},{"$ref":"#/components/schemas/LoraNetworkAdapter"}],"properties":{"type":{"type":"string","description":"The type of network adapter. Known values are: cellular, generic and lora"},"urn":{"description":"The URN for this network adapter","readOnly":true}},"required":["type","urn"],"title":"NetworkAdapter"},"CellularNetworkAdapter":{"type":"object","description":"Network adapter used to connect to cellular (mobile) networks","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'cellular' for CellularNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"imei":{"type":"string","description":"The International Mobile Equipment Identity (IMEI) that identifies the cellular adapter","maxLength":16,"minLength":15},"iccId":{"type":"string","description":"The Integrated Circuit Card Identifier (ICCID) that identifies the SIM chip","maxLength":22,"minLength":18},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["imei","type"],"title":"CellularNetworkAdapter"},"GenericNetworkAdapter":{"type":"object","description":"Generic network adapter that provides access to the public Internet","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'generic' for GenericNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"dvnUuid":{"type":"string","format":"uuid","description":"The unique identifier for this network adapter; defaults to the device ID, but may be set to a different value"},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["dvnUuid","type"],"title":"GenericNetworkAdapter"},"LoraNetworkAdapter":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'lora' for LoraNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"devEui":{"type":"string","description":"The Device Extended Unique Identifier (DevEUI) that identifies the LoRa node","maxLength":16},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["devEui","type"],"title":"LoraNetworkAdapter"}}},"paths":{"/devices/{deviceId}":{"put":{"summary":"Update a device.","operationId":"setDevice","parameters":[{"name":"deviceId","in":"path","description":"Device identifier.","required":true,"style":"simple","schema":{"$ref":"#/components/schemas/DeviceId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}},"required":true},"responses":{"200":{"description":"The updated device.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device"}}}}}}}}}
```

## DELETE /devices/{deviceId}

> Delete a device.

```json
{"openapi":"3.1.0","info":{"title":"Things Device API","version":"0.15.0"},"servers":[{"url":"https://api.kpnthings.com","description":"Things API Environment"}],"security":[{"BearerAuth":["device.delete"]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DeviceId":{"type":"string","format":"device-id","description":"A device identifier in one of several supported formats.","oneOf":[{"$ref":"#/components/schemas/DeviceId-uuid"},{"$ref":"#/components/schemas/DeviceId-imei"},{"$ref":"#/components/schemas/DeviceId-deveui"},{"$ref":"#/components/schemas/DeviceId-dvnuuid"},{"$ref":"#/components/schemas/DeviceUrn-imei"},{"$ref":"#/components/schemas/DeviceUrn-deveui"},{"$ref":"#/components/schemas/DeviceUrn-dvnuuid"}],"title":"DeviceId"},"DeviceId-uuid":{"type":"string","format":"uuid","description":"Things Device UUID","title":"UuidDeviceId"},"DeviceId-imei":{"type":"string","description":"IMEI-based device ID","pattern":"(?i)^imei:[0-9]{15,16}$","title":"ImeiDeviceId"},"DeviceId-deveui":{"type":"string","description":"LoRaWAN DevEUI device ID","pattern":"(?i)^deveui:[a-f0-9]{16}$","title":"DevEuiDeviceId"},"DeviceId-dvnuuid":{"type":"string","description":"DVNUUID-based device ID","pattern":"(?i)^dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}?$","title":"DvnUuidDeviceId"},"DeviceUrn-imei":{"type":"string","description":"IMEI-based device URN","pattern":"(?i)^urn:dev:imei:[0-9]{15,16}:?$","title":"ImeiDeviceUrn"},"DeviceUrn-deveui":{"type":"string","description":"LoRaWAN DevEUI device URN","pattern":"(?i)^urn:dev:deveui:[a-f0-9]{16}:?$","title":"DevEuiDeviceUrn"},"DeviceUrn-dvnuuid":{"type":"string","description":"DVNUUID-based device URN","pattern":"(?i)^urn:dev:dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}:?$","title":"DvnUuidDeviceUrn"},"DeviceInDeviceGroupProblem":{"type":"object","allOf":[{"$ref":"#/components/schemas/Problem"}],"description":"The device is still in a device group"},"Problem":{"type":"object","description":"Error information details","properties":{"type":{"type":"string","format":"uri-reference","default":"about:blank","description":"A URI reference that uniquely identifies the problem type only in the\ncontext of the provided API. Opposed to the specification in RFC-9457,\nit is neither recommended to be dereferenceable and point to a\nhuman-readable documentation nor globally unique for the problem type."},"title":{"type":"string","description":"A short summary of the problem type. Written in English and readable\nfor engineers, usually not suited for non technical stakeholders and\nnot localized."},"status":{"type":"integer","format":"int32","description":"The HTTP status code generated by the origin server for this occurrence\nof the problem.","exclusiveMaximum":600,"minimum":100},"detail":{"type":"string","description":"A human readable explanation specific to this occurrence of the\nproblem that is helpful to locate the problem and give advice on how\nto proceed. Written in English and readable for engineers, usually not\nsuited for non technical stakeholders and not localized."},"instance":{"type":"string","format":"uri-reference","description":"A URI reference that identifies the specific occurrence of the problem,\ne.g. by adding a fragment identifier or sub-path to the problem type.\nMay be used to locate the root of this problem in the source code."}},"title":"Problem"},"ActivatedNetworkExistsProblem":{"type":"object","allOf":[{"$ref":"#/components/schemas/Problem"}],"description":"An activated network still exists for this device"}}},"paths":{"/devices/{deviceId}":{"delete":{"summary":"Delete a device.","operationId":"deleteDevice","parameters":[{"name":"deviceId","in":"path","description":"Device identifier.","required":true,"style":"simple","schema":{"$ref":"#/components/schemas/DeviceId"}}],"responses":{"204":{"description":"Device has been deleted successfully."},"409":{"description":"Conflict - Multiple possible reasons","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/DeviceInDeviceGroupProblem"},{"$ref":"#/components/schemas/ActivatedNetworkExistsProblem"}]}}}}}}}}}
```

## GET /devices/{deviceId}/device-groups

> Retrieve the device groups a device is linked to.

```json
{"openapi":"3.1.0","info":{"title":"Things Device API","version":"0.15.0"},"servers":[{"url":"https://api.kpnthings.com","description":"Things API Environment"}],"security":[{"BearerAuth":["device-group.read"]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DeviceId":{"type":"string","format":"device-id","description":"A device identifier in one of several supported formats.","oneOf":[{"$ref":"#/components/schemas/DeviceId-uuid"},{"$ref":"#/components/schemas/DeviceId-imei"},{"$ref":"#/components/schemas/DeviceId-deveui"},{"$ref":"#/components/schemas/DeviceId-dvnuuid"},{"$ref":"#/components/schemas/DeviceUrn-imei"},{"$ref":"#/components/schemas/DeviceUrn-deveui"},{"$ref":"#/components/schemas/DeviceUrn-dvnuuid"}],"title":"DeviceId"},"DeviceId-uuid":{"type":"string","format":"uuid","description":"Things Device UUID","title":"UuidDeviceId"},"DeviceId-imei":{"type":"string","description":"IMEI-based device ID","pattern":"(?i)^imei:[0-9]{15,16}$","title":"ImeiDeviceId"},"DeviceId-deveui":{"type":"string","description":"LoRaWAN DevEUI device ID","pattern":"(?i)^deveui:[a-f0-9]{16}$","title":"DevEuiDeviceId"},"DeviceId-dvnuuid":{"type":"string","description":"DVNUUID-based device ID","pattern":"(?i)^dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}?$","title":"DvnUuidDeviceId"},"DeviceUrn-imei":{"type":"string","description":"IMEI-based device URN","pattern":"(?i)^urn:dev:imei:[0-9]{15,16}:?$","title":"ImeiDeviceUrn"},"DeviceUrn-deveui":{"type":"string","description":"LoRaWAN DevEUI device URN","pattern":"(?i)^urn:dev:deveui:[a-f0-9]{16}:?$","title":"DevEuiDeviceUrn"},"DeviceUrn-dvnuuid":{"type":"string","description":"DVNUUID-based device URN","pattern":"(?i)^urn:dev:dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}:?$","title":"DvnUuidDeviceUrn"},"PageOfDeviceDeviceGroupLinks":{"type":"object","allOf":[{"$ref":"#/components/schemas/Page"},{"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DeviceDeviceGroupLinkResponse"}}}}],"description":"A paginated list of device to device group links","title":"PageOfDeviceDeviceGroupLinks"},"Page":{"type":"object","description":"Page of items","properties":{"items":{"type":"array","items":{}},"next":{"type":"string","format":"uri","description":"Pagination link pointing to the next page. Only provided when not at the last page."},"prev":{"type":"string","format":"uri","description":"Pagination link pointing to the previous page. Only provided when not at the first page."}},"required":["items"],"title":"Page"},"DeviceDeviceGroupLinkResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/DeviceDeviceGroupLink"},{"type":"object","description":"Embedded items for the device - device group link","properties":{"_embedded":{"type":"object","properties":{"deviceGroup":{"$ref":"#/components/schemas/DeviceGroup"},"device":{"$ref":"#/components/schemas/Device"}}}}}],"description":"DeviceDeviceGroupLink with optional embedded entities","title":"DeviceDeviceGroupLinkResponse"},"DeviceDeviceGroupLink":{"type":"object","description":"A link between a device and device group.","properties":{"deviceGroupId":{"type":"string","format":"uuid","description":"The identifier of the device group."},"deviceId":{"type":"string","format":"uuid","description":"The identifier of the device.","readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the device link was created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the device link.","readOnly":true}},"title":"DeviceDeviceGroupLink"},"DeviceGroup":{"type":"object","description":"A group of devices.","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the device group.","readOnly":true},"name":{"type":"string","description":"The name of the device group.","maxLength":255,"minLength":1},"description":{"type":"string","description":"A description of the device group.","maxLength":255},"projectId":{"type":"string","format":"uuid","description":"The project identifier to which this device group belongs."},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the device group is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the device group.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the device group is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the device group.","readOnly":true}},"required":["name","projectId"],"title":"DeviceGroup"},"Device":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the device","readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the device is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the device.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the device is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the device.","readOnly":true},"name":{"type":"string","description":"Name of this device","maxLength":255,"minLength":1,"pattern":"^(?!\\s*$).+"},"status":{"$ref":"#/components/schemas/DeviceStatus"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"A JSON object containing key-value metadata"},"barcode":{"type":"string","description":"Barcode of the device"},"description":{"type":"string","description":"Description of this device","maxLength":255},"clientId":{"type":"string","format":"uuid","description":"ID of owning client"},"projectId":{"type":"string","format":"uuid","description":"ID of the project the device belongs to"},"deviceSpecificationId":{"type":"string","format":"uuid","description":"ID of the device specification of the device"},"networkAdapters":{"type":"array","description":"List of network adapters attached to the device","items":{"$ref":"#/components/schemas/NetworkAdapter"}}},"required":["clientId","deviceSpecificationId","name","projectId"],"title":"Device"},"DeviceStatus":{"type":"string","description":"Status of the device. Known values include: ACTIVE and INACTIVE"},"NetworkAdapter":{"type":"object","description":"A network adapter","discriminator":{"propertyName":"type","mapping":{"cellular":"#/components/schemas/CellularNetworkAdapter","generic":"#/components/schemas/GenericNetworkAdapter","lora":"#/components/schemas/LoraNetworkAdapter"}},"oneOf":[{"$ref":"#/components/schemas/CellularNetworkAdapter"},{"$ref":"#/components/schemas/GenericNetworkAdapter"},{"$ref":"#/components/schemas/LoraNetworkAdapter"}],"properties":{"type":{"type":"string","description":"The type of network adapter. Known values are: cellular, generic and lora"},"urn":{"description":"The URN for this network adapter","readOnly":true}},"required":["type","urn"],"title":"NetworkAdapter"},"CellularNetworkAdapter":{"type":"object","description":"Network adapter used to connect to cellular (mobile) networks","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'cellular' for CellularNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"imei":{"type":"string","description":"The International Mobile Equipment Identity (IMEI) that identifies the cellular adapter","maxLength":16,"minLength":15},"iccId":{"type":"string","description":"The Integrated Circuit Card Identifier (ICCID) that identifies the SIM chip","maxLength":22,"minLength":18},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["imei","type"],"title":"CellularNetworkAdapter"},"GenericNetworkAdapter":{"type":"object","description":"Generic network adapter that provides access to the public Internet","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'generic' for GenericNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"dvnUuid":{"type":"string","format":"uuid","description":"The unique identifier for this network adapter; defaults to the device ID, but may be set to a different value"},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["dvnUuid","type"],"title":"GenericNetworkAdapter"},"LoraNetworkAdapter":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'lora' for LoraNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"devEui":{"type":"string","description":"The Device Extended Unique Identifier (DevEUI) that identifies the LoRa node","maxLength":16},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["devEui","type"],"title":"LoraNetworkAdapter"}},"parameters":{"cursor":{"name":"cursor","in":"query","description":"String that encodes all necessary information to retrieve a page.","style":"form","explode":true,"schema":{"type":"string","format":"cursor"}},"limit":{"name":"limit","in":"query","description":"Limit the number of results (per page).","style":"form","explode":true,"schema":{"type":"integer","default":50}},"sort":{"name":"sort","in":"query","description":"Sorting fields separated by comma. Default order is Ascending (ASC), minus(-) should be used in front of field name for Descending (DESC) order.","style":"form","explode":true,"schema":{"type":"string"}}}},"paths":{"/devices/{deviceId}/device-groups":{"get":{"summary":"Retrieve the device groups a device is linked to.","operationId":"listDeviceGroupsForDevice","parameters":[{"name":"deviceId","in":"path","description":"The ID of the device for which to retrieve linked device groups.","required":true,"style":"simple","schema":{"$ref":"#/components/schemas/DeviceId"}},{"name":"createdBefore","in":"query","description":"Include only links created before the provided date and time. The date-time must be in ISO 8601 format.","style":"form","explode":true,"schema":{"type":"string","format":"date-time"}},{"name":"createdSince","in":"query","description":"Include only links created at or after the provided date and time. The date-time must be in ISO 8601 format.","style":"form","explode":true,"schema":{"type":"string","format":"date-time"}},{"name":"embed","in":"query","description":"Results to embed in the response.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["device","deviceGroup"]}}},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"description":"Page of devices groups linked to the specified device.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageOfDeviceDeviceGroupLinks"}}}}}}}}}
```

## GET /devices/{deviceId}/device-groups/{deviceGroupId}

> Retrieve the link between a device and a device group.

```json
{"openapi":"3.1.0","info":{"title":"Things Device API","version":"0.15.0"},"servers":[{"url":"https://api.kpnthings.com","description":"Things API Environment"}],"security":[{"BearerAuth":["device-group.read"]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DeviceId":{"type":"string","format":"device-id","description":"A device identifier in one of several supported formats.","oneOf":[{"$ref":"#/components/schemas/DeviceId-uuid"},{"$ref":"#/components/schemas/DeviceId-imei"},{"$ref":"#/components/schemas/DeviceId-deveui"},{"$ref":"#/components/schemas/DeviceId-dvnuuid"},{"$ref":"#/components/schemas/DeviceUrn-imei"},{"$ref":"#/components/schemas/DeviceUrn-deveui"},{"$ref":"#/components/schemas/DeviceUrn-dvnuuid"}],"title":"DeviceId"},"DeviceId-uuid":{"type":"string","format":"uuid","description":"Things Device UUID","title":"UuidDeviceId"},"DeviceId-imei":{"type":"string","description":"IMEI-based device ID","pattern":"(?i)^imei:[0-9]{15,16}$","title":"ImeiDeviceId"},"DeviceId-deveui":{"type":"string","description":"LoRaWAN DevEUI device ID","pattern":"(?i)^deveui:[a-f0-9]{16}$","title":"DevEuiDeviceId"},"DeviceId-dvnuuid":{"type":"string","description":"DVNUUID-based device ID","pattern":"(?i)^dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}?$","title":"DvnUuidDeviceId"},"DeviceUrn-imei":{"type":"string","description":"IMEI-based device URN","pattern":"(?i)^urn:dev:imei:[0-9]{15,16}:?$","title":"ImeiDeviceUrn"},"DeviceUrn-deveui":{"type":"string","description":"LoRaWAN DevEUI device URN","pattern":"(?i)^urn:dev:deveui:[a-f0-9]{16}:?$","title":"DevEuiDeviceUrn"},"DeviceUrn-dvnuuid":{"type":"string","description":"DVNUUID-based device URN","pattern":"(?i)^urn:dev:dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}:?$","title":"DvnUuidDeviceUrn"},"DeviceDeviceGroupLinkResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/DeviceDeviceGroupLink"},{"type":"object","description":"Embedded items for the device - device group link","properties":{"_embedded":{"type":"object","properties":{"deviceGroup":{"$ref":"#/components/schemas/DeviceGroup"},"device":{"$ref":"#/components/schemas/Device"}}}}}],"description":"DeviceDeviceGroupLink with optional embedded entities","title":"DeviceDeviceGroupLinkResponse"},"DeviceDeviceGroupLink":{"type":"object","description":"A link between a device and device group.","properties":{"deviceGroupId":{"type":"string","format":"uuid","description":"The identifier of the device group."},"deviceId":{"type":"string","format":"uuid","description":"The identifier of the device.","readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the device link was created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the device link.","readOnly":true}},"title":"DeviceDeviceGroupLink"},"DeviceGroup":{"type":"object","description":"A group of devices.","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the device group.","readOnly":true},"name":{"type":"string","description":"The name of the device group.","maxLength":255,"minLength":1},"description":{"type":"string","description":"A description of the device group.","maxLength":255},"projectId":{"type":"string","format":"uuid","description":"The project identifier to which this device group belongs."},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the device group is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the device group.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the device group is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the device group.","readOnly":true}},"required":["name","projectId"],"title":"DeviceGroup"},"Device":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the device","readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the device is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the device.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the device is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the device.","readOnly":true},"name":{"type":"string","description":"Name of this device","maxLength":255,"minLength":1,"pattern":"^(?!\\s*$).+"},"status":{"$ref":"#/components/schemas/DeviceStatus"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"A JSON object containing key-value metadata"},"barcode":{"type":"string","description":"Barcode of the device"},"description":{"type":"string","description":"Description of this device","maxLength":255},"clientId":{"type":"string","format":"uuid","description":"ID of owning client"},"projectId":{"type":"string","format":"uuid","description":"ID of the project the device belongs to"},"deviceSpecificationId":{"type":"string","format":"uuid","description":"ID of the device specification of the device"},"networkAdapters":{"type":"array","description":"List of network adapters attached to the device","items":{"$ref":"#/components/schemas/NetworkAdapter"}}},"required":["clientId","deviceSpecificationId","name","projectId"],"title":"Device"},"DeviceStatus":{"type":"string","description":"Status of the device. Known values include: ACTIVE and INACTIVE"},"NetworkAdapter":{"type":"object","description":"A network adapter","discriminator":{"propertyName":"type","mapping":{"cellular":"#/components/schemas/CellularNetworkAdapter","generic":"#/components/schemas/GenericNetworkAdapter","lora":"#/components/schemas/LoraNetworkAdapter"}},"oneOf":[{"$ref":"#/components/schemas/CellularNetworkAdapter"},{"$ref":"#/components/schemas/GenericNetworkAdapter"},{"$ref":"#/components/schemas/LoraNetworkAdapter"}],"properties":{"type":{"type":"string","description":"The type of network adapter. Known values are: cellular, generic and lora"},"urn":{"description":"The URN for this network adapter","readOnly":true}},"required":["type","urn"],"title":"NetworkAdapter"},"CellularNetworkAdapter":{"type":"object","description":"Network adapter used to connect to cellular (mobile) networks","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'cellular' for CellularNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"imei":{"type":"string","description":"The International Mobile Equipment Identity (IMEI) that identifies the cellular adapter","maxLength":16,"minLength":15},"iccId":{"type":"string","description":"The Integrated Circuit Card Identifier (ICCID) that identifies the SIM chip","maxLength":22,"minLength":18},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["imei","type"],"title":"CellularNetworkAdapter"},"GenericNetworkAdapter":{"type":"object","description":"Generic network adapter that provides access to the public Internet","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'generic' for GenericNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"dvnUuid":{"type":"string","format":"uuid","description":"The unique identifier for this network adapter; defaults to the device ID, but may be set to a different value"},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["dvnUuid","type"],"title":"GenericNetworkAdapter"},"LoraNetworkAdapter":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'lora' for LoraNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"devEui":{"type":"string","description":"The Device Extended Unique Identifier (DevEUI) that identifies the LoRa node","maxLength":16},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["devEui","type"],"title":"LoraNetworkAdapter"}}},"paths":{"/devices/{deviceId}/device-groups/{deviceGroupId}":{"get":{"summary":"Retrieve the link between a device and a device group.","operationId":"getDeviceDeviceGroupLink","parameters":[{"name":"deviceId","in":"path","description":"The ID of the device for which to retrieve the link to the device group.","required":true,"style":"simple","schema":{"$ref":"#/components/schemas/DeviceId"}},{"name":"deviceGroupId","in":"path","description":"The ID of the device group for which to retrieve the link to the device.","required":true,"style":"simple","schema":{"type":"string","format":"uuid"}},{"name":"embed","in":"query","description":"Results to embed in the response.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["device","deviceGroup"]}}}],"responses":{"200":{"description":"The link between the specified device and device group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceDeviceGroupLinkResponse"}}}}}}}}}
```

## GET /devices/{deviceId}/network-adapters

> Retrieve the network adapters attached to a device.

```json
{"openapi":"3.1.0","info":{"title":"Things Device API","version":"0.15.0"},"servers":[{"url":"https://api.kpnthings.com","description":"Things API Environment"}],"security":[{"BearerAuth":["device.read"]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DeviceId":{"type":"string","format":"device-id","description":"A device identifier in one of several supported formats.","oneOf":[{"$ref":"#/components/schemas/DeviceId-uuid"},{"$ref":"#/components/schemas/DeviceId-imei"},{"$ref":"#/components/schemas/DeviceId-deveui"},{"$ref":"#/components/schemas/DeviceId-dvnuuid"},{"$ref":"#/components/schemas/DeviceUrn-imei"},{"$ref":"#/components/schemas/DeviceUrn-deveui"},{"$ref":"#/components/schemas/DeviceUrn-dvnuuid"}],"title":"DeviceId"},"DeviceId-uuid":{"type":"string","format":"uuid","description":"Things Device UUID","title":"UuidDeviceId"},"DeviceId-imei":{"type":"string","description":"IMEI-based device ID","pattern":"(?i)^imei:[0-9]{15,16}$","title":"ImeiDeviceId"},"DeviceId-deveui":{"type":"string","description":"LoRaWAN DevEUI device ID","pattern":"(?i)^deveui:[a-f0-9]{16}$","title":"DevEuiDeviceId"},"DeviceId-dvnuuid":{"type":"string","description":"DVNUUID-based device ID","pattern":"(?i)^dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}?$","title":"DvnUuidDeviceId"},"DeviceUrn-imei":{"type":"string","description":"IMEI-based device URN","pattern":"(?i)^urn:dev:imei:[0-9]{15,16}:?$","title":"ImeiDeviceUrn"},"DeviceUrn-deveui":{"type":"string","description":"LoRaWAN DevEUI device URN","pattern":"(?i)^urn:dev:deveui:[a-f0-9]{16}:?$","title":"DevEuiDeviceUrn"},"DeviceUrn-dvnuuid":{"type":"string","description":"DVNUUID-based device URN","pattern":"(?i)^urn:dev:dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}:?$","title":"DvnUuidDeviceUrn"},"ListOfNetworkAdapters":{"type":"object","description":"A list of network adapters","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/NetworkAdapter"}}},"required":["items"],"title":"ListOfNetworkAdapters"},"NetworkAdapter":{"type":"object","description":"A network adapter","discriminator":{"propertyName":"type","mapping":{"cellular":"#/components/schemas/CellularNetworkAdapter","generic":"#/components/schemas/GenericNetworkAdapter","lora":"#/components/schemas/LoraNetworkAdapter"}},"oneOf":[{"$ref":"#/components/schemas/CellularNetworkAdapter"},{"$ref":"#/components/schemas/GenericNetworkAdapter"},{"$ref":"#/components/schemas/LoraNetworkAdapter"}],"properties":{"type":{"type":"string","description":"The type of network adapter. Known values are: cellular, generic and lora"},"urn":{"description":"The URN for this network adapter","readOnly":true}},"required":["type","urn"],"title":"NetworkAdapter"},"CellularNetworkAdapter":{"type":"object","description":"Network adapter used to connect to cellular (mobile) networks","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'cellular' for CellularNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"imei":{"type":"string","description":"The International Mobile Equipment Identity (IMEI) that identifies the cellular adapter","maxLength":16,"minLength":15},"iccId":{"type":"string","description":"The Integrated Circuit Card Identifier (ICCID) that identifies the SIM chip","maxLength":22,"minLength":18},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["imei","type"],"title":"CellularNetworkAdapter"},"GenericNetworkAdapter":{"type":"object","description":"Generic network adapter that provides access to the public Internet","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'generic' for GenericNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"dvnUuid":{"type":"string","format":"uuid","description":"The unique identifier for this network adapter; defaults to the device ID, but may be set to a different value"},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["dvnUuid","type"],"title":"GenericNetworkAdapter"},"LoraNetworkAdapter":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'lora' for LoraNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"devEui":{"type":"string","description":"The Device Extended Unique Identifier (DevEUI) that identifies the LoRa node","maxLength":16},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["devEui","type"],"title":"LoraNetworkAdapter"}}},"paths":{"/devices/{deviceId}/network-adapters":{"get":{"summary":"Retrieve the network adapters attached to a device.","operationId":"listNetworkAdaptersForDevice","parameters":[{"name":"deviceId","in":"path","description":"The ID of the device for which to retrieve network adapters.","required":true,"style":"simple","schema":{"$ref":"#/components/schemas/DeviceId"}},{"name":"type","in":"query","description":"Include only network adapters of this type. Known values are: cellular, generic, lora.","style":"form","explode":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of network adapters attached to the specified device.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListOfNetworkAdapters"}}}}}}}}}
```

## POST /devices/{deviceId}/network-adapters

> Add a network adapter to a device

```json
{"openapi":"3.1.0","info":{"title":"Things Device API","version":"0.15.0"},"servers":[{"url":"https://api.kpnthings.com","description":"Things API Environment"}],"security":[{"BearerAuth":["device.write"]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DeviceId":{"type":"string","format":"device-id","description":"A device identifier in one of several supported formats.","oneOf":[{"$ref":"#/components/schemas/DeviceId-uuid"},{"$ref":"#/components/schemas/DeviceId-imei"},{"$ref":"#/components/schemas/DeviceId-deveui"},{"$ref":"#/components/schemas/DeviceId-dvnuuid"},{"$ref":"#/components/schemas/DeviceUrn-imei"},{"$ref":"#/components/schemas/DeviceUrn-deveui"},{"$ref":"#/components/schemas/DeviceUrn-dvnuuid"}],"title":"DeviceId"},"DeviceId-uuid":{"type":"string","format":"uuid","description":"Things Device UUID","title":"UuidDeviceId"},"DeviceId-imei":{"type":"string","description":"IMEI-based device ID","pattern":"(?i)^imei:[0-9]{15,16}$","title":"ImeiDeviceId"},"DeviceId-deveui":{"type":"string","description":"LoRaWAN DevEUI device ID","pattern":"(?i)^deveui:[a-f0-9]{16}$","title":"DevEuiDeviceId"},"DeviceId-dvnuuid":{"type":"string","description":"DVNUUID-based device ID","pattern":"(?i)^dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}?$","title":"DvnUuidDeviceId"},"DeviceUrn-imei":{"type":"string","description":"IMEI-based device URN","pattern":"(?i)^urn:dev:imei:[0-9]{15,16}:?$","title":"ImeiDeviceUrn"},"DeviceUrn-deveui":{"type":"string","description":"LoRaWAN DevEUI device URN","pattern":"(?i)^urn:dev:deveui:[a-f0-9]{16}:?$","title":"DevEuiDeviceUrn"},"DeviceUrn-dvnuuid":{"type":"string","description":"DVNUUID-based device URN","pattern":"(?i)^urn:dev:dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}:?$","title":"DvnUuidDeviceUrn"},"NetworkAdapter":{"type":"object","description":"A network adapter","discriminator":{"propertyName":"type","mapping":{"cellular":"#/components/schemas/CellularNetworkAdapter","generic":"#/components/schemas/GenericNetworkAdapter","lora":"#/components/schemas/LoraNetworkAdapter"}},"oneOf":[{"$ref":"#/components/schemas/CellularNetworkAdapter"},{"$ref":"#/components/schemas/GenericNetworkAdapter"},{"$ref":"#/components/schemas/LoraNetworkAdapter"}],"properties":{"type":{"type":"string","description":"The type of network adapter. Known values are: cellular, generic and lora"},"urn":{"description":"The URN for this network adapter","readOnly":true}},"required":["type","urn"],"title":"NetworkAdapter"},"CellularNetworkAdapter":{"type":"object","description":"Network adapter used to connect to cellular (mobile) networks","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'cellular' for CellularNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"imei":{"type":"string","description":"The International Mobile Equipment Identity (IMEI) that identifies the cellular adapter","maxLength":16,"minLength":15},"iccId":{"type":"string","description":"The Integrated Circuit Card Identifier (ICCID) that identifies the SIM chip","maxLength":22,"minLength":18},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["imei","type"],"title":"CellularNetworkAdapter"},"GenericNetworkAdapter":{"type":"object","description":"Generic network adapter that provides access to the public Internet","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'generic' for GenericNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"dvnUuid":{"type":"string","format":"uuid","description":"The unique identifier for this network adapter; defaults to the device ID, but may be set to a different value"},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["dvnUuid","type"],"title":"GenericNetworkAdapter"},"LoraNetworkAdapter":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'lora' for LoraNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"devEui":{"type":"string","description":"The Device Extended Unique Identifier (DevEUI) that identifies the LoRa node","maxLength":16},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["devEui","type"],"title":"LoraNetworkAdapter"}}},"paths":{"/devices/{deviceId}/network-adapters":{"post":{"summary":"Add a network adapter to a device","operationId":"addNetworkAdapter","parameters":[{"name":"deviceId","in":"path","description":"The ID of the device for which to add a network adapter.","required":true,"style":"simple","schema":{"$ref":"#/components/schemas/DeviceId"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkAdapter"}}},"required":true},"responses":{"201":{"description":"The newly created network adapter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkAdapter"}}}}}}}}}
```

## Update a network adapter.

> The CellularNetworkAdapter.imei, GenericNetworkAdapter.dvnUuid and LoraNetworkAdapter.devEui properties may not be updated. Attempting an update with a value identical to the existing network adapter is a no-op and results in a 200 OK response returning the existing network adapter. Update attempts with different values will result in a 400 Bad Request response.

```json
{"openapi":"3.1.0","info":{"title":"Things Device API","version":"0.15.0"},"servers":[{"url":"https://api.kpnthings.com","description":"Things API Environment"}],"security":[{"BearerAuth":["device.write"]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DeviceId":{"type":"string","format":"device-id","description":"A device identifier in one of several supported formats.","oneOf":[{"$ref":"#/components/schemas/DeviceId-uuid"},{"$ref":"#/components/schemas/DeviceId-imei"},{"$ref":"#/components/schemas/DeviceId-deveui"},{"$ref":"#/components/schemas/DeviceId-dvnuuid"},{"$ref":"#/components/schemas/DeviceUrn-imei"},{"$ref":"#/components/schemas/DeviceUrn-deveui"},{"$ref":"#/components/schemas/DeviceUrn-dvnuuid"}],"title":"DeviceId"},"DeviceId-uuid":{"type":"string","format":"uuid","description":"Things Device UUID","title":"UuidDeviceId"},"DeviceId-imei":{"type":"string","description":"IMEI-based device ID","pattern":"(?i)^imei:[0-9]{15,16}$","title":"ImeiDeviceId"},"DeviceId-deveui":{"type":"string","description":"LoRaWAN DevEUI device ID","pattern":"(?i)^deveui:[a-f0-9]{16}$","title":"DevEuiDeviceId"},"DeviceId-dvnuuid":{"type":"string","description":"DVNUUID-based device ID","pattern":"(?i)^dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}?$","title":"DvnUuidDeviceId"},"DeviceUrn-imei":{"type":"string","description":"IMEI-based device URN","pattern":"(?i)^urn:dev:imei:[0-9]{15,16}:?$","title":"ImeiDeviceUrn"},"DeviceUrn-deveui":{"type":"string","description":"LoRaWAN DevEUI device URN","pattern":"(?i)^urn:dev:deveui:[a-f0-9]{16}:?$","title":"DevEuiDeviceUrn"},"DeviceUrn-dvnuuid":{"type":"string","description":"DVNUUID-based device URN","pattern":"(?i)^urn:dev:dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}:?$","title":"DvnUuidDeviceUrn"},"NetworkAdapter":{"type":"object","description":"A network adapter","discriminator":{"propertyName":"type","mapping":{"cellular":"#/components/schemas/CellularNetworkAdapter","generic":"#/components/schemas/GenericNetworkAdapter","lora":"#/components/schemas/LoraNetworkAdapter"}},"oneOf":[{"$ref":"#/components/schemas/CellularNetworkAdapter"},{"$ref":"#/components/schemas/GenericNetworkAdapter"},{"$ref":"#/components/schemas/LoraNetworkAdapter"}],"properties":{"type":{"type":"string","description":"The type of network adapter. Known values are: cellular, generic and lora"},"urn":{"description":"The URN for this network adapter","readOnly":true}},"required":["type","urn"],"title":"NetworkAdapter"},"CellularNetworkAdapter":{"type":"object","description":"Network adapter used to connect to cellular (mobile) networks","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'cellular' for CellularNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"imei":{"type":"string","description":"The International Mobile Equipment Identity (IMEI) that identifies the cellular adapter","maxLength":16,"minLength":15},"iccId":{"type":"string","description":"The Integrated Circuit Card Identifier (ICCID) that identifies the SIM chip","maxLength":22,"minLength":18},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["imei","type"],"title":"CellularNetworkAdapter"},"GenericNetworkAdapter":{"type":"object","description":"Generic network adapter that provides access to the public Internet","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'generic' for GenericNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"dvnUuid":{"type":"string","format":"uuid","description":"The unique identifier for this network adapter; defaults to the device ID, but may be set to a different value"},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["dvnUuid","type"],"title":"GenericNetworkAdapter"},"LoraNetworkAdapter":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The id of the network adapter","readOnly":true},"type":{"type":"string","description":"The type of network adapter; must be 'lora' for LoraNetworkAdapter"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is created in the system.","readOnly":true},"createdBy":{"type":"string","description":"The user who created the network adapter.","readOnly":true},"modifiedAt":{"type":"string","format":"date-time","description":"The timestamp when the network adapter is last modified in the system.","readOnly":true},"modifiedBy":{"type":"string","description":"The user who last modified the network adapter.","readOnly":true},"devEui":{"type":"string","description":"The Device Extended Unique Identifier (DevEUI) that identifies the LoRa node","maxLength":16},"urn":{"type":"string","description":"The URN for this network adapter","readOnly":true}},"required":["devEui","type"],"title":"LoraNetworkAdapter"}}},"paths":{"/devices/{deviceId}/network-adapters/{adapterId}":{"put":{"summary":"Update a network adapter.","description":"The CellularNetworkAdapter.imei, GenericNetworkAdapter.dvnUuid and LoraNetworkAdapter.devEui properties may not be updated. Attempting an update with a value identical to the existing network adapter is a no-op and results in a 200 OK response returning the existing network adapter. Update attempts with different values will result in a 400 Bad Request response.","operationId":"updateNetworkAdapter","parameters":[{"name":"deviceId","in":"path","description":"The ID of the device for which to update the network adapter.","required":true,"style":"simple","schema":{"$ref":"#/components/schemas/DeviceId"}},{"name":"adapterId","in":"path","description":"The ID of the network adapter to update.","required":true,"style":"simple","schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkAdapter"}}},"required":true},"responses":{"200":{"description":"The updated network adapter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkAdapter"}}}}}}}}}
```

## DELETE /devices/{deviceId}/network-adapters/{adapterId}

> Delete a network adapter.

```json
{"openapi":"3.1.0","info":{"title":"Things Device API","version":"0.15.0"},"servers":[{"url":"https://api.kpnthings.com","description":"Things API Environment"}],"security":[{"BearerAuth":["device.write"]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DeviceId":{"type":"string","format":"device-id","description":"A device identifier in one of several supported formats.","oneOf":[{"$ref":"#/components/schemas/DeviceId-uuid"},{"$ref":"#/components/schemas/DeviceId-imei"},{"$ref":"#/components/schemas/DeviceId-deveui"},{"$ref":"#/components/schemas/DeviceId-dvnuuid"},{"$ref":"#/components/schemas/DeviceUrn-imei"},{"$ref":"#/components/schemas/DeviceUrn-deveui"},{"$ref":"#/components/schemas/DeviceUrn-dvnuuid"}],"title":"DeviceId"},"DeviceId-uuid":{"type":"string","format":"uuid","description":"Things Device UUID","title":"UuidDeviceId"},"DeviceId-imei":{"type":"string","description":"IMEI-based device ID","pattern":"(?i)^imei:[0-9]{15,16}$","title":"ImeiDeviceId"},"DeviceId-deveui":{"type":"string","description":"LoRaWAN DevEUI device ID","pattern":"(?i)^deveui:[a-f0-9]{16}$","title":"DevEuiDeviceId"},"DeviceId-dvnuuid":{"type":"string","description":"DVNUUID-based device ID","pattern":"(?i)^dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}?$","title":"DvnUuidDeviceId"},"DeviceUrn-imei":{"type":"string","description":"IMEI-based device URN","pattern":"(?i)^urn:dev:imei:[0-9]{15,16}:?$","title":"ImeiDeviceUrn"},"DeviceUrn-deveui":{"type":"string","description":"LoRaWAN DevEUI device URN","pattern":"(?i)^urn:dev:deveui:[a-f0-9]{16}:?$","title":"DevEuiDeviceUrn"},"DeviceUrn-dvnuuid":{"type":"string","description":"DVNUUID-based device URN","pattern":"(?i)^urn:dev:dvnuuid:[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}:?$","title":"DvnUuidDeviceUrn"}}},"paths":{"/devices/{deviceId}/network-adapters/{adapterId}":{"delete":{"summary":"Delete a network adapter.","operationId":"deleteNetworkAdapter","parameters":[{"name":"deviceId","in":"path","description":"The ID of the device for which to delete the network adapter.","required":true,"style":"simple","schema":{"$ref":"#/components/schemas/DeviceId"}},{"name":"adapterId","in":"path","description":"The ID of the network adapter to delete.","required":true,"style":"simple","schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Network adapter has been deleted successfully."}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kpnthings.com/kpn-things/general-functions/apis/devices.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
