How to add POIs using REST API

This guide explains how to create Points of Interest (POIs) using REST API.

Requisites

Resources used

POI > poicategories - we will use this resource to know the POI category ID to insert our POI.

mceclip0.png

POI > pois - we will use this resource to add our new POI into the category.

mceclip1.png

How to

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

mceclip2.png

3. Click on Execute

mceclip4.png

4. You will now obtain a list of categories of an application with their names and IDs among other properties.

mceclip3.png

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 to 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.

mceclip7.png

7. Insert in the POI model example, the CategoryID, Description, ID, Name, and Location properties related to your POI. 

mceclip10.png

8. Click on Execute to insert it.

If the POI was successfully inserted, you will see a response with the code 200 confirming it:

mceclip8.png

You can also see your POI insertion in your application:

mceclip11.png