How to add POIs using REST API
This guide explains how to create Points of Interest (POIs) using REST API.
- Read how to enable REST API
- Read how to login and get an API token
- Read how to obtain the userID from a user
POI > poicategories - we will use this resource to know the POI category ID to insert our POI.
POI > pois - we will use this resource to add our new POI into the category.
1. Log in to http://host_name/comGpsGate/api/v.1/test
Note: replace host_name with your actual server IP address or host name.
Get the POI category ID
2. We will start by obtaining the POI category ID:
Click on the resource name, then > Try it out
3. Click on Execute
4. You will now obtain a list of categories of an application with their names and IDs among other properties.
Save the ID of your category of choice for use in the next steps.
Adding a new POI
Now that you have a POI category ID, we will use it to add a new POI into the chosen category.
5. Navigate to POST > POI > pois category and click again on the Try it out button to the right.
6. Enter the required applicationID and categoryID obtained in the previous steps.
Note: If you don't know your Application ID, you can obtain it as explained here.
7. Insert in the POI model example, the CategoryID, Description, ID, Name, and Location properties related to your POI.
7. Click on Execute to insert it.
If the POI was successfully inserted, you will see a response with the code 200 confirming it:
You can also see your POI insertion in your application: