openapi: 3.0.0
info:
description: >-
KPN’s Low Power Long Range (LoRa) network service compliments existing 2G, 3G, 4G and LTE-M networks. It is based on the LoRaWAN protocol for Internet of Things (IoT).
### Key highlights
- **Sandbox:** Full-fledged capabilities.
- **Security:** HTTPS, OAuth, Rate limiting.
- **Versioning:** Supports version-less API, version tight. If no version
is provided (in the header) it defaults to latest version.
---
## [Source view](https://app.swaggerhub.com/apis/kpn/lora-device-management-kpn/)<br/>
[Documentation view](https://app.swaggerhub.com/apis-docs/kpn/lora-device-management-kpn/)
---
## [KPN Developer](https://developer.kpn.com/)<br/>
[Getting Started](https://developer.kpn.com/getting-started)
---
version: "v1.2"
title: LoRa Device Management - KPN
contact:
name: API Support
email: api_developer@kpn.com
url: 'https://developer.kpn.com/support'
termsOfService: 'https://developer.kpn.com/legal'
servers:
- url: 'https://api-prd.kpn.com/data/lora/thingpark'
externalDocs:
description: HTTP response headers
url: https://developer.kpn.com/documentation-response-headers
paths:
/activate:
post:
tags:
- Activation
summary: Activates API
description: "Need to update description."
operationId: Activation
security:
- oauth2: []
parameters:
- $ref: '#/components/parameters/api_version'
requestBody:
description: Contents of Activation.
content:
application/json:
schema:
$ref: '#/components/schemas/ActivationReq'
example:
thingpark_username: abc@lora.com
thingpark_password: Abc@23
required: true
responses:
200:
description: Successful
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ActivationResp'
400:
description: Bad Request
content:
application/json:
schema:
$ref: "#/components/schemas/error"
401:
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/error"
403:
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/error"
404:
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/error"
429:
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/error"
500:
description: Server error
content:
application/json:
schema:
$ref: "#/components/schemas/error"
deprecated: false
/devices:
get:
tags:
- Device
summary: Retrieves devices
description: "Retrieves a list of devices existing within authorized scopes. Note that for each device, by default only the following information is retrieved: `ref`, `name`, `EUI`, `networkAddress`."
operationId: Devicesretrieval
security:
- oauth2: []
parameters:
- $ref: '#/components/parameters/api_version'
- name: deviceEUI
in: query
description: EUI of the device to search for.
style: form
explode: true
schema:
type: string
- name: healthState
in: query
description: Health state of the devices to search for. By default, all devices are returned.
style: form
explode: true
schema:
$ref: '#/components/schemas/healthState1'
- name: connectivityPlanId
in: query
description: Connectivity plan assigned to the devices to search for. Value `_NOCP` means that only devices with no connectivity plan assigned should be returned. Value `_CP` means that only devices with any connectivity plan assigned should be returned. By default, all devices are returned.
style: form
explode: true
schema:
type: string
- name: statistics
in: query
description: Indicates to also retrieve usage statistic information along each device. Default is false.
style: form
explode: true
schema:
type: boolean
- name: commercialDetails
in: query
description: Indicates to also retrieve commercial information along each device. Default is false.
style: form
explode: true
schema:
type: boolean
- name: extendedInfo
in: query
description: Indicates to retrieve all available information (including statistics and commercial details) along each device. Default is false.
style: form
explode: true
schema:
type: boolean
- name: pageIndex
in: query
description: If set, enables pagination and returns only the 100 devices of the specified page. First available page index is 1. Note that device pagination is only supported in case of a SUBSCRIBER scope.
style: form
explode: true
schema:
type: integer
format: int32
responses:
200:
description: Devices retrieved successfully.
headers: {}
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Device'
description: Devices retrieved successfully.
example:
- x-regga-type: sniplet
id: device-getall-as-vendor
title: Devices retrieval example with a VENDOR scope
requestSniplet:
headers:
Authorization: Bearer <vendor_token>
data: '[ { "ref": "3579", "name": "New OTAA device", "EUI": "0018A20000000004" }, { "ref": "3582", "name": "New ABP device", "EUI": "0018A20000000005", "networkAddress": "04000800" } ]'
- x-regga-type: sniplet
id: device-getall-as-subscriber
title: Devices retrieval example with a SUBSCRIBER scope
requestSniplet:
headers:
Authorization: Bearer <subscriber_token>
data: '[ { "ref": "3579", "name": "New OTAA device", "EUI": "0018A20000000004" }, { "ref": "3582", "name": "New ABP device", "EUI": "0018A20000000005", "networkAddress": "04000800" } ]'
400:
description: Bad Request
content:
application/json:
schema:
$ref: "#/components/schemas/error"
401:
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/error"
403:
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/error"
404:
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/error"
429:
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/error"
500:
description: Server error
content:
application/json:
schema:
$ref: "#/components/schemas/error"
deprecated: false
post:
tags:
- Device
summary: Creates devices
description: Creates a new device. If no `routingProfileId` or `processingStrategyId` values are provided, then `processingStrategyId` will be automatically set to `DATAFLOW`. If no `connectivityPlanId` value is provided, then the first connectivity plan of the subscriber with available connections will be assigned to the device.
operationId: Devicecreation
security:
- oauth2: []
parameters:
- $ref: '#/components/parameters/api_version'
- name: deviceToken
in: query
description: Token provided by the manufacturer for an easy registration on a standalone Join Server. Not available in ThingPark Enterprise versions.
style: form
explode: true
schema:
type: string
- name: jsProfile
in: query
description: When providing a device token, you need provide your Join Server account. Not available in ThingPark Enterprise versions.
style: form
explode: true
schema:
type: string
- name: jsSubscriberRef
in: query
description: When providing a device token, you need provide your Join Server account. Not available in ThingPark Enterprise versions.
style: form
explode: true
schema:
type: string
requestBody:
description: Contents of the device to create.
content:
application/json:
schema:
$ref: '#/components/schemas/Device'
example:
name: New OTAA device
EUI: 0018A20000000004
activationType: OTAA
hsmGroupId: HSM_KPN-ACC-OPE.1
connectivityPlanId: kpn-acc-ope-cs/often-geo-2019
deviceProfileId: LORA/GenericC.1_ETSI_Rx2-SF9
applicationEUI: 70B3D53260000003
applicationKey: 258DB54023EA74F0D55085F7351737D0
required: true
responses:
201:
description: Device created successfully.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/Device'
400:
description: Bad Request
content:
application/json:
schema:
$ref: "#/components/schemas/error"
401:
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/error"
403:
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/error"
404:
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/error"
429:
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/error"
500:
description: Server error
content:
application/json:
schema:
$ref: "#/components/schemas/error"
deprecated: false
/devices/{deviceRef}:
get:
tags:
- Device
summary: Retrieves specific device
description: Retrieves the device corresponding to the provided `device ref`, if that device is within authorized scopes.
operationId: Deviceretrieval
security:
- oauth2: []
parameters:
- $ref: '#/components/parameters/api_version'
- name: deviceRef
in: path
description: Ref of the device to retrieve.
required: true
style: simple
schema:
type: string
responses:
200:
description: Device retrieved successfully.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/Device'
400:
description: Bad Request
content:
application/json:
schema:
$ref: "#/components/schemas/error"
401:
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/error"
403:
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/error"
404:
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/error"
429:
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/error"
500:
description: Server error
content:
application/json:
schema:
$ref: "#/components/schemas/error"
deprecated: false
put:
tags:
- Device
summary: Updates specific device
description: "Updates the device corresponding to the provided `device ref`, if that device is within authorized scopes. Only following attributes can be updated: `name`, `routingProfileId`, `processingStrategyId`, `connectivityPlanId`, `deviceProfileId` and `applicationEUI`. To update other attributes, device must be deleted than re-created."
operationId: Deviceupdate
security:
- oauth2: []
parameters:
- $ref: '#/components/parameters/api_version'
- name: deviceRef
in: path
description: Ref of the device to update.
required: true
style: simple
schema:
type: string
- name: jsProfile
in: query
description: When you use a standalone JoinServer, you need provide your Join Server account. Not available in ThingPark Enterprise versions.
style: form
explode: true
schema:
type: string
- name: jsSubscriberRef
in: query
description: When you use a standalone JoinServer, you need provide your Join Server account. Not available in ThingPark Enterprise versions.
style: form
explode: true
schema:
type: string
requestBody:
description: Contents of the device to update.
content:
application/json:
schema:
$ref: '#/components/schemas/Device'
example:
name: Updated device
required: true
responses:
200:
description: Device updated successfully.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/Device'
400:
description: Bad Request
content:
application/json:
schema:
$ref: "#/components/schemas/error"
401:
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/error"
403:
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/error"
404:
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/error"
429:
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/error"
500:
description: Server error
content:
application/json:
schema:
$ref: "#/components/schemas/error"
deprecated: false
delete:
tags:
- Device
summary: Deletes specific device
description: Deletes the device corresponding to the provided `device ref`, if that device is within authorized scopes.
operationId: Devicedeletion
security:
- oauth2: []
parameters:
- $ref: '#/components/parameters/api_version'
- name: deviceRef
in: path
description: Ref of the device to delete.
required: true
style: simple
schema:
type: string
responses:
204:
description: Device deleted successfully.
headers: {}
400:
description: Bad Request
content:
application/json:
schema:
$ref: "#/components/schemas/error"
401:
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/error"
403:
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/error"
404:
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/error"
429:
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/error"
500:
description: Server error
content:
application/json:
schema:
$ref: "#/components/schemas/error"
deprecated: false
/deviceProfiles:
get:
tags:
- Device
summary: Retrieves device profiles
description: Retrieves the list of existing device profiles.
operationId: Deviceprofilesretrieval
security:
- oauth2: []
parameters:
- $ref: '#/components/parameters/api_version'
responses:
200:
description: Device profiles retrieved successfully.
headers: {}
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/DeviceProfile'
description: Device profiles retrieved successfully.
example:
- x-regga-type: sniplet
id: deviceprofile-getall-as-subscriber
title: Device profiles retrieval example with a SUBSCRIBER scope
requestSniplet:
headers:
Authorization: Bearer <subscriber_token>
data: '[{ "id": "LORA/GenericC.1_ETSI_Rx2-SF9", "name": "LoRaWAN Demonstrator", "typeMAC": "LoRaMAC" }, { "id": "LORA/GenericA.1_FCC_SF12", "name": "LoRaWAN 1.0 class A FCC Rx2-SF12 dummy", "typeMAC": "LoRaMAC"}]'
400:
description: Bad Request
content:
application/json:
schema:
$ref: "#/components/schemas/error"
401:
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/error"
403:
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/error"
404:
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/error"
429:
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/error"
500:
description: Server error
content:
application/json:
schema:
$ref: "#/components/schemas/error"
deprecated: false
/connectivityPlans:
get:
tags:
- Subscription
summary: Retrieves connectivity plans
description: Retrieves a list of connectivity plans existing within authorized scopes.
operationId: Connectivityplansretrieval
security:
- oauth2: []
parameters:
- $ref: '#/components/parameters/api_version'
responses:
200:
description: Connectivity plans retrieved successfully.
headers: {}
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ConnectivityPlan'
description: Connectivity plans retrieved successfully.
example:
- x-regga-type: sniplet
id: connectivityplan-getall-as-vendor
title: Connectivity plans retrieval example with a VENDOR scope
requestSniplet:
headers:
Authorization: Bearer <vendor_token>
data: '[ { "id": "lpwa-cs/testing", "ref": "413", "name": "Lpwa testing random", "grantedConnections": 10, "usedConnections": 0 }, { "id": "lpwa-cs/plan20", "ref": "414", "name": "Lpwa 20 dummy license plan", "grantedConnections": 20, "usedConnections": 3 } ]'
- x-regga-type: sniplet
id: connectivityplan-getall-as-subscriber
title: Connectivity plans retrieval example with a SUBSCRIBER scope
requestSniplet:
headers:
Authorization: Bearer <subscriber_token>
data: '[ { "id": "lpwa-cs/testing", "ref": "413", "name": "Lpwa testing random", "grantedConnections": 10, "usedConnections": 0 }, { "id": "lpwa-cs/plan20", "ref": "414", "name": "Lpwa 20 dummy license plan", "grantedConnections": 20, "usedConnections": 3 } ]'
400:
description: Bad Request
content:
application/json:
schema:
$ref: "#/components/schemas/error"
401:
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/error"
403:
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/error"
404:
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/error"
429:
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/error"
500:
description: Server error
content:
application/json:
schema:
$ref: "#/components/schemas/error"
deprecated: false
/routingProfiles:
get:
tags:
- Routing
summary: Retrieves routing profiles
description: Retrieves a list of existing routing profiles within authorized scopes.
operationId: Routingprofilesretrieval
security:
- oauth2: []
parameters:
- $ref: '#/components/parameters/api_version'
- name: routingProfileId
in: query
description: Id of the routing profile to search for.
style: form
explode: true
schema:
type: string
responses:
200:
description: Routing profiles retrieved successfully.
headers: {}
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/RoutingProfile'
description: Routing profiles retrieved successfully.
example:
- x-regga-type: sniplet
id: routingprofile-getall-as-subscriber
title: Routing profiles retrieval example with a SUBSCRIBER scope
requestSniplet:
headers:
Authorization: Bearer <subscriber_token>
data: '[ { "id": "TWA_100001620.1087.dummy", "ref": "1087", "name": "NOAS", "default": true }, { "id": "TWA_100001620.1090", "ref": "1090", "name": "Storage RP", "default": true, "routes": [ { "sourcePorts": "*", "strategy": "SEQUENTIAL", "contentType": "XML", "addresses": [ "https://datastoragevendor.com/uplinks" ] } ] } ]'
400:
description: Bad Request
content:
application/json:
schema:
$ref: "#/components/schemas/error"
401:
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/error"
403:
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/error"
404:
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/error"
429:
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/error"
500:
description: Server error
content:
application/json:
schema:
$ref: "#/components/schemas/error"
deprecated: false
post:
tags:
- Routing
summary: Creates routing profiles
description: Creates a new routing profile.
operationId: Routingprofilescreation
security:
- oauth2: []
parameters:
- $ref: '#/components/parameters/api_version'
requestBody:
description: Contents of the routing profile to create.
content:
application/json:
schema:
$ref: '#/components/schemas/RoutingProfile'
example:
name: Storage RP
routes:
- addresses:
- https://datastoragevendor.com/uplinks
required: true
responses:
201:
description: Routing profile created successfully.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/RoutingProfile'
400:
description: Bad Request
content:
application/json:
schema:
$ref: "#/components/schemas/error"
401:
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/error"
403:
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/error"
404:
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/error"
429:
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/error"
500:
description: Server error
content:
application/json:
schema:
$ref: "#/components/schemas/error"
deprecated: false
/routingProfiles/{routingProfileRef}:
get:
tags:
- Routing
summary: Retrieves specific routing profiles
description: Retrieves the routing profile corresponding to the provided routing `profile ref`, if that routing profile is within authorized scopes.
operationId: Routingprofileretrieval
security:
- oauth2: []
parameters:
- $ref: '#/components/parameters/api_version'
- name: routingProfileRef
in: path
description: Ref of the routing profile to retrieve.
required: true
style: simple
schema:
type: string
responses:
200:
description: Routing profile retrieved successfully.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/RoutingProfile'
400:
description: Bad Request
content:
application/json:
schema:
$ref: "#/components/schemas/error"
401:
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/error"
403:
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/error"
404:
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/error"
429:
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/error"
500:
description: Server error
content:
application/json:
schema:
$ref: "#/components/schemas/error"
deprecated: false
put:
tags:
- Routing
summary: Updates specific routing profiles
description: Updates the routing profile corresponding to the provided routing `profile ref`, if that routing profile is within authorized scopes. Note that the `default` attribute can only be updated from `false` to `true` (thus updating `default` attribute for the previous default routing profile from `true` to `false`).
operationId: Routingprofileupdate
security:
- oauth2: []
parameters:
- $ref: '#/components/parameters/api_version'
- name: routingProfileRef
in: path
description: Ref of the routing profile to update.
required: true
style: simple
schema:
type: string
requestBody:
description: Contents of the routing profile to update.
content:
application/json:
schema:
$ref: '#/components/schemas/RoutingProfile'
example:
name: Storage RP updated
required: true
responses:
200:
description: Routing profile updated successfully.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/RoutingProfile'
400:
description: Bad Request
content:
application/json:
schema:
$ref: "#/components/schemas/error"
401:
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/error"
403:
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/error"
404:
description: Not Found
content:
application/json:
schema:
$ref: "#/components/schemas/error"
429:
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/error"
500:
description: Server error
content:
application/json:
schema:
$ref: "#/components/schemas/error"
deprecated: false
delete:
tags:
- Routing
summary: Deletes routing profiles
description: Deletes the routing profile corresponding to the provided routing `profile ref`, if that routing profile is within authorized scopes.
operationId: Routingprofiledeletion
security:
- oauth2: []
parameters:
- $ref: '#/components/parameters/api_version'
- name: routingProfileRef
in: path
description: Ref of the routing profile to delete.
required: true
style: simple
schema:
type: string
responses:
204:
description: Routing profile deleted successfully.
headers: {}
400:
description: Bad Request
content:
application/json:
schema:
$ref: "#/components/schemas/error"
401:
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/error"
403:
description: Forbidden
content:
application/json:
schema:
$ref: "#/components/schemas/error"
404:
description: Not Found
# --- truncated at 32 KB (71 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/kpn/refs/heads/main/openapi/kpn-lora-device-management-openapi.yml