How to create a second application URL?
-
To add a seconde application URL you can perform the following …
With the username and password from the projects API credentials
Put the following HTTP request:
PUT:
https://iot.netwerk.t-mobile.nl:443/m2m/applications/registrationHEADERS:
Content-Type: application/json
Authorization: Basic base64(<USERNAME>:<PASSWORD>)
Accept’: 'application/jsonBODY:
{
‘url’: ‘<YOUR APPLICATION URL>’,
‘headers’: { <YOUR HEADER FIELDS>}
}If everything works fine you should get returned from the API
{
“msg”: “Success”,
“code”: 1000
} -
Two questions:
- This method can only be used to set the second URL, there is no way to change the first URL through the API ?
- Can I check if the second URL was already set, and what it’s value is, through the API ?
-
Changing the url is not possible afaik. You can only overwrite the URL.
You can set-up the first URL and overwrite the first URL by using the GUI and you can set-up the second URL and overwrite the second URL via the APO.
I’m not sure if you check the value what has been set via the API before.
I’ll ask @Roalnd-Baldin tomorrow
-
Not so much a question as an observation : After registering the second application, no messages arrive. Unlike the first endpoint, which just automatically gets all data from your project, you will have to ‘subscribe’ to the resources of a specific device before the data of that device is sent to the second endpoint.