Entity Information

Data type: MapItem, fields list

URL: /api/mapitems

HTTP Method: POST

Description

Create new map item.

To create new Map Item using the Trakopolis API server you need to pass JSON or XML serialized object with following properties:

PropertyRequiredTypeDefaultDescription
DivisionIdNoNumeric-Division Id
NameYesString-Name of Map Item. Can contains up to 255 symbols.
LatitudeYesNumeric-Latitude
LongitudeYesNumeric-Longitude
IconUrlNoString-URL of the icon.
MapItemActionsNolist of actions-
MapItemDetailsNolist of details-

Each Map Item can contains number of actions. Each action has following properties:

PropertyRequiredTypeDefaultDescription
NameYesString-Name of Action. Can contains up to 255 symbols.
ActionUrlYesString-Url to call.
HttpMethodYesString-Request method. Must be equals to one of http method.
HttpBodyNoString-Message body for POST or PUT request.
IconUrlNoString-URL of the icon.
BasicAuthUserNameNoString-Username for basic authentication if required. Can contains up to 255 symbols.
BasicAuthPasswordNoString-Password for basic authentication if required. Can contains up to 255 symbols.
IsRestCallNoBooleanFalseIf true request will be send as a rest call. If false request will be opened in a new tab.
IsInputNoBooleanFalseIf true input field will be displayed.

Each Map Item can contains number of details. Each detail has following properties:

PropertyRequiredTypeDefaultDescription
NameYesString-Name of Detail. Can contains up to 255 symbols.
TypeYesString-Type of Detail. Must be equals to one of type.
ValueYesString-Value of Detail.

JSON-based request example:

{
     "DivisionId": 1,
     "Name": "Map Item 7",
     "Latitude": 1.0,
     "Longitude": 1.0,
     "IconUrl": "http://url.com",
     "MapItemDetails": [
       {
         "Name": "Name",
         "Type": "String",
         "Value": "Value"
       }
     ],
     "MapItemActions": [
       {
         "Name": "Name",
         "ActionUrl": "http://action.com",
         "HttpMethod": "Get",
         "HttpBody": "",
         "BasicAuthUserName": null,
         "BasicAuthPassword": null,
         "RestCall": false,
         "IsInput": false
       }
     ]
   }