UdaraKita Go to kualitasudara.org

Location

Objek lokasi stasiun pantau.

Nearest

Menampilkan daftar stasiun pantau terdekat dari posisi (lat, lng) yang diberikan.

GET
/location/nearest/lat/lng/radius
https://kualitasudara.org/api/v1/location/nearest/-6.270146/106.830216/8?key=API_KEY_ANDA
PARAMETERS:
Field Type Descriptions
lat Float Required
Latitude dari posisi.
lng Float Required
Longitude posisi.
radius Integer Optional
Radius dalam KM sejauh mana stasiun pantau akan ditampilkan.
Jika radius tidak diisi maka nilai awal radius yang akan digunakan.
Nilai awal radius adalah 10KM.
RESPONSE:
{
    status: 200,
    __meta: {
        count_all: 18,
        limit: 12,
        page_count: 2
    },
    results: [
        {
            id: "14",
            photo: "http://india.dev/resources/uploads/thumb/_270x270_antasari.jpg",
            location_name: "Antasari",
            distance: "3",
            temperature: 0,
            data_pm2_5: "54",
            aqi_us: "147",
            aqi_level: "unhealthy_for_sensitive_groups",
            aqi_level_label: "Tidak Sehat",
            aqi_level_label_2: "Untuk Grup Sensitif"
        },
        {
            id: "26",
            photo: "http://india.dev/resources/uploads/thumb/_270x270_kebagusan.jpg",
            location_name: "Kebagusan, Jaksel",
            distance: "3",
            temperature: 0,
            data_pm2_5: "43",
            aqi_us: "119",
            aqi_level: "unhealthy_for_sensitive_groups",
            aqi_level_label: "Tidak Sehat",
            aqi_level_label_2: "Untuk Grup Sensitif"
        },
        {
            id: "8",
            photo: "http://india.dev/resources/uploads/thumb/_270x270_CIlandak.jpg",
            location_name: "Cilandak",
            distance: "5",
            temperature: 0,
            data_pm2_5: "141",
            aqi_us: "195",
            aqi_level: "unhealthy",
            aqi_level_label: "Tidak Sehat"
        },
        {
            id: "2",
            photo: "http://india.dev/resources/uploads/thumb/_270x270_gandul.jpg",
            location_name: "Jl Raya Krukut, Depok",
            distance: "9",
            temperature: 0,
            data_pm2_5: "151",
            aqi_us: "202",
            aqi_level: "very_unhealthy",
            aqi_level_label: "Sangat Tidak Sehat"
        },
        {
            id: "12",
            photo: "http://india.dev/resources/uploads/thumb/_270x270_utan_kayu.jpg",
            location_name: "Utan Kayu",
            distance: "9",
            temperature: 0,
            data_pm2_5: "17",
            aqi_us: "61",
            aqi_level: "moderate",
            aqi_level_label: "Sedang"
        }
    ],
    last_id: "12",
    next_url: "http://india.dev/api/v1/location/nearest/-6.270146/106.830216/10?last_id=12"
}

Location Detail

Menampilkan data detail dari lokasi pantau.

GET
/location/detail/location_id
https://kualitasudara.org/api/v1/location/detail/21?key=API_KEY_ANDA
PARAMETERS:
Field Type Descriptions
location_id Integer Required
ID dari lokasi yang ingin ditampilkan data detail nya.
RESPONSE:
{
    status: 200,
    __meta: {
        count_all: 1,
        limit: 12,
        page_count: 1
    },
    results: [
        {
            id: "14",
            photo: "http://india.dev/resources/uploads/thumb/_270x270_antasari.jpg",
            location_name: "Antasari",
            city: "25824",
            last_updated: "1485313162",
            lat: "-6.2612223625183105",
            lng: "106.80870056152344",
            city_name: "Jakarta Pusat",
            temperature: 21,
            data_wind_deg: "235.003",
            data_humidity: "88",
            data_pm2_5: "54",
            data_pm10: "65",
            data_last_update: "1485452447",
            data_last_udapted_ymd: "2017/01/27 00:40:47",
            aqi_us: "147",
            aqi_level: "unhealthy_for_sensitive_groups",
            aqi_level_label: "Tidak Sehat",
            aqi_level_label_2: "Untuk Grup Sensitif"
        }
    ],
    last_id: "14"
}