Skip to main content
GET
/
v1
/
mgm-stations
/
by
/
id
/
{stationId}
Find Single Station By ID
curl --request GET \
  --url https://risk-api.tarla.io/v1/mgm-stations/by/id/{stationId}
import requests

url = "https://risk-api.tarla.io/v1/mgm-stations/by/id/{stationId}"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://risk-api.tarla.io/v1/mgm-stations/by/id/{stationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://risk-api.tarla.io/v1/mgm-stations/by/id/{stationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://risk-api.tarla.io/v1/mgm-stations/by/id/{stationId}"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://risk-api.tarla.io/v1/mgm-stations/by/id/{stationId}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://risk-api.tarla.io/v1/mgm-stations/by/id/{stationId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "stationId": 123,
  "stationName": "<string>",
  "latitude": 123,
  "longitude": 123,
  "city": "<string>",
  "district": "<string>"
}
{
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"error": "<string>",
"message": "<string>",
"messages": [
"<string>"
],
"path": "<string>"
}
{
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"error": "<string>",
"message": "<string>",
"messages": [
"<string>"
],
"path": "<string>"
}
{
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"error": "<string>",
"message": "<string>",
"messages": [
"<string>"
],
"path": "<string>"
}

Path Parameters

stationId
integer<int32>
required

Response

Success

Represents a weather station with its location and name

stationId
integer<int32>

Unique identifier of the weather station

stationName
string

Name of the weather station

latitude
number<double>

Latitude coordinate of the station

longitude
number<double>

Longitude coordinate of the station

city
string

City where the station is located

district
string

District where the station is located