TP Wireless 6.1 OSS API User Guide
TP Wireless 6.1 OSS API User Guide
Under NDA
NOTICE
This document contains proprietary and confidential material of ACTILITY SA. This document is
provided under and governed by either a license or confidentiality agreement. Any unauthorized
reproduction, use, or disclosure of this material, or any part thereof, is strictly prohibited.
The material provided in this document is believed to be accurate and reliable. However, no
responsibility is assumed by Actility SA for the use of this material. Actility SA reserves the right to
make changes to the material at any time and without notice. This document is intended for
information and operational purposes only. No part of this document shall constitute any contractual
commitment by Actility SA.
Portions of this documentation and of the software herein described are used by permission of their
copyright owners.
Actility, ThingPark, are registered trademarks of Actility SA or its subsidiaries may also be registered
in other countries.
Other denoted product names of Actility SA or other companies may be trademarks or registered
trademarks of Actility SA or its subsidiaries, or their respective owners.
Headquarters
Actility Lannion,
Actility S.A 4 rue Ampère BP 30225
22300 Lannion France
www.actility.com
A.-F. Pierre
03 10/04/2015 OSS API User Guide as a tutorial
A. Yverneau
4.2-rev1 31/08/2017 L. Guillemot Initial revision for ThingPark Wireless 4.1, 4.1.2 and 4.2
Actility ThingPark Wireless LRC-AS Tunnel Interface Developer Guide (LoRaWAN) Actility
Actility ThingPark Wireless LRC-AS Tunnel Interface Developer Guide (Cellular) Actility
2 CONVENTIONS
This user guide uses the following conventions:
Convention Description
API Domain Name For readability, the domain name to use for REST requests is never shown.
The domain name to use depends of the platform.
This may be api.thingpark.com when using the ThingPark SaaS platform,
or the domain name may be provided by the Operator when a dedicated
platform is used (e.g. api.the-operator-domain.com).
XML Versus In this guide, REST requests and responses use the default supported
JSON Documents document:
▪ Accept: application/json
Response Extract For all REST request shown in this guide, only a response extract with the
relevant content is given.
API Layer
User Portal Store (E-Shop) Operator Connectivity Address Usage Record Supervision, System OCP Edition SaaS Edition RMC
Manager Manager Manager Manager (UDR) Monitoring, Management
Alarms Platform (SMP)
BPM Engine Market
Drivers Connectors
ThingPark ThingPark
Wireless OSS SMP
2. Bootstrap using
Access Code 1. Authentication &
Access Code generation
4. Access granted to
OSS API
Third-party
Application
Consequently:
(1) Authentication & Access Code generation
The Application must use the SMP API to authenticate and generate an access code before accessing
the OSS API.
(2) Bootstrap using Access code
The access code is required to access the Connectivity Manager, a Network Manager subscription or
a Device Manager subscription in the OSS API.
(3) Access Code verification
The OSS API validates the access code with SSO.
(4) Access granted to OSS API
The Application is given access to the OSS API.
The SSO Authentication Process can be used by an Administrator, and additionally by an Application
for the Device Manager only. For more information about how to log in with examples, see:
▪ The Administrator credentials (login and password) into the HTTP request content within an
XML document.
▪ Provide:
o The Administrator ThingPark ID into the requested URL
o The targeted Connectivity Supplier ID into the HTTP request content within an XML
document
o The Session Cookie into the HTTP request content within the Cookie header.
▪ Append:
o The Session Token to the requested URL.
▪ Provide the Session Cookie into the HTTP request content within the Cookie header
▪ Append the Session Token to the requested URL.
▪ The targeted Connectivity Manager HREF, which is the base URL you work with
▪ The Session Cookie to set in the Cookie header for any API request based on the Connectivity
Manager HREF
▪ The Session Token to append to the base URL for any API request based on the Connectivity
Manager HREF.
1. In your application, execute a REST request using the following example with your access code:
>> GET /thingpark/wirelessAdmin/rest/admins/suppliers?adminAccessCode=YT10cGstMTAwMDcyODUz
O2g9NTM3YjdjMTM1OTNkNzIwYjZiMWU4MzVlNGI2OTAwMWU4NWQ1MDhhNzczYjg4NTRlZWQ3YzZjZjE4MzY0YzdiMj
ttPVRQV19DUztzPWFjdGlsaXR5LWNzO3Q9MjAxNi0xMi0xNlQxMDo1NTo0MS4wMzgrMDE6MDA=
Content-Type: application/json
{
"success": true,
"data": {
"supplier": {
"ID": "acme-cs
"href": "\/admins\/suppliers\/3",
},
"sessionToken": "ebe0eae2b878725184cb6f69f5393574"
}
}
{
"data": {
"ID": "acme-cs\/cp001",
"uplinkRate": "10.0",
...
}
}
{
"success": true,
"data": ""
}
Content-Type: application/json
{
"success": true,
"data": [{
"ID": "acme-cs\/acme-cp001",
"localization_value": "{\"b2cName\":\"acme-cp001\",\"b2cDescription\":\"Acme Connect
ivity Plan Level One\"}",
"commercialName": "acme-cp001",
"commercialDescription": " Acme Connectivity Plan Level One ",
"href": "\/admins\/suppliers\/3\/connectivityPlans\/43",
"provID": "TSP_ACME-CS.43"
}, {
...
}],
"more": false
}
{
"success": true,
"data": {
"provID": "TSP_ACME-CS.43",
"ackedUplinkFrame": "1",
"downlinkTransmission": "1",
...
}
}
{
"data": {
"ID": "acme-cs\/ acme-cp001",
"uplinkRate": "20.0",
…
}
}
▪ Provide:
o The Administrator ThingPark ID into the requested URL
o The targeted Network Partner ID into the HTTP request content within an XML
document
o The Session Cookie into the HTTP request content within the Cookie header.
▪ Append:
o The Session Token to the requested URL.
▪ Provide the Session Cookie into the HTTP request content within the Cookie header
▪ Append the Session Token to the requested URL.
▪ The targeted Network Partner HREF, which is the base URL you work with
▪ The Session Cookie to set in the Cookie header for any API request based on the Network
Partner HREF
▪ The Session Token to append to the base URL for any API request based on the Network
Partner HREF.
1. In your application, execute a REST request using the following example with your access code:
>> GET /thingpark/wireless/rest/partners?adminAccessCode=YT10cGstMTAwMDAwMjQxO2g9YzA0MjY1M
GRhMmI5YzQ2OWVmNWIyMTYyOWQxZWZiOWM7bT1UUFdfTlA7cz1hY3RpbGl0eS1wcy1zdXBwbGllcjt0PTIwMTUtMTE
tMjVUMTA6Mzc6NTMuMDYxKzAxOjAw&type=SUPPLIER
Content-Type: application/xml
1. In your application, execute the following REST request using the following example with your
Network Partner HREF, Session Token and Session Cookie:
>> GET /thingpark/wireless/rest/partners/139/bsProfiles?sessionToken=bb32bade5c813448
Content-Type: application/xml
Cookie: JSESSIONID=gcn1wPKxdUPUW6yh8aPsAiwY.twa
1. In your application, execute the following REST request using the following example with the ID
value of the base station profile you retrieved in the previous task:
>> POST /thingpark/wireless/rest/partners/139/bss?sessionToken=bb32bade5c813448
Content-Type: application/xml
Cookie: JSESSIONID=gcn1wPKxdUPUW6yh8aPsAiwY.twa
2. Check your output with the response extract showing that the new base station has been created
and added to the system:
<< 201 Created
Location: /thingpark/wireless/rest/partners/139/bss/1222
3. Take note of the Base Station HREF information displayed in the Location HTTP response header.
It is required for any REST request you want to perform on this base station.
</brief>
...
</briefs>
<lrrs>
<lrr>
<lrrID>08060999</lrrID>
<lat>41.387035</lat>
<lon>2.113095</lon>
</lrr>
...
</lrrs>
</ns2:devicesScattering>
▪ Total number of beacon transmissions requested by the LRC since LRR startup
▪ Total number of beacon effectively transmitted since LRR startup
▪ The delivery cause of the last beacon transmission.
3. You have now to retrieve the result of the asynchronous command by performing the following
task.
3. If you want to perform the next task to acknowledge an alarm, take note of its HREF value.
▪ If the base station has been created using a LRR UUID, the LRR UUID cannot be modified.
▪ If the base station has been created using a LRR ID, the LRR UUID is returned with a “null”
value.
1. In your application, execute a GET REST request using the following example to retrieve the base
station version number and the base station state:
>> GET /thingpark/wireless/rest/partners/139/bss/1222?sessionToken=bb32bade5c813448
Content-Type: application/xml
Cookie: JSESSIONID=gcn1wPKxdUPUW6yh8aPsAiwY.twa
4. Execute a PUT REST request to update the base station using the following example:
>> PUT /thingpark/wireless/rest/partners/139/bss/1222?sessionToken=bb32bade5c813448
Content-Type: application/xml
Cookie: JSESSIONID=gcn1wPKxdUPUW6yh8aPsAiwY.twa
1. Execute a REST request using the following example with your base station HREF:
>> DELETE /thingpark/wireless/rest/partners/139/bss/1222?sessionToken=bb32bade5c813448
Cookie: JSESSIONID=gcn1wPKxdUPUW6yh8aPsAiwY.twa
Subscriber ID 199999999
▪ The Administrator credentials (login and password) into the HTTP request content within an
XML document.
▪ Provide the Session Cookie into the HTTP request content within the Cookie header
▪ Append the Session Token to the requested URL.
▪ The targeted Device Manager HREF, which is the base URL you work with
▪ The Session Cookie to set in the Cookie header for any API request based on the Device
Manager HREF
▪ The Session Token to append to the base URL for any API request based on the Device
Manager HREF.
1. In your application, execute a REST request using the following example with your access code:
GET /thingpark/wireless/rest/customers/?adminAccessCode=YT10cGstMTAwMDAwMjQxO2g9ZDYxNGFlMz
YwYzljYjlkYWQwMzM3MzNlMGQ5NzdjYTk7bT1UUFdfU1VCUzt0PTIwMTUtMTEtMjhUMDc6NDY6NTMuNjI5KzAxOjAw
O3c9MTAwMDAwNjY2
Content-Type: application/xml
7. Select Read AS routing profile in the Type list to add the permission.
8. Click Add.
9. Repeat for all items in the list.
10. Click Close.
All the permissions you have allowed to the Application will be available for the Subscriber when
purchasing the offer.
▪ Provide the Application credentials (login and password) into the HTTP request content
within an XML document.
▪ Provide:
o The Application Subscription HREF into the requested URL
o The Session Cookie into the HTTP request content within the Cookie header.
▪ Append:
o The Session Token to the requested URL.
▪ Provide the Session Cookie into the HTTP request content within the Cookie header
▪ Append the Session Token to the requested URL.
▪ The targeted Device Manager HREF, which is the base URL you work with
▪ The Session Cookie to set in the Cookie header for any API request based on the Network
Partner HREF
▪ The Session Token to append to the base URL for any API request based on the Network
Partner HREF.
1. In your application, execute a REST request using the following example with your access code:
GET /thingpark/wireless/rest/customers/?appAccessCode=YT10cGstMTAwMDAwMjQxO2g9ZDYxNGFlMzYw
YzljYjlkYWQwMzM3MzNlMGQ5NzdjYTk7bT1UUFdfU1VCUzt0PTIwMTUtMTEtMjhUMDc6NDY6NTMuNjI5KzAxOjAwO3
c9MTAwMDAwNjY2
Content-Type: application/xml
3. To keep going with the scenario and according to the connectivity (LoRaWAN™ or cellular) you
want to use, take note of the:
▪ ID value
▪ HREF value
of the network subscription you want to be associated with the device.
<ns2:networkSubscription xmlns:ns2="http://www.actility.com/tpkwrls/ws/subscription">
<ID>actility-cs/testing</ID>
<commercialName>Actility Testing CP</commercialName>
<supplier>
<commercialName>Actility Connectivity Supplier</commercialName>
<ID>actility-cs</ID>
</supplier>
<connectivity>LORAWAN</connectivity>
<hsmGroupID>HSM-group1<hsmGroupID>
...
</ns2:networkSubscription>
3. If you want to create a LoRaWAN™ OTAA device and if an HSM group ID is returned, take note of
its value to keep going with the scenario. You will need it when declaring the OTAA device.
▪ Give LoRaWAN™ or cellular connectivity to the device on the ThingPark platform according
to the type of the AS routing profile
▪ Route the device’s uplink and downlink packets to an Application Server.
For more information about other operations you can perform on AS routing profiles, see 7.5
Handling AS Routing Profiles.
3. Take note of the ID and HREF information of the AS routing profile you want according to the
connectivity of the device you want to create.
If no information is returned in the response, you have to declare a new AS routing profile.
</ns2:appServersRoutingProfile>
Notes
3. To keep going with the scenario, take note of the value of:
▪ The rsaEncryptedASKey, which is the AS key generated by the HSM.
This key has been encrypted with the rsa public key you have provided in the PUT request. It
is used in the LRC-AS tunnel interface to decrypt the appSKey. For more information, see
[R5].
▪ Create the Local Application Server you want according to the connectivity and server used
by the device:
o LoRaWAN™ HTTP Application Server
o Cellular HTTP Application Server
o Kafka Application Server, that applies to LoRaWAN™ and cellular connectivity.
Type HTTP
</ns2:appServers>
▪ AS ID AS-ID and LRC-AS Key are used by the LRC and the Local Application
▪ LRC-AS Key Server for the tunneling interface. For more information, see [R5].
Broker ID KAFKA_DEFAULT
▪ Retrieve the list of the Operator’s Suppliers who provide Application Servers in order to
choose the supplier you want
▪ Use the Supplier ID to list its Supplier Application Server.
In the following example, a LoRaWAN™ AS routing profile is provisioned with the following
Application Server destinations at the same time.
1. In your application, execute a REST request using the following example:
>> PUT /thingpark/wireless/rest/subscriptions/47/appServersRoutingProfiles/833?sessionToke
n=bb32bade5c813448
Content-Type: application/xml
Cookie: JSESSIONID=gcn1wPKxdUPUW6yh8aPsAiwY.twa
The following information is optional for ABP and OTAA devices. Additional required information
applies if the HSM option is activated on an OTAA device.
Data Type Description
Device name Any name you want.
Administrative information Administrative information associated to the device (e.g. floor
number, building, address, etc.).
In our example, we will use the following information to declare the device:
Data Type Example
Provisioning mode ABP /OTAA with HSM
Device name My device
Device profile ID LoRaMote.1
DevEUI 70B3D5E756000999
DevAddr 6E0000999
Network session Key 7374757A3FDD092947CE2DE9321C6040
Application session Key (on LoRaWAN™ port 1) 65FC7B3530A44FB95CF327AB19B1454E
Device Network Subscription ID acme-cs/cp1
AppKey Encryption Mode HSM_APP_KEY
HSM group ID HSM-group1
Device AS Routing Profile ID TWA_100000131.48
Administrative information High Street, 999-999 Town, John Office
7.2.2.2 PROCEDURE
Once you have the prerequisite information, you can perform the following request to declare the
LoRaWAN™ ABP device (with the required additional information for an OTAA device with HSM).
1. In your application, execute a REST request using the following example:
>> POST /thingpark/wireless/rest/subscriptions/47/devices?sessionToken=bb32bade5c813448
Cookie: JSESSIONID=gcn1wPKxdUPUW6yh8aPsAiwY.twa
Content-Type: application/xml
In our example, we will use the following information to declare the device:
Data Type Example
Device name My device
Device profile ID LTE device
IMEI (Uses the <EUI> tag) 123456789012347
IMSI 460004777770001
Ki 7374757A3FDD092947CE2DE9321C6040
Device Network Subscription ID acme-cs/cp1
Device AS Routing Profile ID TWA_100000131.48
Administrative information Old Street, 999-999 Town, Jim Office
7.2.3.2 PROCEDURE
Once you have the prerequisite information, you can perform the following request to declare the
cellular device:
1. In your application, execute a REST request using the following example:
>> POST /thingpark/wireless/rest/subscriptions/47/devices?sessionToken=bb32bade5c813448
Cookie: JSESSIONID=gcn1wPKxdUPUW6yh8aPsAiwY.twa
Content-Type: application/xml
Device 1
Data Type Example
Device 2
Data Type Example
Processing directive CREATE_CELLULAR
IMEI (Uses the <EUI> tag) 123456789012347
IMSI 460004777770001
Device profile ID LTE/DEMO.1
Ki 7374757A3FDD092947CE2DE9321C6040
Device Network Subscription ID cellular-cs/testing
Device AS Routing Profile ID TWA_200000131.67
Device name Device #2 imported with API
Administrative information New Street, 111-111 Town, Jim Office
CSV Content
The CSV content reflecting the mass-import file used to declare the LoRaWAN™ ABP device and the
cellular device looks like this:
#== CSV content built for mass-import ==
"CREATE_ABP","74B3D5E76E000174","6E000174","ABC/DEMO.1","7374757A3FDD092947CE2DE9321C6040","<A
ppSKeys><AppSKey
Port=""1"">65FC7B3530A44FB95CF327AB19B1454E</AppSKey></AppSKeys>","<modelCfgs><modelCfg>1</mod
elCfg></modelCfgs>","acme-cs/cp1","TWA_100000131.48","","Device #1 imported with
API","","","High Street, 999-999 Town, John Office","","","","",""
"CREATE_CELLULAR","123456789012347","460004777770001","LTE/DEMO.1","7374757A3FDD092947CE2DE932
1C6040","","","cellular-cs/testing","TWA_100000131.67","","Device #2 imported with
API","","","New Street, 111-111 Town, Jim Office","","","","",""
2. Check your output with the following returned code meaning that every CSV entry has been
handled successfully:
<< 200 OK
For general information about AS routing profiles, see 7.2.1.4 Associating an AS Routing Profile and
7.2.1.4.5 Provisioning an AS Routing Profile.
LoRaWAN™, the LoRa Alliance™, and LoRa Alliance Certified™ are trademarks of Semtech
Corporation, used with permission under a sublicense granted to the LoRa Alliance™ and its
members.