Ana içeriğe atla
GET
/
v1
/
alarms
/
geometries
/
city
/
{cityId}
Şehir detayını getir
curl --request GET \
  --url https://api.iklim.co/v1/alarms/geometries/city/{cityId}
import requests

url = "https://api.iklim.co/v1/alarms/geometries/city/{cityId}"

response = requests.get(url)

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

fetch('https://api.iklim.co/v1/alarms/geometries/city/{cityId}', 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://api.iklim.co/v1/alarms/geometries/city/{cityId}",
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://api.iklim.co/v1/alarms/geometries/city/{cityId}"

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://api.iklim.co/v1/alarms/geometries/city/{cityId}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.iklim.co/v1/alarms/geometries/city/{cityId}")

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
{
  "id": 6,
  "name": "Ankara",
  "licensePlateCode": 6,
  "polygon": {
    "exterior": [
      {
        "lng": 32.85,
        "lat": 39.93
      },
      {
        "lng": 32.86,
        "lat": 39.93
      },
      {
        "lng": 32.86,
        "lat": 39.94
      },
      {
        "lng": 32.85,
        "lat": 39.94
      },
      {
        "lng": 32.85,
        "lat": 39.93
      }
    ],
    "holes": [
      [
        {
          "lng": 32.852,
          "lat": 39.932
        },
        {
          "lng": 32.853,
          "lat": 39.932
        },
        {
          "lng": 32.853,
          "lat": 39.933
        },
        {
          "lng": 32.852,
          "lat": 39.933
        },
        {
          "lng": 32.852,
          "lat": 39.932
        }
      ]
    ]
  }
}
{
"timestamp": "YYYY-mm-DDTHH:MM:SS.nnnnnnnnn",
"status": "XXX",
"error": "Error Name",
"message": "Error Message",
"path": "/endpoint/uri/here",
"messages": [
"<string>"
]
}
{
"timestamp": "YYYY-mm-DDTHH:MM:SS.nnnnnnnnn",
"status": "XXX",
"error": "Error Name",
"message": "Error Message",
"path": "/endpoint/uri/here",
"messages": [
"<string>"
]
}
{
"timestamp": "YYYY-mm-DDTHH:MM:SS.nnnnnnnnn",
"status": "XXX",
"error": "Error Name",
"message": "Error Message",
"path": "/endpoint/uri/here",
"messages": [
"<string>"
]
}
{
"timestamp": "YYYY-mm-DDTHH:MM:SS.nnnnnnnnn",
"status": "XXX",
"error": "Error Name",
"message": "Error Message",
"path": "/endpoint/uri/here",
"messages": [
"<string>"
]
}

Yol Parametreleri

cityId
integer<int64>
gerekli

Şehir ID

Yanıt

İşlem başarılı

swagger.schema.boundary.city

id
integer<int64>

Şehir ID

Örnek:

6

name
string

Şehir adı

Örnek:

"Ankara"

licensePlateCode
integer<int32>

Plaka kodu

Örnek:

6

polygon
object

Coğrafi poligonu