Versions

Saving Location Version

GET SERVER_URL/versions/save?userHash={userHash}&locationId={locationId}}

Enables you to save the changes made to the current location version.

Request Parameters

Parameter Value
{userHash}

hash of the registered user

0000-0000-0000-0000 - for maps with the public_location flag

{locationId} ID of the location for which you want to create and save a new version

JSON Request Example

1
2
3
4
    {
       "userHash": "13DD-C7F8-5F7C-B28F",
       "locationId": "2120"
    }

JSON Response Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
{
   "response": "ok", // Reports the request status
   "locations": [ // Lists (in the subsequent lines) all locations owned by the currently selected user.
     {
       "title": "1243", // Name of the location.
       "lat": "0.000000000000", // This one and subsequent ones represent the location's GPS coordinates.
       "long": "0.000000000000"
     },
     {
       "title": "lll",
       "lat": "0.000000000000",
       "long": "0.000000000000"
     }
   ]
}

Restore the Latest Version

GET SERVER_URL/versions/undo?userHash={userHash}&locationId={location_id}

Enables you to roll back all the changes and restore the latest available version of the location.

Request Parameters

Parameter Value
{userHash}

hash of the registered user

0000-0000-0000-0000 - for maps with the public_location flag

{locationId} ID of the location for which you want to roll back the changes

JSON Request Example

1
2
3
4
    {
       "userHash": "13DD-C7F8-5F7C-B28F",
       "locationId": "2120"
    }

JSON Response Example

In response you get a JSON that contains information about the location.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
{
  "response": "ok", // Reports the request status
  "locations": [ // Lists (in the subsequent lines) all locations owned by the currently selected user.
    {
      "title": "1243", // Name of the location.
      "lat": "0.000000000000", // This one and subsequent ones represent the location's GPS coordinates.
      "long": "0.000000000000"
    },
    {
      "title": "lll",
      "lat": "0.000000000000",
      "long": "0.000000000000"
    }
  ]
}

Creating New Location Version

GET SERVER_URL/versions/setLast?userHash={userHash}&locationId={location_id}&versionId={version_id}
Enables you to create and save a new version of the location.
This request performs an equal action as the Use as last action button in the Navigine CMS. The new version is created using an archive of the version specified with {version_id}.

Request Parameters

Parameter Value
{userHash}

hash of the registered user

0000-0000-0000-0000 - for maps with the public_location flag

{locationId} ID of the location for which you want create new version
{versionId} ID of the location version used as a base for the new location version

JSON Request Example

1
2
3
4
5
    {
       "userHash": "13DD-C7F8-5F7C-B28F",
       "locationId": "2120",
       "versionId": "3051"
    }

JSON Response Example

1
2
3
4
{
   "response": "ok",
   "msg": "Version #__ created!"
}

Get Version Archive

GET SERVER_URL/versions/download?userHash={userHash}&locationId={location_id}&versionId={version_id}

Enables you to download the version in form of an archive.

Request Parameters

Parameter Value
{userHash}

hash of the registered user

0000-0000-0000-0000 - for maps with the public_location flag

{locationId} ID of the location which archive you want to download
{versionId} ID of the location version used as a base for the new location version

JSON Request Example

1
2
3
4
5
    {
       "userHash": "13DD-C7F8-5F7C-B28F",
       "locationId": "2120",
       "versionId": "3051"
    }

Response

Version archive file download begins in response to the downloads request.