> ## 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.

# Find Paged Data Logs



## OpenAPI

````yaml en/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 Stations Data API
    description: >-
      This web service provides daily precipitation sum, maximum and minimum
      weather temperatures, and minimum ground surface temperature values from
      MGM
paths:
  /v1/mgm-stations/get-data-logs:
    post:
      tags:
        - MGM Stations Data API
      summary: Find Paged Data Logs
      operationId: getDataLogPage
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataLogRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataLogPageResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorResponse'
components:
  schemas:
    DataLogRequest:
      type: object
      properties:
        pageNumber:
          type: integer
          format: int32
          description: Page number being requested (first page starts with zero)
          minimum: 0
        pageSize:
          type: integer
          format: int32
          description: Size of the records in response page
          maximum: 2000
          minimum: 0
        stationIds:
          type: array
          description: >-
            The array of IDs of stations to be queried (if not sent with the
            request, all stations are included in the query)
          items:
            type: integer
            format: int32
        metrics:
          type: array
          description: The type of metric to be requested from stations
          items:
            type: string
            enum:
              - PRECIPITATION_SUM
              - TEMPERATURE_GROUND_SURFACE_MIN
              - TEMPERATURE_MIN
              - TEMPERATURE_MAX
          minItems: 1
        startDate:
          type: string
          format: date
          description: The start date of the query (this date and after)
        endDate:
          type: string
          format: date
          description: The end date of the query (this date and before)
      required:
        - endDate
        - metrics
        - startDate
    DataLogPageResponse:
      type: object
      description: Paged response structure for data logs
      properties:
        totalRecords:
          type: integer
          format: int64
          description: Total number of available records
        totalPages:
          type: integer
          format: int32
          description: Total number of pages
        currentPage:
          type: integer
          format: int32
          description: Current page index in pagination
        pageSize:
          type: integer
          format: int32
          description: Number of records per page
        stations:
          type: array
          description: List of stations included in this response
          items:
            $ref: '#/components/schemas/Station'
        dataLogs:
          type: array
          description: List of data logs in this page
          items:
            $ref: '#/components/schemas/DataLog'
    StandardErrorResponse:
      type: object
      description: Standard API error response structure
      properties:
        timestamp:
          type: string
          format: date-time
          description: Timestamp when the error occurred
        status:
          type: integer
          format: int32
          description: HTTP status code
        error:
          type: string
          description: Error name or type
        message:
          type: string
          description: Main error message
        messages:
          type: array
          description: Additional detailed error messages
          items:
            type: string
        path:
          type: string
          description: Request path that caused the error
    Station:
      type: object
      description: Represents a weather station with its location and name
      properties:
        stationId:
          type: integer
          format: int32
          description: Unique identifier of the weather station
        stationName:
          type: string
          description: Name of the weather station
        latitude:
          type: number
          format: double
          description: Latitude coordinate of the station
        longitude:
          type: number
          format: double
          description: Longitude coordinate of the station
        city:
          type: string
          description: City where the station is located
        district:
          type: string
          description: District where the station is located
    DataLog:
      type: object
      description: Represents a single daily log entry for station data
      properties:
        day:
          type: string
          format: date
          description: The date of the data log entry
        stationId:
          type: integer
          format: int32
          description: Unique ID of the station
        lastUpdated:
          type: string
          format: date-time
          description: Timestamp when this log was last updated
        stationData:
          type: array
          description: List of metric-value pairs for this station
          items:
            $ref: '#/components/schemas/StationData'
    StationData:
      type: object
      description: Represents a single metric data entry of a station
      properties:
        metric:
          type: string
          description: Type of the recorded metric (e.g., temperature, precipitation)
          enum:
            - PRECIPITATION_SUM
            - TEMPERATURE_GROUND_SURFACE_MIN
            - TEMPERATURE_MIN
            - TEMPERATURE_MAX
        observation:
          type: string
          format: date-time
          description: Observation timestamp of the metric
        value:
          type: number
          format: double
          description: Measured value for the metric

````