Get Station Location Data

Request Parameter

Parameter

Description

Mandatory

id

Station ID.

This parameter can be repeated any number of times per request to obtain location data about multiple stations at a time.

yes

 

Request Example

https://192.168.1.1:9081/api/stations/geo.ds?id=1001&id=1002

XML and JSON response structure examples are described below.

 

XML Response Structure

<drweb-es-api api_version="4.3.0" timestamp="1582030329" server="192.168.1.1" srv_version="12.00.0.201909260" status="true">
  <stations total="2">
     <station id="1001" name="Station01">
        <longitude>38898556</longitude>

        <latitude>1077037852</latitude>

        <country>RU</country>

        <province>Test_region</province>

        <city>Test_town</city>

        <street>Test_avenue</street>
     </station>

     <station id="1002" name="Station02">
        <longitude>38898555</longitude>

        <latitude>1077037852</latitude>

        <country>RU</country>

        <province>Test_region</province>

        <city>Test_town</city>

        <street>Test_avenue2</street>
     </station>
  </stations>
</drweb-es-api>

 

Description of XML Response Parameters

The <stations /> element contains location data of all stations specified in the request.

The <stations /> element attribute:

Attribute

Description

total

Total number of stations in a response

The <station /> element contains parameters of a specific station.

The <station /> element attributes:

Attribute

Description

id

Station ID

name

Station name

Nested elements of the <station /> element contain location parameters of a station:

Element

Description

<longitude />

Longitude

<latitude />

Latitude

<country />

Country

<province />

Province

<city />

City

<street />

Street

 

JSON Response Structure

{ "head": {
    "status": true,

    "timestamp": 1582030586,

    "api": {
      "version": 40300,
      "versionString": 4.3.0},

    "server": {
      "name": "192.168.1.1",

      "version": "12.00.0.201909260",
      "uuid": "eae1a652-96d5-48fd-9169-4788a03688b8"}},

"data": {
    "total": 2,

    "list": [
      {"city": "Test_town",

      "country": "RU",

      "id": "1001",

      "latitude": 1077037852,

      "longitude": 38898556,

      "name": "Station01",

      "province": "Test_region",
      "street": "Test_avenue"},

      {"city": "Test_town",

      "country": "RU",

      "id": "1002",

      "latitude": 1077037852,

      "longitude": 38898555,

      "name": "Station02",

      "province": "Test_region",
      "street": "Test_avenue2"}]}}

 

Description of JSON Response Parameters

The data block contains location data of all stations specified in the request.

The data block elements:

Field name

Description

total

Total number of stations in a response

list

Array of location parameters for each station

Each object of the list array contains location parameters of a specific station.

Elements in the list array:

Field name

Description

city

City

country

Country

id

Station ID

latitude

Latitude

longitude

Longitude

name

Station name

province

Province

street

Street