{
  "openapi": "3.0.3",
  "info": {
    "title": "openobserve",
    "description": "OpenObserve API documents [https://openobserve.ai/docs/](https://openobserve.ai/docs/)",
    "contact": {
      "name": "OpenObserve",
      "url": "https://openobserve.ai/",
      "email": "hello@zinclabs.io"
    },
    "license": {
      "name": "Apache-2.0"
    },
    "version": "0.5.0"
  },
  "paths": {
    "/api/{org_id}/_bulk": {
      "post": {
        "tags": [
          "Logs"
        ],
        "summary": "_bulk ES compatible ingestion API",
        "description": "_bulk ES compatible ingestion API",
        "operationId": "LogsIngestionBulk",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Ingest data (ndjson)",
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkResponse"
                },
                "example": {
                  "errors": true,
                  "items": [
                    {
                      "index": {
                        "_id": 1,
                        "_index": "olympics",
                        "error": {
                          "index": "olympics",
                          "index_uuid": "1",
                          "reason": "Too old data, only last 5 hours data can be ingested. Data discarded.",
                          "shard": "1",
                          "type": "Too old data, only last 5 hours data can be ingested. Data discarded."
                        },
                        "original_record": {
                          "athlete": "CHASAPIS, Spiridon",
                          "city": "BER",
                          "country": "USA",
                          "discipline": "Swimming",
                          "event": "100M Freestyle For Sailors",
                          "gender": "Men",
                          "medal": "Silver",
                          "onemore": 1,
                          "season": "summer",
                          "sport": "Aquatics",
                          "year": 1986
                        },
                        "status": 200
                      }
                    }
                  ],
                  "took": 2
                }
              }
            }
          },
          "500": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/_search": {
      "post": {
        "tags": [
          "Search"
        ],
        "summary": "SearchStreamData",
        "description": "SearchStreamData",
        "operationId": "SearchSQL",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Search query",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              },
              "example": {
                "aggs": {
                  "histogram": "select histogram(_timestamp, '30 second') AS zo_sql_key, count(*) AS zo_sql_num from query GROUP BY zo_sql_key ORDER BY zo_sql_key"
                },
                "query": {
                  "end_time": 1675185660872049,
                  "from": 0,
                  "size": 10,
                  "sql": "select * from k8s ",
                  "start_time": 1675182660872049
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                },
                "example": {
                  "aggs": {
                    "agg1": [
                      {
                        "key": "2023-01-15 14:00:00",
                        "num": 345940
                      },
                      {
                        "key": "2023-01-15 19:00:00",
                        "num": 384026
                      }
                    ]
                  },
                  "from": 0,
                  "hits": [
                    {
                      "_p": "F",
                      "_timestamp": 1674213225158000,
                      "kubernetes": {
                        "container_hash": "dkr.ecr.us-west-2.amazonaws.com/openobserve@sha256:3dbbb0dc1eab2d5a3b3e4a75fd87d194e8095c92d7b2b62e7cdbd07020f54589",
                        "container_image": "dkr.ecr.us-west-2.amazonaws.com/openobserve:v0.0.3",
                        "container_name": "openobserve",
                        "docker_id": "eb0983bdb9ff9360d227e6a0b268fe3b24a0868c2c2d725a1516c11e88bf5789",
                        "host": "ip.us-east-2.compute.internal",
                        "namespace_name": "openobserve",
                        "pod_id": "35a0421f-9203-4d73-9663-9ff0ce26d409",
                        "pod_name": "openobserve-ingester-0"
                      },
                      "log": "[2023-01-20T11:13:45Z INFO  actix_web::middleware::logger] 10.2.80.192 \"POST /api/demo/_bulk HTTP/1.1\" 200 68",
                      "stream": "stderr"
                    }
                  ],
                  "scan_size": 28943,
                  "size": 1,
                  "took": 155,
                  "total": 27179431
                }
              }
            }
          },
          "400": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "500": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/alerts": {
      "get": {
        "tags": [
          "Alerts"
        ],
        "summary": "ListAlerts",
        "description": "ListAlerts",
        "operationId": "ListAlerts",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertList"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/alerts/destinations": {
      "get": {
        "tags": [
          "Alerts"
        ],
        "summary": "ListDestinations",
        "description": "ListDestinations",
        "operationId": "ListDestinations",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AlertDestinationResponse"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/alerts/destinations/{destination_name}": {
      "get": {
        "tags": [
          "Alerts"
        ],
        "summary": "GetDestination",
        "description": "GetDestination",
        "operationId": "GetDestination",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "destination_name",
            "in": "path",
            "description": "Destination name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertDestinationResponse"
                }
              }
            }
          },
          "404": {
            "description": "NotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Alerts"
        ],
        "summary": "CreateDestination",
        "description": "CreateDestination",
        "operationId": "CreateDestination",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "destination_name",
            "in": "path",
            "description": "Destination name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Destination data",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertDestination"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Alerts"
        ],
        "summary": "DeleteDestination",
        "description": "DeleteDestination",
        "operationId": "DeleteAlertDestination",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "destination_name",
            "in": "path",
            "description": "Destination name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "404": {
            "description": "NotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/alerts/templates": {
      "get": {
        "tags": [
          "Alerts"
        ],
        "summary": "ListTemplates",
        "description": "ListTemplates",
        "operationId": "ListTemplates",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DestinationTemplate"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/alerts/templates/{template_name}": {
      "get": {
        "tags": [
          "Alerts"
        ],
        "summary": "GetTemplateByName",
        "description": "GetTemplateByName",
        "operationId": "GetTemplate",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "template_name",
            "in": "path",
            "description": "Template name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationTemplate"
                }
              }
            }
          },
          "404": {
            "description": "NotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Alerts"
        ],
        "summary": "CreateTemplate",
        "description": "CreateTemplate",
        "operationId": "CreateTemplate",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "template_name",
            "in": "path",
            "description": "Template name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Template data",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DestinationTemplate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Alerts"
        ],
        "summary": "DeleteTemplate",
        "description": "DeleteTemplate",
        "operationId": "DeleteAlertTemplate",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "template_name",
            "in": "path",
            "description": "Template name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "404": {
            "description": "NotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/dashboards": {
      "get": {
        "tags": [
          "Dashboards"
        ],
        "summary": "ListDashboards",
        "description": "ListDashboards",
        "operationId": "ListDashboards",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dashboards"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Dashboards"
        ],
        "summary": "CreateDashboard",
        "description": "CreateDashboard",
        "operationId": "CreateDashboard",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Dashboard details",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Dashboard"
              },
              "example": {
                "description": "Traffic patterns and network performance of the infrastructure",
                "title": "Network Traffic Overview"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Dashboard created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dashboard"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/dashboards/{dashboard_id}": {
      "get": {
        "tags": [
          "Dashboards"
        ],
        "summary": "GetDashboard",
        "description": "GetDashboard",
        "operationId": "GetDashboard",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dashboard_id",
            "in": "path",
            "description": "Dashboard ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dashboard"
                }
              }
            }
          },
          "404": {
            "description": "Dashboard not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "put": {
        "tags": [
          "Dashboards"
        ],
        "summary": "UpdateDashboard",
        "description": "UpdateDashboard",
        "operationId": "UpdateDashboard",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dashboard_id",
            "in": "path",
            "description": "Dashboard ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Dashboard details",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Dashboard"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Dashboard updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "404": {
            "description": "Dashboard not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "500": {
            "description": "Failed to update the dashboard",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Dashboards"
        ],
        "summary": "DeleteDashboard",
        "description": "DeleteDashboard",
        "operationId": "DeleteDashboard",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dashboard_id",
            "in": "path",
            "description": "Dashboard ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Dashboard deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "404": {
            "description": "Dashboard not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/enrichment_tables/{table_name}": {
      "post": {
        "tags": [
          "Functions"
        ],
        "summary": "CreateEnrichmentTable",
        "description": "CreateEnrichmentTable",
        "operationId": "CreateEnrichmentTable",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "table_name",
            "in": "path",
            "description": "Table name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Saved enrichment table",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/functions": {
      "get": {
        "tags": [
          "Functions"
        ],
        "summary": "ListFunctions",
        "description": "ListFunctions",
        "operationId": "listFunctions",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FunctionList"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Functions"
        ],
        "summary": "CreateFunction",
        "description": "CreateFunction",
        "operationId": "createFunction",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Function data",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Transform"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "400": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/functions/{name}": {
      "put": {
        "tags": [
          "Functions"
        ],
        "summary": "UpdateFunction",
        "description": "UpdateFunction",
        "operationId": "updateFunction",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Function name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Function data",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Transform"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "400": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Functions"
        ],
        "summary": "DeleteFunction",
        "description": "DeleteFunction",
        "operationId": "deleteFunction",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Function name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "404": {
            "description": "NotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/ingest/metrics/_json": {
      "post": {
        "tags": [
          "Metrics"
        ],
        "summary": "_json ingestion API",
        "description": "_json ingestion API",
        "operationId": "MetricsIngestionJson",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Ingest data (json array)",
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              },
              "example": [
                {
                  "__name__": "metrics stream name",
                  "__type__": "counter / gauge / histogram / summary",
                  "_timestamp": 1687175143,
                  "label_name1": "label_value1",
                  "label_name2": "label_value2",
                  "value": 1.2
                }
              ]
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestionResponse"
                },
                "example": {
                  "code": 200,
                  "status": [
                    {
                      "failed": 0,
                      "name": "up",
                      "successful": 3
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/kv": {
      "get": {
        "tags": [
          "KV"
        ],
        "summary": "ListKeys",
        "description": "ListKeys",
        "operationId": "ListKVKeys",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prefix",
            "in": "query",
            "description": "Key prefix",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/kv/{key}": {
      "get": {
        "tags": [
          "KV"
        ],
        "summary": "GetValue",
        "description": "GetValue",
        "operationId": "GetKVValue",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "description": "Key name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "NotFound",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "KV"
        ],
        "summary": "SetValue",
        "description": "SetValue",
        "operationId": "SetKVValue",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "description": "Key name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Value of the key",
          "content": {
            "text/plain": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "KV"
        ],
        "summary": "RemoveValue",
        "description": "RemoveValue",
        "operationId": "RemoveKVValue",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "description": "Key name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "NotFound",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/organizations": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "GetOrganizations",
        "description": "GetOrganizations",
        "operationId": "GetUserOrganizations",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/organizations/passcode": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "GetIngestToken",
        "description": "GetIngestToken",
        "operationId": "GetOrganizationUserIngestToken",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasscodeResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "put": {
        "tags": [
          "Organizations"
        ],
        "summary": "UpdateIngestToken",
        "description": "UpdateIngestToken",
        "operationId": "UpdateOrganizationUserIngestToken",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasscodeResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/prometheus/api/v1/label/{label_name}/values": {
      "get": {
        "tags": [
          "Metrics"
        ],
        "summary": "prometheus query label values",
        "description": "prometheus query label values",
        "operationId": "PrometheusLabelValues",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "label_name",
            "in": "path",
            "description": "Label name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "match[]",
            "in": "query",
            "description": "Series selector argument that selects the series from which to read the label values",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "<rfc3339 | unix_timestamp>: Start timestamp",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "<rfc3339 | unix_timestamp>: End timestamp",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                },
                "example": {
                  "data": [
                    "node",
                    "prometheus"
                  ],
                  "status": "success"
                }
              }
            }
          },
          "500": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/prometheus/api/v1/labels": {
      "get": {
        "tags": [
          "Metrics"
        ],
        "summary": "prometheus getting label names",
        "description": "prometheus getting label names",
        "operationId": "PrometheusLabels",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "match[]",
            "in": "query",
            "description": "Series selector argument that selects the series from which to read the label names",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "<rfc3339 | unix_timestamp>: Start timestamp",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "<rfc3339 | unix_timestamp>: End timestamp",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                },
                "example": {
                  "data": [
                    "__name__",
                    "call",
                    "code",
                    "config",
                    "dialer_name",
                    "endpoint",
                    "event",
                    "goversion",
                    "handler",
                    "instance",
                    "interval",
                    "job",
                    "le",
                    "listener_name",
                    "name",
                    "quantile",
                    "reason",
                    "role",
                    "scrape_job",
                    "slice",
                    "version"
                  ],
                  "status": "success"
                }
              }
            }
          },
          "500": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/prometheus/api/v1/metadata": {
      "get": {
        "tags": [
          "Metrics"
        ],
        "summary": "prometheus query metric metadata",
        "description": "prometheus query metric metadata",
        "operationId": "PrometheusMetadata",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of metrics to return",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "metric",
            "in": "query",
            "description": "A metric name to filter metadata for. All metric metadata is retrieved if left empty",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                },
                "example": {
                  "data": {
                    "cortex_ring_tokens": [
                      {
                        "help": "Number of tokens in the ring",
                        "type": "gauge",
                        "unit": ""
                      }
                    ],
                    "http_requests_total": [
                      {
                        "help": "Number of HTTP requests",
                        "type": "counter",
                        "unit": ""
                      },
                      {
                        "help": "Amount of HTTP requests",
                        "type": "counter",
                        "unit": ""
                      }
                    ]
                  },
                  "status": "success"
                }
              }
            }
          },
          "500": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/prometheus/api/v1/query": {
      "get": {
        "tags": [
          "Metrics"
        ],
        "summary": "prometheus instant queries",
        "description": "prometheus instant queries",
        "operationId": "PrometheusQuery",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Prometheus expression query string",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time",
            "in": "query",
            "description": "<rfc3339 | unix_timestamp>: Evaluation timestamp. Optional",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "timeout",
            "in": "query",
            "description": "Evaluation timeout",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                },
                "example": {
                  "data": {
                    "result": [
                      {
                        "metric": {
                          "__name__": "up",
                          "instance": "localhost:9090",
                          "job": "prometheus"
                        },
                        "value": [
                          1435781451.781,
                          "1"
                        ]
                      },
                      {
                        "metric": {
                          "__name__": "up",
                          "instance": "localhost:9100",
                          "job": "node"
                        },
                        "value": [
                          1435781451.781,
                          "0"
                        ]
                      }
                    ],
                    "resultType": "vector"
                  },
                  "status": "success"
                }
              }
            }
          },
          "500": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/prometheus/api/v1/query_range": {
      "get": {
        "tags": [
          "Metrics"
        ],
        "summary": "prometheus range queries",
        "description": "prometheus range queries",
        "operationId": "PrometheusRangeQuery",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Prometheus expression query string",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "<rfc3339 | unix_timestamp>: Start timestamp, inclusive",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "<rfc3339 | unix_timestamp>: End timestamp, inclusive",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "step",
            "in": "query",
            "description": "Query resolution step width in duration format or float number of seconds",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "timeout",
            "in": "query",
            "description": "Evaluation timeout",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                },
                "example": {
                  "data": {
                    "result": [
                      {
                        "metric": {
                          "__name__": "up",
                          "instance": "localhost:9090",
                          "job": "prometheus"
                        },
                        "values": [
                          [
                            1435781430.781,
                            "1"
                          ],
                          [
                            1435781445.781,
                            "1"
                          ],
                          [
                            1435781460.781,
                            "1"
                          ]
                        ]
                      },
                      {
                        "metric": {
                          "__name__": "up",
                          "instance": "localhost:9091",
                          "job": "node"
                        },
                        "values": [
                          [
                            1435781430.781,
                            "0"
                          ],
                          [
                            1435781445.781,
                            "0"
                          ],
                          [
                            1435781460.781,
                            "1"
                          ]
                        ]
                      }
                    ],
                    "resultType": "matrix"
                  },
                  "status": "success"
                }
              }
            }
          },
          "500": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/prometheus/api/v1/series": {
      "get": {
        "tags": [
          "Metrics"
        ],
        "summary": "prometheus finding series by label matchers",
        "description": "prometheus finding series by label matchers",
        "operationId": "PrometheusSeries",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "match[]",
            "in": "query",
            "description": "<series_selector>: Series selector argument that selects the series to return",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "<rfc3339 | unix_timestamp>: Start timestamp",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "<rfc3339 | unix_timestamp>: End timestamp",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                },
                "example": {
                  "data": [
                    {
                      "__name__": "up",
                      "instance": "localhost:9090",
                      "job": "prometheus"
                    },
                    {
                      "__name__": "up",
                      "instance": "localhost:9091",
                      "job": "node"
                    },
                    {
                      "__name__": "process_start_time_seconds",
                      "instance": "localhost:9090",
                      "job": "prometheus"
                    }
                  ],
                  "status": "success"
                }
              }
            }
          },
          "500": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/prometheus/api/v1/write": {
      "post": {
        "tags": [
          "Metrics"
        ],
        "summary": "prometheus remote-write endpoint for metrics",
        "description": "prometheus remote-write endpoint for metrics",
        "operationId": "PrometheusRemoteWrite",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "prometheus WriteRequest",
          "content": {
            "application/x-protobuf": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestionResponse"
                },
                "example": {
                  "code": 200
                }
              }
            }
          },
          "500": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/streams": {
      "get": {
        "tags": [
          "Streams"
        ],
        "summary": "ListStreams",
        "description": "ListStreams",
        "operationId": "StreamList",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListStream"
                }
              }
            }
          },
          "400": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/summary": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "GetOrganizationSummary",
        "description": "GetOrganizationSummary",
        "operationId": "GetOrganizationSummary",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/syslog-routes": {
      "get": {
        "tags": [
          "Syslog Routes"
        ],
        "summary": "ListSyslogRoutes",
        "description": "ListSyslogRoutes",
        "operationId": "ListSyslogRoutes",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyslogRoutes"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Syslog Routes"
        ],
        "summary": "CreateSyslogRoute",
        "description": "CreateSyslogRoute",
        "operationId": "CreateSyslogRoute",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "SyslogRoute details",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyslogRoute"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Route created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyslogRoute"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/syslog-routes/{id}": {
      "put": {
        "tags": [
          "Syslog Routes"
        ],
        "summary": "UpdateSyslogRoute",
        "description": "UpdateSyslogRoute",
        "operationId": "UpdateSyslogRoute",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Route ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "SyslogRoute details",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyslogRoute"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "SyslogRoute updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyslogRoute"
                }
              }
            }
          },
          "404": {
            "description": "SyslogRoute not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "500": {
            "description": "Failed to update the SyslogRoute",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Syslog Routes"
        ],
        "summary": "DeleteSyslogRoute",
        "description": "DeleteSyslogRoute",
        "operationId": "DeleteSyslogRoute",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "SyslogRoute Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Route deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "404": {
            "description": "Route not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/traces": {
      "post": {
        "tags": [
          "Traces"
        ],
        "summary": "TracesIngest",
        "description": "TracesIngest",
        "operationId": "PostTraces",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "ExportTraceServiceRequest",
          "content": {
            "application/x-protobuf": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestionResponse"
                },
                "example": {
                  "code": 200
                }
              }
            }
          },
          "500": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/{org_id}/users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "ListUsers",
        "description": "ListUsers",
        "operationId": "UserList",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserList"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "CreateUser",
        "description": "CreateUser",
        "operationId": "UserSave",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "User data",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/users/{email_id}": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "AddUserToOrganization",
        "description": "AddUserToOrganization",
        "operationId": "AddUserToOrg",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email_id",
            "in": "path",
            "description": "User's email id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "User role",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserOrgRole"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "UpdateUser",
        "description": "UpdateUser",
        "operationId": "UserUpdate",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email_id",
            "in": "path",
            "description": "User's email id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "User data",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUser"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "RemoveUserFromOrganization",
        "description": "RemoveUserFromOrganization",
        "operationId": "RemoveUserFromOrg",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email_id",
            "in": "path",
            "description": "User name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "404": {
            "description": "NotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/{stream_name}": {
      "delete": {
        "tags": [
          "Streams"
        ],
        "summary": "DeleteStream",
        "description": "DeleteStream",
        "operationId": "StreamDelete",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream_name",
            "in": "path",
            "description": "Stream name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "400": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/{stream_name}/_around": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "SearchAround",
        "description": "SearchAround",
        "operationId": "SearchAround",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream_name",
            "in": "path",
            "description": "stream_name name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "query",
            "description": "around key",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "around size",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                },
                "example": {
                  "from": 0,
                  "hits": [
                    {
                      "_p": "F",
                      "_timestamp": 1674213225158000,
                      "kubernetes": {
                        "container_hash": "dkr.ecr.us-west-2.amazonaws.com/openobserve@sha256:3dbbb0dc1eab2d5a3b3e4a75fd87d194e8095c92d7b2b62e7cdbd07020f54589",
                        "container_image": "dkr.ecr.us-west-2.amazonaws.com/openobserve:v0.0.3",
                        "container_name": "openobserve",
                        "docker_id": "eb0983bdb9ff9360d227e6a0b268fe3b24a0868c2c2d725a1516c11e88bf5789",
                        "host": "ip.us-east-2.compute.internal",
                        "namespace_name": "openobserve",
                        "pod_id": "35a0421f-9203-4d73-9663-9ff0ce26d409",
                        "pod_name": "openobserve-ingester-0"
                      },
                      "log": "[2023-01-20T11:13:45Z INFO  actix_web::middleware::logger] 10.2.80.192 \"POST /api/demo/_bulk HTTP/1.1\" 200 68",
                      "stream": "stderr"
                    }
                  ],
                  "scan_size": 28943,
                  "size": 10,
                  "took": 155,
                  "total": 10
                }
              }
            }
          },
          "500": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/{stream_name}/_json": {
      "post": {
        "tags": [
          "Logs"
        ],
        "summary": "_json ingestion API",
        "description": "_json ingestion API",
        "operationId": "LogsIngestionJson",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream_name",
            "in": "path",
            "description": "Stream name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Ingest data (json array)",
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              },
              "example": [
                {
                  "Athlete": "Alfred",
                  "City": "Athens",
                  "Country": "HUN",
                  "Discipline": "Swimming",
                  "Sport": "Aquatics",
                  "Year": 1896
                },
                {
                  "Athlete": "HERSCHMANN",
                  "City": "Athens",
                  "Country": "CHN",
                  "Discipline": "Swimming",
                  "Sport": "Aquatics",
                  "Year": 1896
                }
              ]
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestionResponse"
                },
                "example": {
                  "code": 200,
                  "status": [
                    {
                      "failed": 0,
                      "name": "olympics",
                      "successful": 3
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/{stream_name}/_kinesis_firehose": {
      "post": {
        "tags": [
          "Logs"
        ],
        "summary": "_kinesis_firehose ingestion API",
        "description": "_kinesis_firehose ingestion API",
        "operationId": "AWSLogsIngestion",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream_name",
            "in": "path",
            "description": "Stream name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Ingest data (json array)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KinesisFHRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KinesisFHIngestionResponse"
                },
                "example": {
                  "requestId": "ed4acda5-034f-9f42-bba1-f29aea6d7d8f",
                  "timestamp": 1578090903599
                }
              }
            }
          },
          "500": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                },
                "example": {
                  "errorMessage": "error processing request",
                  "requestId": "ed4acda5-034f-9f42-bba1-f29aea6d7d8f",
                  "timestamp": 1578090903599
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/{stream_name}/_multi": {
      "post": {
        "tags": [
          "Logs"
        ],
        "summary": "_multi ingestion API",
        "description": "_multi ingestion API",
        "operationId": "LogsIngestionMulti",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream_name",
            "in": "path",
            "description": "Stream name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Ingest data (multiple line json)",
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestionResponse"
                },
                "example": {
                  "code": 200,
                  "status": [
                    {
                      "failed": 0,
                      "name": "olympics",
                      "successful": 3
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/{stream_name}/_values": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "SearchTopNValues",
        "description": "SearchTopNValues",
        "operationId": "SearchValues",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream_name",
            "in": "path",
            "description": "stream_name name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "fields, split by comma",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "size",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "start_time",
            "in": "query",
            "description": "start time",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "end_time",
            "in": "query",
            "description": "end time",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                },
                "example": {
                  "took": 155,
                  "values": [
                    {
                      "field": "field1",
                      "values": [
                        "value1",
                        "value2"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "500": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/{stream_name}/alerts": {
      "get": {
        "tags": [
          "Alerts"
        ],
        "summary": "ListStreamAlerts",
        "description": "ListStreamAlerts",
        "operationId": "ListStreamAlerts",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream_name",
            "in": "path",
            "description": "Stream name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertList"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/{stream_name}/alerts/{alert_name}": {
      "get": {
        "tags": [
          "Alerts"
        ],
        "summary": "GetAlertByName",
        "description": "GetAlertByName",
        "operationId": "GetAlert",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream_name",
            "in": "path",
            "description": "Stream name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "alert_name",
            "in": "path",
            "description": "Alert name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Alert"
                }
              }
            }
          },
          "404": {
            "description": "NotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Alerts"
        ],
        "summary": "CreateAlert",
        "description": "CreateAlert",
        "operationId": "SaveAlert",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream_name",
            "in": "path",
            "description": "Stream name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "alert_name",
            "in": "path",
            "description": "Alert name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Alert data",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Alert"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Alerts"
        ],
        "summary": "DeleteAlert",
        "description": "DeleteAlert",
        "operationId": "DeleteAlert",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream_name",
            "in": "path",
            "description": "Stream name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "alert_name",
            "in": "path",
            "description": "Alert name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "404": {
            "description": "NotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/{stream_name}/alerts/{alert_name}/trigger": {
      "put": {
        "tags": [
          "Alerts"
        ],
        "summary": "TriggerAlert",
        "description": "TriggerAlert",
        "operationId": "TriggerAlert",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream_name",
            "in": "path",
            "description": "Stream name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "alert_name",
            "in": "path",
            "description": "Alert name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "404": {
            "description": "NotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/{stream_name}/functions": {
      "get": {
        "tags": [
          "Functions"
        ],
        "summary": "ListStreamFunctions",
        "description": "ListStreamFunctions",
        "operationId": "listStreamFunctions",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream_name",
            "in": "path",
            "description": "Stream name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StreamFunctionsList"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/{stream_name}/functions/{name}": {
      "post": {
        "tags": [
          "Functions"
        ],
        "summary": "ApplyFunctionToStream",
        "description": "ApplyFunctionToStream",
        "operationId": "applyFunctionToStream",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream_name",
            "in": "path",
            "description": "Stream name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Function name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Function data",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StreamOrder"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "400": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Functions"
        ],
        "summary": "RemoveStreamFunction",
        "description": "RemoveStreamFunction",
        "operationId": "removeStreamFunction",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream_name",
            "in": "path",
            "description": "Stream name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Function name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "404": {
            "description": "NotFound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/{stream_name}/schema": {
      "get": {
        "tags": [
          "Streams"
        ],
        "summary": "GetSchema",
        "description": "GetSchema",
        "operationId": "StreamSchema",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream_name",
            "in": "path",
            "description": "Stream name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Stream"
                }
              }
            }
          },
          "400": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/api/{org_id}/{stream_name}/settings": {
      "post": {
        "tags": [
          "Streams"
        ],
        "summary": "UpdateStreamSettings",
        "description": "UpdateStreamSettings",
        "operationId": "StreamSettings",
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "description": "Organization name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stream_name",
            "in": "path",
            "description": "Stream name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Stream settings",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StreamSettings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          },
          "400": {
            "description": "Failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/auth/login": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "AuthenticateUser",
        "description": "AuthenticateUser",
        "operationId": "UserLoginCheck",
        "requestBody": {
          "description": "User login",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignInUser"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignInResponse"
                }
              }
            }
          }
        }
      }
    },
    "/healthz": {
      "get": {
        "tags": [
          "Meta"
        ],
        "summary": "Healthz",
        "description": "Healthz",
        "operationId": "healthz",
        "responses": {
          "200": {
            "description": "Staus OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthzResponse"
                },
                "example": {
                  "status": "ok"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AggregationFunc": {
        "type": "string",
        "enum": [
          "count",
          "count-distinct",
          "histogram",
          "sum",
          "min",
          "max",
          "avg"
        ]
      },
      "Alert": {
        "type": "object",
        "required": [
          "condition",
          "duration",
          "frequency",
          "time_between_alerts",
          "destination"
        ],
        "properties": {
          "condition": {
            "$ref": "#/components/schemas/Condition"
          },
          "context_attributes": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "destination": {
            "type": "string"
          },
          "duration": {
            "type": "integer",
            "format": "int64"
          },
          "frequency": {
            "type": "integer",
            "format": "int64"
          },
          "is_real_time": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "query": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SearchQuery"
              }
            ],
            "nullable": true
          },
          "stream": {
            "type": "string"
          },
          "stream_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StreamType"
              }
            ],
            "nullable": true
          },
          "time_between_alerts": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "AlertDestType": {
        "type": "string",
        "enum": [
          "slack",
          "alertmanager"
        ]
      },
      "AlertDestination": {
        "type": "object",
        "required": [
          "url",
          "method",
          "template"
        ],
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "method": {
            "$ref": "#/components/schemas/AlertHTTPType"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "skip_tls_verify": {
            "type": "boolean"
          },
          "template": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "AlertDestinationResponse": {
        "type": "object",
        "required": [
          "name",
          "url",
          "method"
        ],
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "method": {
            "$ref": "#/components/schemas/AlertHTTPType"
          },
          "name": {
            "type": "string"
          },
          "skip_tls_verify": {
            "type": "boolean"
          },
          "template": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DestinationTemplate"
              }
            ],
            "nullable": true
          },
          "url": {
            "type": "string"
          }
        }
      },
      "AlertHTTPType": {
        "type": "string",
        "enum": [
          "post",
          "put",
          "get"
        ]
      },
      "AlertList": {
        "type": "object",
        "required": [
          "list"
        ],
        "properties": {
          "list": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Alert"
            }
          }
        }
      },
      "AllOperator": {
        "type": "string",
        "enum": [
          "EqualTo",
          "NotEqualTo",
          "GreaterThan",
          "GreaterThanEquals",
          "LessThan",
          "LessThanEquals",
          "Contains",
          "NotContains"
        ]
      },
      "AxisItem": {
        "type": "object",
        "required": [
          "label",
          "alias",
          "column"
        ],
        "properties": {
          "aggregationFunction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AggregationFunc"
              }
            ],
            "nullable": true
          },
          "alias": {
            "type": "string"
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "column": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        }
      },
      "BulkResponse": {
        "type": "object",
        "required": [
          "took",
          "errors",
          "items"
        ],
        "properties": {
          "errors": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/components/schemas/BulkResponseItem"
              }
            }
          },
          "took": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "BulkResponseError": {
        "type": "object",
        "required": [
          "type",
          "reason",
          "index_uuid",
          "shard",
          "index"
        ],
        "properties": {
          "index": {
            "type": "string"
          },
          "index_uuid": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "shard": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "BulkResponseItem": {
        "type": "object",
        "required": [
          "_index",
          "_id",
          "status"
        ],
        "properties": {
          "_id": {
            "type": "string"
          },
          "_index": {
            "type": "string"
          },
          "_primary_term": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "_seq_no": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "_shards": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ShardResponse"
              }
            ],
            "nullable": true
          },
          "_version": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BulkResponseError"
              }
            ],
            "nullable": true
          },
          "originalRecord": {
            "type": "object"
          },
          "result": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "Condition": {
        "type": "object",
        "required": [
          "column",
          "operator",
          "value"
        ],
        "properties": {
          "column": {
            "type": "string"
          },
          "ignoreCase": {
            "type": "boolean",
            "nullable": true
          },
          "isNumeric": {
            "type": "boolean",
            "nullable": true
          },
          "operator": {
            "$ref": "#/components/schemas/AllOperator"
          },
          "value": {
            "type": "object"
          }
        }
      },
      "Dashboard": {
        "type": "object",
        "required": [
          "title",
          "description"
        ],
        "properties": {
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "dashboardId": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "layouts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Layout"
            },
            "nullable": true
          },
          "owner": {
            "type": "string"
          },
          "panels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Panel"
            }
          },
          "role": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "variables": {
            "nullable": true
          }
        }
      },
      "Dashboards": {
        "type": "object",
        "required": [
          "dashboards"
        ],
        "properties": {
          "dashboards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Dashboard"
            }
          }
        }
      },
      "DestinationTemplate": {
        "type": "object",
        "required": [
          "body"
        ],
        "properties": {
          "body": {
            "type": "object"
          },
          "isDefault": {
            "type": "boolean",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "FunctionList": {
        "type": "object",
        "required": [
          "list"
        ],
        "properties": {
          "list": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Transform"
            }
          }
        }
      },
      "HealthzResponse": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string"
          }
        }
      },
      "HttpResponse": {
        "type": "object",
        "description": "HTTP response\ncode 200 is success\ncode 400 is error\ncode 404 is not found\ncode 500 is internal server error\ncode 503 is service unavailable\ncode >= 1000 is custom error code\nmessage is the message or error message",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "error_detail": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string"
          }
        }
      },
      "IngestionPasscode": {
        "type": "object",
        "required": [
          "passcode",
          "user"
        ],
        "properties": {
          "passcode": {
            "type": "string"
          },
          "user": {
            "type": "string"
          }
        }
      },
      "IngestionResponse": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StreamStatus"
            }
          }
        }
      },
      "KFHRecordRequest": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "string"
          }
        }
      },
      "KinesisFHIngestionResponse": {
        "type": "object",
        "required": [
          "requestId",
          "timestamp"
        ],
        "properties": {
          "errorMessage": {
            "type": "string",
            "nullable": true
          },
          "requestId": {
            "type": "string"
          },
          "timestamp": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "KinesisFHRequest": {
        "type": "object",
        "required": [
          "records",
          "requestId"
        ],
        "properties": {
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KFHRecordRequest"
            }
          },
          "requestId": {
            "type": "string"
          },
          "timestamp": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        }
      },
      "Layout": {
        "type": "object",
        "required": [
          "x",
          "y",
          "w",
          "h",
          "i",
          "panelId",
          "static"
        ],
        "properties": {
          "h": {
            "type": "integer",
            "format": "int64"
          },
          "i": {
            "type": "integer",
            "format": "int64"
          },
          "panelId": {
            "type": "string"
          },
          "static": {
            "type": "boolean"
          },
          "w": {
            "type": "integer",
            "format": "int64"
          },
          "x": {
            "type": "integer",
            "format": "int64"
          },
          "y": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ListStream": {
        "type": "object",
        "required": [
          "list"
        ],
        "properties": {
          "list": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Stream"
            }
          }
        }
      },
      "OrgDetails": {
        "type": "object",
        "required": [
          "id",
          "identifier",
          "name",
          "user_email",
          "ingest_threshold",
          "search_threshold",
          "type",
          "UserObj"
        ],
        "properties": {
          "UserObj": {
            "$ref": "#/components/schemas/OrgUser"
          },
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "identifier": {
            "type": "string"
          },
          "ingest_threshold": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "search_threshold": {
            "type": "integer",
            "format": "int64"
          },
          "type": {
            "type": "string"
          },
          "user_email": {
            "type": "string"
          }
        }
      },
      "OrgSummary": {
        "type": "object",
        "required": [
          "streams",
          "functions",
          "alerts"
        ],
        "properties": {
          "alerts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Alert"
            }
          },
          "functions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Transform"
            }
          },
          "streams": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Stream"
            }
          }
        }
      },
      "OrgUser": {
        "type": "object",
        "required": [
          "first_name",
          "last_name",
          "email"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          }
        }
      },
      "OrganizationResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrgDetails"
            }
          }
        }
      },
      "Panel": {
        "type": "object",
        "required": [
          "id",
          "type",
          "fields",
          "config",
          "query",
          "customQuery"
        ],
        "properties": {
          "config": {
            "$ref": "#/components/schemas/PanelConfig"
          },
          "customQuery": {
            "type": "boolean"
          },
          "fields": {
            "$ref": "#/components/schemas/PanelFields"
          },
          "id": {
            "type": "string"
          },
          "query": {
            "type": "string"
          },
          "queryType": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "PanelConfig": {
        "type": "object",
        "required": [
          "title",
          "description",
          "show_legends"
        ],
        "properties": {
          "description": {
            "type": "string"
          },
          "legends_position": {
            "type": "string",
            "nullable": true
          },
          "promql_legend": {
            "type": "string",
            "nullable": true
          },
          "show_legends": {
            "type": "boolean"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "PanelFields": {
        "type": "object",
        "required": [
          "stream",
          "stream_type",
          "x",
          "y",
          "filter"
        ],
        "properties": {
          "filter": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PanelFilter"
            }
          },
          "stream": {
            "type": "string"
          },
          "stream_type": {
            "$ref": "#/components/schemas/StreamType"
          },
          "x": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AxisItem"
            }
          },
          "y": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AxisItem"
            }
          }
        }
      },
      "PanelFilter": {
        "type": "object",
        "required": [
          "type",
          "values",
          "column"
        ],
        "properties": {
          "column": {
            "type": "string"
          },
          "operator": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string"
          },
          "value": {
            "type": "string",
            "nullable": true
          },
          "values": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PasscodeResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IngestionPasscode"
          }
        }
      },
      "RecordStatus": {
        "type": "object",
        "required": [
          "successful",
          "failed"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "failed": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "successful": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "RequestEncoding": {
        "type": "string",
        "enum": [
          "base64",
          "Empty"
        ]
      },
      "ResponseTook": {
        "type": "object",
        "required": [
          "total",
          "wait_queue",
          "cluster_total",
          "cluster_wait_queue"
        ],
        "properties": {
          "cluster_total": {
            "type": "integer",
            "minimum": 0
          },
          "cluster_wait_queue": {
            "type": "integer",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "wait_queue": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "SearchQuery": {
        "type": "object",
        "required": [
          "sql"
        ],
        "properties": {
          "end_time": {
            "type": "integer",
            "format": "int64"
          },
          "from": {
            "type": "integer",
            "minimum": 0
          },
          "query_context": {
            "type": "string",
            "nullable": true
          },
          "query_fn": {
            "type": "string",
            "nullable": true
          },
          "query_type": {
            "type": "string"
          },
          "size": {
            "type": "integer",
            "minimum": 0
          },
          "sql": {
            "type": "string"
          },
          "sql_mode": {
            "type": "string"
          },
          "start_time": {
            "type": "integer",
            "format": "int64"
          },
          "track_total_hits": {
            "type": "boolean"
          },
          "uses_zo_fn": {
            "type": "boolean"
          }
        }
      },
      "SearchRequest": {
        "type": "object",
        "required": [
          "query"
        ],
        "properties": {
          "aggs": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "encoding": {
            "$ref": "#/components/schemas/RequestEncoding"
          },
          "query": {
            "$ref": "#/components/schemas/SearchQuery"
          }
        }
      },
      "SearchResponse": {
        "type": "object",
        "required": [
          "took",
          "hits",
          "total",
          "from",
          "size",
          "scan_size"
        ],
        "properties": {
          "aggs": {
            "type": "object"
          },
          "from": {
            "type": "integer",
            "minimum": 0
          },
          "hits": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "response_type": {
            "type": "string"
          },
          "scan_size": {
            "type": "integer",
            "minimum": 0
          },
          "size": {
            "type": "integer",
            "minimum": 0
          },
          "took": {
            "type": "integer",
            "minimum": 0
          },
          "took_detail": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ResponseTook"
              }
            ],
            "nullable": true
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ShardResponse": {
        "type": "object",
        "required": [
          "total",
          "successful",
          "failed"
        ],
        "properties": {
          "failed": {
            "type": "integer",
            "format": "int64"
          },
          "successful": {
            "type": "integer",
            "format": "int64"
          },
          "total": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "SignInResponse": {
        "type": "object",
        "required": [
          "status",
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "status": {
            "type": "boolean"
          }
        }
      },
      "SignInUser": {
        "type": "object",
        "required": [
          "name",
          "password"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "Stream": {
        "type": "object",
        "required": [
          "name",
          "storage_type",
          "stream_type",
          "stats",
          "settings"
        ],
        "properties": {
          "metrics_meta": {
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "schema": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StreamProperty"
            }
          },
          "settings": {
            "$ref": "#/components/schemas/StreamSettings"
          },
          "stats": {
            "$ref": "#/components/schemas/StreamStats"
          },
          "storage_type": {
            "type": "string"
          },
          "stream_type": {
            "$ref": "#/components/schemas/StreamType"
          }
        }
      },
      "StreamFunctionsList": {
        "type": "object",
        "required": [
          "list"
        ],
        "properties": {
          "list": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StreamTransform"
            }
          }
        }
      },
      "StreamOrder": {
        "type": "object",
        "properties": {
          "order": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "stream": {
            "type": "string"
          },
          "streamType": {
            "$ref": "#/components/schemas/StreamType"
          }
        }
      },
      "StreamProperty": {
        "type": "object",
        "required": [
          "name",
          "type"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "StreamSettings": {
        "type": "object",
        "properties": {
          "data_retention": {
            "type": "integer",
            "format": "int64"
          },
          "full_text_search_keys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "partition_keys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "StreamStats": {
        "type": "object",
        "required": [
          "created_at",
          "doc_time_min",
          "doc_time_max",
          "doc_num",
          "file_num",
          "storage_size",
          "compressed_size"
        ],
        "properties": {
          "compressed_size": {
            "type": "number",
            "format": "double"
          },
          "created_at": {
            "type": "integer",
            "format": "int64"
          },
          "doc_num": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "doc_time_max": {
            "type": "integer",
            "format": "int64"
          },
          "doc_time_min": {
            "type": "integer",
            "format": "int64"
          },
          "file_num": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "storage_size": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "StreamStatus": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RecordStatus"
          },
          {
            "type": "object",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string"
              }
            }
          }
        ]
      },
      "StreamTransform": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Transform"
          },
          {
            "type": "object",
            "properties": {
              "order": {
                "type": "integer",
                "format": "int32",
                "minimum": 0
              },
              "stream": {
                "type": "string"
              },
              "stream_type": {
                "$ref": "#/components/schemas/StreamType"
              }
            }
          }
        ]
      },
      "StreamType": {
        "type": "string",
        "enum": [
          "logs",
          "metrics",
          "traces",
          "enrichment_tables",
          "file_list"
        ]
      },
      "SyslogRoute": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "streamName": {
            "type": "string"
          },
          "subnets": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SyslogRoutes": {
        "type": "object",
        "required": [
          "routes"
        ],
        "properties": {
          "routes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SyslogRoute"
            }
          }
        }
      },
      "Transform": {
        "type": "object",
        "required": [
          "function"
        ],
        "properties": {
          "function": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "numArgs": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "params": {
            "type": "string"
          },
          "streams": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StreamOrder"
            },
            "nullable": true
          },
          "transType": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "minimum": 0
          }
        }
      },
      "UpdateUser": {
        "type": "object",
        "properties": {
          "first_name": {
            "type": "string",
            "nullable": true
          },
          "last_name": {
            "type": "string",
            "nullable": true
          },
          "new_password": {
            "type": "string",
            "nullable": true
          },
          "old_password": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UserRole"
              }
            ],
            "nullable": true
          },
          "token": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "UserList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserResponse"
            }
          }
        }
      },
      "UserOrgRole": {
        "type": "object",
        "required": [
          "role"
        ],
        "properties": {
          "role": {
            "$ref": "#/components/schemas/UserRole"
          }
        }
      },
      "UserRequest": {
        "type": "object",
        "required": [
          "email",
          "password"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "UserResponse": {
        "type": "object",
        "required": [
          "email",
          "role"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/UserRole"
          }
        }
      },
      "UserRole": {
        "type": "string",
        "enum": [
          "admin",
          "member",
          "root"
        ]
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      },
      "Authorization":{
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "tags": [
    {
      "name": "Meta",
      "description": "Meta details about the OpenObserve state itself. e.g. healthz"
    },
    {
      "name": "Auth",
      "description": "User login authentication"
    },
    {
      "name": "Logs",
      "description": "Logs data ingestion operations"
    },
    {
      "name": "Dashboards",
      "description": "Dashboard operations"
    },
    {
      "name": "Search",
      "description": "Search/Query operations"
    },
    {
      "name": "Alerts",
      "description": "Alerts retrieval & management operations"
    },
    {
      "name": "Functions",
      "description": "Functions retrieval & management operations"
    },
    {
      "name": "Organizations",
      "description": "Organizations retrieval & management operations"
    },
    {
      "name": "Streams",
      "description": "Stream retrieval & management operations"
    },
    {
      "name": "Users",
      "description": "Users retrieval & management operations"
    },
    {
      "name": "KV",
      "description": "Key Value retrieval & management operations"
    },
    {
      "name": "Metrics",
      "description": "Metrics data ingestion operations"
    },
    {
      "name": "Traces",
      "description": "Traces data ingestion operations"
    },
    {
      "name": "Syslog Routes",
      "description": "Syslog Routes retrieval & management operations"
    }
  ]
}
