> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.tarla.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Sayfalı Olarak Veri Günlüklerini Bul



## OpenAPI

````yaml tr/open-api/mgm-stations-v1.json post /v1/mgm-stations/get-data-logs
openapi: 3.1.0
info:
  title: OpenAPI definition
  version: v0
servers:
  - url: https://risk-api.tarla.io
    description: Production server
  - url: https://risk-api-test.tarla.io
    description: Test server
security: []
tags:
  - name: MGM İstasyon Verileri API'si
    description: >-
      MGMden günlük toplam yağış miktarı, en yüksek ve en düşük hava
      sıcaklıkları ile en düşük toprak üstü sıcaklık değerinin sorgulandığı web
      servisidir
paths:
  /v1/mgm-stations/get-data-logs:
    post:
      tags:
        - MGM İstasyon Verileri API'si
      summary: Sayfalı Olarak Veri Günlüklerini Bul
      operationId: getDataLogPage
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataLogRequest'
        required: true
      responses:
        '200':
          description: Başarılı
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataLogPageResponse'
        '400':
          description: Hatalı İstek
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '401':
          description: Yetkisiz
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '403':
          description: Yasak
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
components:
  schemas:
    DataLogRequest:
      type: object
      properties:
        pageNumber:
          type: integer
          format: int32
          description: Sorgulanan sayfa numarası (ilk sayfa sıfırdan başlar)
          minimum: 0
        pageSize:
          type: integer
          format: int32
          description: Cevap sayfasındaki kayıtların boyutu
          maximum: 2000
          minimum: 0
        stationIds:
          type: array
          description: >-
            Sorgulanacak istasyonların IDlerinin dizisi (istekle gönderilmezse
            tüm istasyonlar sorguya dahil edilir)
          items:
            type: integer
            format: int32
        metrics:
          type: array
          description: İstasyonlardan sorgulanacak metrik tipi
          items:
            type: string
            enum:
              - PRECIPITATION_SUM
              - TEMPERATURE_GROUND_SURFACE_MIN
              - TEMPERATURE_MIN
              - TEMPERATURE_MAX
          minItems: 1
        startDate:
          type: string
          format: date
          description: Sorgunun başlangıç tarihi (bu tarih ve sonrası)
        endDate:
          type: string
          format: date
          description: Sorgunun bitiş tarihi (bu tarih ve öncesi)
      required:
        - endDate
        - metrics
        - startDate
    DataLogPageResponse:
      type: object
      description: Veri günlükleri için sayfalı cevap yapısı
      properties:
        totalRecords:
          type: integer
          format: int64
          description: Toplam mevcut kayıt sayısı
        totalPages:
          type: integer
          format: int32
          description: Toplam sayfa sayısı
        currentPage:
          type: integer
          format: int32
          description: Sayfalandırmada mevcut sayfa numarası
        pageSize:
          type: integer
          format: int32
          description: Sayfa başına düşen kayıt sayısı
        stations:
          type: array
          description: Bu cevapta yer alan istasyonların listesi
          items:
            $ref: '#/components/schemas/Station'
        dataLogs:
          type: array
          description: Bu sayfada yer alan veri günlüklerinin listesi
          items:
            $ref: '#/components/schemas/DataLog'
    StandardErrorResponse:
      type: object
      description: Standart API hata cevabı yapısı
      properties:
        timestamp:
          type: string
          format: date-time
          description: Hatanın oluştuğu zaman damgası
        status:
          type: integer
          format: int32
          description: HTTP durum kodu
        error:
          type: string
          description: Hata adı veya tipi
        message:
          type: string
          description: Ana hata mesajı
        messages:
          type: array
          description: Ek detaylı hata mesajları
          items:
            type: string
        path:
          type: string
          description: Hatanın oluştuğu istek yolu
    Station:
      type: object
      description: Konumu ve adıyla bir hava istasyonunu temsil eder
      properties:
        stationId:
          type: integer
          format: int32
          description: Hava istasyonunun benzersiz kimliği
        stationName:
          type: string
          description: Hava istasyonunun adı
        latitude:
          type: number
          format: double
          description: İstasyonun enlem koordinatı
        longitude:
          type: number
          format: double
          description: İstasyonun boylam koordinatı
        city:
          type: string
          description: İstasyonun bulunduğu il
        district:
          type: string
          description: İstasyonun bulunduğu ilçe
    DataLog:
      type: object
      description: İstasyon verilerine ait tek bir günlük kayıt nesnesi
      properties:
        day:
          type: string
          format: date
          description: Veri kaydının ait olduğu tarih
        stationId:
          type: integer
          format: int32
          description: İstasyonun benzersiz kimliği
        lastUpdated:
          type: string
          format: date-time
          description: Bu kaydın en son güncellendiği zaman
        stationData:
          type: array
          description: Bu istasyona ait metrik-değer çiftlerinin listesi
          items:
            $ref: '#/components/schemas/StationData'
    StationData:
      type: object
      description: Bir istasyonun tek bir metrik veri kaydını temsil eder
      properties:
        metric:
          type: string
          description: Kaydedilen metrik türü (ör. sıcaklık, yağış)
          enum:
            - PRECIPITATION_SUM
            - TEMPERATURE_GROUND_SURFACE_MIN
            - TEMPERATURE_MIN
            - TEMPERATURE_MAX
        observation:
          type: string
          format: date-time
          description: Metrik ölçümünün yapıldığı zaman
        value:
          type: number
          format: double
          description: Metrik için ölçülen değer

````