Macrometa Logs API

The Logs API from Macrometa — 2 operation(s) for logs.

OpenAPI Specification

macrometa-logs-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Macrometa API Reference Activity Metrics Logs API
  version: 0.17.17
  description: API reference for the Macrometa Global Data Network.
  license:
    name: Macrometa License, Version 2.0
servers:
- url: https://api-play.paas.macrometa.io
  description: GDN API
host: api-play.paas.macrometa.io
security:
- ApiKeyAuth: []
- BearerAuth: []
tags:
- name: Logs
paths:
  /api/faas/v1/logs:
    get:
      tags:
      - Logs
      summary: Retrieve the function logs
      description: Retrieve the function logs in the specified period. If no period is specified it will return the last hour logs.
      operationId: handle_mm_logs
      parameters:
      - name: start
        in: query
        description: 'The start of the period requested. Example: "2024-01-01T00:00:00".'
        required: false
        schema:
          type: string
        allowReserved: true
      - name: end
        in: query
        description: 'The end of the period requested. Example: "2024-01-02T00:00:00".'
        required: false
        schema:
          type: string
        allowReserved: true
      - name: lines
        in: query
        description: 'The number of logs. Example: "100".'
        required: false
        schema:
          type: string
        allowReserved: true
      - name: asc
        in: query
        description: 'The sort logs by time. Example: "true".'
        required: false
        schema:
          type: string
        allowReserved: true
      - name: region
        in: query
        description: 'The region of logs. Example: "us-west".'
        required: false
        schema:
          type: string
        allowReserved: true
      - name: instance
        in: query
        description: 'The region of logs. Example: "13638401-f561-4742-9d2e-7aeebf2243ad".'
        required: false
        schema:
          type: string
        allowReserved: true
      - name: functionName
        in: query
        description: 'The function name. Example: "periods".'
        required: false
        schema:
          type: string
        allowReserved: true
      - name: functionVersion
        in: query
        description: 'The function version. Example: "0.0.1".'
        required: false
        schema:
          type: string
        allowReserved: true
      - name: level
        in: query
        description: 'The level of logs. Example: "ERROR".'
        required: false
        schema:
          type: string
        allowReserved: true
      - name: executionId
        in: query
        description: 'The execution id. Example: "664d1ecc-58158f1a".'
        required: false
        schema:
          type: string
        allowReserved: true
      responses:
        '200':
          description: Successfully retrieved the logs.
        '500':
          description: Internal server error.
        '503':
          description: Service unavailable.
      security:
      - apikey: []
  /api/vwr/v1/log/level:
    get:
      summary: Get the current log level
      tags:
      - Logs
      description: 'Gets the current log level of the service.


        This API requires _admin_ permissions to run.

        '
      operationId: getLogLevel
      security:
      - APIKeyAuth: []
      responses:
        '200':
          description: Successfully fetched the log level of the service.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogLevel'
        '401':
          description: Authorization failure due to invalid authentication credentials.
        '403':
          description: Either the API key doesn't have permissions or it is deactivated.
        '500':
          description: Internal server error.
    put:
      summary: Set the log level
      tags:
      - Logs
      description: 'Sets the current log level of the service.


        Valid values are ''DEBUG'', ''INFO'', ''WARNING'', and ''ERROR''.


        This API requires _admin_ permissions to run.

        '
      operationId: setLogLevel
      security:
      - APIKeyAuth: []
      responses:
        '200':
          description: Successfully set the log level of the service.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogLevel'
        '401':
          description: Authorization failure due to invalid authentication credentials.
        '403':
          description: Either the API key doesn't have permissions or it is deactivated.
        '500':
          description: Internal server error.
components:
  schemas:
    LogLevel:
      type: object
      properties:
        level:
          type: string
          description: The log level of the service.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Provide an API Key to the `Authorization` header, prefixed with "apikey".


        Example: `Authorization: apikey <key>`'
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Provide a JSON Web Token (JWT) to the `Authorization` header, prefixed with "bearer".


        Example: `Authorization: bearer <jwt>`'