The API documentation describes how to create an endpoint. Using Postman, we will explain how to create multiple endpoints.
Information required to create an endpoint
To create an endpoint on the SAP IoT Connect 365 platform, the POST API used needs to have the following information:
Name of the endpoint
The name of the endpoint
You have the possibility to add specific information for each endpoint
activate or not (required) - is the endpoint activated or disable;
ID of the Service Profile assigned to the endpoint. To find this information, navigate to the "Service Profiles" tab in the EUI or run this API
ID of the tariff Profile assigned to the endpoint. To find this information, navigate to the "Tariff Profiles" tab in the SAP IoT Connect 365 UI or run this API
if we want to directly assign a SIM to the created endpoint, we need to enter here the SIM ID. To find this information, navigate to the SIMs tab in the SAP IoT Connect 365 UI.
You will need to provide this information for each endpoint you want to create. In order to create multiple endpoints at once, we can use the "Runner" option in Postman. Create a ‘.csv’ file (comma separated) and enter the information for each endpoint on a separate line in the following format:
Preparing the APIs to run
To run the API you need to authenticate and then run the endpoint creation API.
We are now ready to run the APIs multiple times and create several endpoints at once. In Postman, click on "Runner", select a collection, an environment, and your .csv file. The number of iterations should then be automatically detected. You can preview your file to be sure that everything is fine before clicking on "start run". This is how the preview should look like:
Responses for successful endpoint creation
Authentication post API: 200 OK Create endpoint post API: 201 Created
If your authentication API failed, nothing will work. If the endpoint creation API failed, check the following:
Is your .csv file comma delimited (try using an editor like notepad++)
Check the spelling of your variables: they should be written exactly the same way as in the .csv file and in Postman
Check the format of the API body where it is easy to forget a character.