Tutorial
Commissioning
-
Authenticate on JS portal with JS subscriber account.
-
Select KeyManager ID in application listing.
-
Retrieve accessCode then bootstrap KeyManager.
-> You will be able to commission a device.
Authenticate on Portal
Request
POST https://activation.thingpark.com/portal/rest/subscribers/authenticate HTTP/1.1
Content-Type: application/json
{"login": "username", "password": "password"}
Response
HTTP/1.1 200 OK
Set-Cookie: JSESSIONID=6s-7MUo7LkluTYdYvr8Zh5fcRQeapq6z0voTzf3C.localhost; path=/portal
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:authenticate xmlns:ns2="http://www.actility.com/portal/ws">
<sessionToken>917ec2a4da24fca0ab0c2ffb2387add1</sessionToken>
<href>/portal/rest/subscribers/100000074</href>
<state>SUCCESS</state>
</ns2:authenticate>
List all subscribed applications
Request
GET https://activation.thingpark.com/portal/rest/subscribers/100000074/applications?sessionToken=917ec2a4da24fca0ab0c2ffb2387add1&JSESSIONID=6s-7MUo7LkluTYdYvr8Zh5fcRQeapq6z0voTzf3C.localhost HTTP/1.1
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"briefs": {
"brief": [
{
"name": "key-manager",
"commercialName": "",
"ID": "actility-sup/key-manager",
"place": {
"personalName": "Default",
"ID": "170"
},
"logo": "/thingpark/smp/rest/resources/files/logo/application/130",
"grantedPermission": null,
"claimedPermission": null,
"state": {
"value": "ACTIVE",
"timestamp": 1535117784016,
"info1": null
},
"presentationStatus": "SHOWN",
"widgetActivated": true,
"href": "/portal/rest/subscribers/100000074/applications/174:722"
},
{
"name": "Wireless Logger",
"commercialName": "Wireless Logger",
"ID": "actility-sup/wlogger",
"place": {
"personalName": "Default",
"ID": "170"
},
"logo": "/thingpark/smp/rest/resources/files/logo/application/102",
"grantedPermission": null,
"claimedPermission": null,
"state": {
"value": "ACTIVE",
"timestamp": 1535117784254,
"info1": null
},
"presentationStatus": "SHOWN",
"widgetActivated": true,
"href": "/portal/rest/subscribers/100000074/applications/174:723"
},
{
"name": "JS License Manager",
"commercialName": "JS License Manager",
"ID": "js-cs/license-manager",
"place": {
"personalName": "Default",
"ID": "170"
},
"logo": "/thingpark/smp/rest/resources/files/logo/application/127",
"grantedPermission": null,
"claimedPermission": null,
"state": {
"value": "ACTIVE",
"timestamp": 1535117784309,
"info1": null
},
"presentationStatus": "SHOWN",
"widgetActivated": false,
"href": "/portal/rest/subscribers/100000074/applications/174:724"
}
]
},
"more": false
}
Retrieve accessCode
Request
GET https://activation.thingpark.com/portal/rest/subscribers/100000074/applications/174:722/views/portal?sessionToken=917ec2a4da24fca0ab0c2ffb2387add1&JSESSIONID=6s-7MUo7LkluTYdYvr8Zh5fcRQeapq6z0voTzf3C.localhost HTTP/1.1
Response
HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:view xmlns:ns2="http://www.actility.com/portal/ws">
<accessCode>YT1hY3RpbGl0eS1zdXAva2V5LW1hbmFnZXI7YWk9NzIyO2U9dHBrLTEwMDAwMDQxOTtoPTIwNjI4NDdiZGQ5YTQ1Y2Q5MzFkYzE5YjM2ZmQ3YjM3ZDM0NDAwMmMzOGU5YjM4NjVjYzI1ZTZlNDQ2NmNmYz I7dD0yMDE5LTAyLTExVDE1OjQzOjU1LjAxMFo=</accessCode>
<href>https://js.labs.thingpark.com/keyManager/?subscriptionAccessCode=YT1hY3RpbGl0eS1zdXAva2V5LW1hbmFnZXI7YWk9NzIyO2U9dHBrLTEwMDAwMDQxOTtoPTIwNjI4NDdiZGQ5YTQ1Y2Q5MzFkYzE5YjM2ZmQ3YjM3ZDM0NDAwMmMzOGU5YjM4NjVjYzI1ZTZlNDQ2NmNmYzI7dD0yMDE5LTAyLTExVDE1OjQzOjU1LjAxMFo=</href>
</ns2:view>
Bootstrapping KeyManager
Request
GET https://activation.thingpark.com/thingpark/wireless/rest/kmCustomers?subscriptionAccessCode=YT1hY3RpbGl0eS1zdXAva2V5LW1hbmFnZXI7YWk9NzIyO2U9dHBrLTEwMDAwMDQxOTtoPTIwNjI4NDdiZGQ5YTQ1Y2Q5MzFkYzE5YjM2ZmQ3YjM3ZDM0NDAwMmMzOGU5YjM4NjVjYzI1ZTZlNDQ2NmNmYzI7dD0yMDE5LTAyLTExVDE1OjQzOjU1LjAxMFo=&JSESSIONID=5WoGQnMmSB1iGzrIUcVDnXWsxeo-1Nf2aT-hONkk.localhost HTTP/1.1
Response
HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<kmCustomers>
<disclaimerRequired>false</disclaimerRequired>
<sessionToken>13e9bc9c394c3030</sessionToken>
<subscription>
<href>/kmSubscriptions/8</href>
</subscription>
<user>
<firstName> </firstName>
<lastName> </lastName>
<language>en-US</language>
</user>
</kmCustomers>
Commission device
Request
POST https://activation.thingpark.com/thingpark/wireless/rest/kmSubscriptions/8/devices/claim?sessionToken=13e9bc9c394c3030 HTTP/1.1
Content-Type: application/json
{
"devEUI": "F03D291000110042",
"ownerToken": "1101F03D291000110005"
}
Response
HTTP/1.1 201 Created
Content-Type: application/xml
Location: /thingpark/wireless/rest/kmSubscriptions/8/devices/588
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:claim xmlns:ns2="http://www.actility.com/tpkwrls/ws/kmsubscription">
<devEUI>**F03D291000110042**</devEUI>
</ns2:claim>
Allocate Askey and HomeNSNetID
Request
PUT https://activation.thingpark.com/thingpark/wireless/rest/kmSubscriptions/8/devices/588?sessionToken=13e9bc9c394c3030 HTTP/1.1
Content-Type: application/json
{
"asKey": {
"ID": "TWA_1100000074.532.KM"
},
"homeNsNetID": "600017"
}
Response
HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:device xmlns:ns2="http://www.actility.com/tpkwrls/ws/kmsubscription">
<now>2019-02-11T16:35:01.445Z</now>
<occContext>
<version>2</version>
<lastUpdate>2019-02-11T16:35:01.436Z</lastUpdate>
<who> </who>
</occContext>
<name>test</name>
<EUI>F03D291000110042</EUI>
<appEUI>F03D29AC71000000</appEUI>
<appKey>23a987895de90b28aa4d14cb3f728180</appKey>
<hsmGroupID>HSM_JS-OPE.3</hsmGroupID>
<asKey>
<name>TPAkeytest</name>
<ID>TWA_1100000074.532.KM</ID>
<href>/thingpark/wireless/rest/kmSubscriptions/8/asKeys/532</href>
</asKey>
<customerAdminData>test</customerAdminData>
<historyJoinReqDaily/>
<historyJoinAnsDaily/>
<homeNsNetID>600017</homeNsNetID>
<creationDate>2019-02-11T16:17:09Z</creationDate>
<state>COMMISSIONED</state>
</ns2:device>
Provisioning
-
Authenticate on portal with NS subscriber account.
-
Select DeviceManager ID in application listing.
-
Retrieve accessCode then bootstrap DeviceManager.
-> You will be able to provision a device.
Authenticate on Portal
Request
POST https://activation.thingpark.com/portal/rest/subscribers/authenticate HTTP/1.1
Content-Type: application/json
{"login": "username", "password": "password"}
Response
HTTP/1.1 200 OK
Set-Cookie: JSESSIONID=6s-7MUo7LkluTYdYvr8Zh5fcRQeapq6z0voTzf3C.localhost; path=/portal
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:authenticate xmlns:ns2="http://www.actility.com/portal/ws">
<sessionToken>917ec2a4da24fca0ab0c2ffb2387add1</sessionToken>
<href>/portal/rest/subscribers/100000074</href>
<state>SUCCESS</state>
</ns2:authenticate>
List all subscribed applications
Request
GET https://activation.thingpark.com/portal/rest/subscribers/100000074/applications?sessionToken=917ec2a4da24fca0ab0c2ffb2387add1&JSESSIONID=6s-7MUo7LkluTYdYvr8Zh5fcRQeapq6z0voTzf3C.localhost HTTP/1.1
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"briefs": {
"brief": [
{
"name": "key-manager",
"commercialName": "",
"ID": "actility-sup/key-manager",
"place": {
"personalName": "Default",
"ID": "170"
},
"logo": "/thingpark/smp/rest/resources/files/logo/application/130",
"grantedPermission": null,
"claimedPermission": null,
"state": {
"value": "ACTIVE",
"timestamp": 1535117784016,
"info1": null
},
"presentationStatus": "SHOWN",
"widgetActivated": true,
"href": "/portal/rest/subscribers/100000074/applications/174:722"
},
{
"name": "Wireless Logger",
"commercialName": "Wireless Logger",
"ID": "actility-sup/wlogger",
"place": {
"personalName": "Default",
"ID": "170"
},
"logo": "/thingpark/smp/rest/resources/files/logo/application/102",
"grantedPermission": null,
"claimedPermission": null,
"state": {
"value": "ACTIVE",
"timestamp": 1535117784254,
"info1": null
},
"presentationStatus": "SHOWN",
"widgetActivated": true,
"href": "/portal/rest/subscribers/100000074/applications/174:723"
},
{
"name": "JS License Manager",
"commercialName": "JS License Manager",
"ID": "js-cs/license-manager",
"place": {
"personalName": "Default",
"ID": "170"
},
"logo": "/thingpark/smp/rest/resources/files/logo/application/127",
"grantedPermission": null,
"claimedPermission": null,
"state": {
"value": "ACTIVE",
"timestamp": 1535117784309,
"info1": null
},
"presentationStatus": "SHOWN",
"widgetActivated": false,
"href": "/portal/rest/subscribers/100000074/applications/174:724"
}
]
},
"more": false
}
Retrieve accessCode
Request
GET https://activation.thingpark.com/portal/rest/subscribers/100000074/applications/174:722/views/portal?sessionToken=917ec2a4da24fca0ab0c2ffb2387add1&JSESSIONID=6s-7MUo7LkluTYdYvr8Zh5fcRQeapq6z0voTzf3C.localhost HTTP/1.1
Response
HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:view xmlns:ns2="http://www.actility.com/portal/ws">
<accessCode>YT1hY3RpbGl0eS1zdXAva2V5LW1hbmFnZXI7YWk9NzIyO2U9dHBrLTEwMDAwMDQxOTtoPTIwNjI4NDdiZGQ5YTQ1Y2Q5MzFkYzE5YjM2ZmQ3YjM3ZDM0NDAwMmMzOGU5YjM4NjVjYzI1ZTZlNDQ2NmNmYzI7dD0yMDE5LTAyLTExVDE1OjQzOjU1LjAxMFo=</accessCode>
<href>https://js.labs.thingpark.com/keyManager/?subscriptionAccessCode=YT1hY3RpbGl0eS1zdXAva2V5LW1hbmFnZXI7YWk9NzIyO2U9dHBrLTEwMDAwMDQxOTtoPTIwNjI4NDdiZGQ5YTQ1Y2Q5MzFkYzE5YjM2ZmQ3YjM3ZDM0NDAwMmMzOGU5YjM4NjVjYzI1ZTZlNDQ2NmNmYzI7dD0yMDE5LTAyLTExVDE1OjQzOjU1LjAxMFo=</href>
</ns2:view>
Bootstrapping DeviceManager
Request
GET https://activation.thingpark.com/thingpark/wireless/rest/customers?subscriptionAccessCode=YT1hY3RpbGl0eS1zdXAva2V5LW1hbmFnZXI7YWk9NzIyO2U9dHBrLTEwMDAwMDQxOTtoPTIwNjI4NDdiZGQ5YTQ1Y2Q5MzFkYzE5YjM2ZmQ3YjM3ZDM0NDAwMmMzOGU5YjM4NjVjYzI1ZTZlNDQ2NmNmYzI7dD0yMDE5LTAyLTExVDE1OjQzOjU1LjAxMFo=&JSESSIONID=5WoGQnMmSB1iGzrIUcVDnXWsxeo-1Nf2aT-hONkk.localhost HTTP/1.1
Response
HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customers>
<disclaimerRequired>false</disclaimerRequired>
<sessionToken>e64ca4be434da542</sessionToken>
<subscription>
<href>/subscriptions/164</href>
</subscription>
<user>
<firstName> </firstName>
<lastName> </lastName>
<language>en-US</language>
</user>
</customers>
Provision device
Request
POST https://activation.thingpark.com/thingpark/wireless/rest/subscriptions/164/devices?sessionToken=e64ca4be434da542
Content-Type: application/json
{
"EUI": "F03D291000110042",
"appEUI": "F03D29AC71000001",
"activation": "OTAA",
"appServersRoutingProfile": {
"ID": "TWA_1100000075.224"
},
"model": {
"ID": "LORA/GenericA.1_ETSI_Rx2-SF12"
},
"networkSubscription": {
"ID": "fuota-cs/fuota-cp"
}
}
Response
HTTP/1.1 201 Created
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:device xmlns:ns2="http://www.actility.com/tpkwrls/ws/subscription">
<now>2019-02-27T13:20:22.346Z</now>
<occContext>
<version>1</version>
<lastUpdate>2019-02-27T13:20:22.328Z</lastUpdate>
<who> </who>
</occContext>
<name>New device 1346</name>
<model>
<commercialName>LoRaWAN 1.0 - class A - Rx2_SF12</commercialName>
<logo>/thingpark/wireless/rest/resources/files/logo/deviceProfile/343</logo>
<typeMAC>LoRaMAC</typeMAC>
<type>A</type>
<macMajorVersion>0</macMajorVersion>
<macMinorVersion>3</macMinorVersion>
<ID>LORA/GenericA.1_ETSI_Rx2-SF12</ID>
</model>
<EUI>F03D291000110042</EUI>
<connectivity>LORAWAN</connectivity>
<vendor>
<name>Generic</name>
<commercialName>Generic</commercialName>
<commercialDescription>LoRaWAN generic devices.</commercialDescription>
<ID>generic</ID>
<logo>/thingpark/wireless/rest/resources/files/logo/device/20</logo>
</vendor>
<creationDate>2019-02-27T13:20:22.288Z</creationDate>
<activation>OTAA</activation>
<appEUI>F03D29AC71000001</appEUI>
<networkSubscription>
<commercialName>FUOTA CP</commercialName>
<ID>fuota-cs/fuota-cp</ID>
<supplier>
<ID>fuota-cs</ID>
</supplier>
<mobility>false</mobility>
<href>/thingpark/wireless/rest/subscriptions/164/networkSubscriptions/216</href>
<allowMessageMode>false</allowMessageMode>
<allowDirectIPMode>false</allowDirectIPMode>
</networkSubscription>
<appServersRoutingProfile>
<name>NoAS</name>
<ID>TWA_1100000075.224</ID>
<href>/thingpark/wireless/rest/subscriptions/164/appServersRoutingProfiles/224</href>
</appServersRoutingProfile>
<markerID>100</markerID>
<locationType>1</locationType>
<motionIndicator>RANDOM</motionIndicator>
<debug>
<lorawan>false</lorawan>
<allowed>false</allowed>
</debug>
<classBState>0</classBState>
<historyUpDaily/>
<historyDwDaily/>
<alarm6>0</alarm6>
<alarm5>0</alarm5>
<alarm4>0</alarm4>
<alarm3>0</alarm3>
<alarm2>0</alarm2>
<alarm1>0</alarm1>
<healthState>INIT</healthState>
<LRRs/>
<appServers/>
</ns2:device>