{ "swagger": "2.0", "info": { "description": "Descriptions of Lobster query APIs", "title": "Lobster API document", "contact": {}, "version": "1.0" }, "paths": { "/api/v1/logs/range": { "post": { "description": "Get logs for conditions", "produces": [ "application/json" ], "tags": [ "Post" ], "summary": "Get logs within range", "parameters": [ { "description": "request parameters", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/query.Request" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/query.Response" } }, "204": { "description": "No chunks", "schema": { "type": "string" } }, "400": { "description": "Invalid parameters", "schema": { "type": "string" } }, "405": { "description": "Method not allowed", "schema": { "type": "string" } }, "429": { "description": "too many requests", "schema": { "type": "string" } }, "500": { "description": "Failed to read logs", "schema": { "type": "string" } }, "501": { "description": "Not supported version", "schema": { "type": "string" } } } } }, "/api/v2/logs/range": { "post": { "description": "Get logs for conditions", "produces": [ "application/json" ], "tags": [ "Post" ], "summary": "Get logs within range", "parameters": [ { "description": "request parameters", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/query.Request" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/query.ResponseEntries" } }, "204": { "description": "No chunks", "schema": { "type": "string" } }, "400": { "description": "Invalid parameters", "schema": { "type": "string" } }, "405": { "description": "Method not allowed", "schema": { "type": "string" } }, "429": { "description": "too many requests", "schema": { "type": "string" } }, "500": { "description": "Failed to read logs", "schema": { "type": "string" } }, "501": { "description": "Not supported version", "schema": { "type": "string" } } } } }, "/api/{version}/logs": { "post": { "description": "Get metadata of logs for conditions", "produces": [ "application/json" ], "tags": [ "Post" ], "summary": "Get metadata of logs", "parameters": [ { "type": "string", "description": "v1 or v2", "name": "version", "in": "path", "required": true }, { "description": "request parameters", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/query.Request" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/model.Chunk" } } }, "204": { "description": "No chunks", "schema": { "type": "string" } }, "400": { "description": "Invalid parameters", "schema": { "type": "string" } }, "405": { "description": "Method not allowed", "schema": { "type": "string" } }, "429": { "description": "too many requests", "schema": { "type": "string" } }, "500": { "description": "Failed to read logs", "schema": { "type": "string" } } } } }, "/api/{version}/logs/series": { "post": { "description": "Get series for conditions", "produces": [ "application/json" ], "tags": [ "Post" ], "summary": "Get series within range", "parameters": [ { "type": "string", "description": "v1 or v2", "name": "version", "in": "path", "required": true }, { "description": "request parameters", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/query.Request" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/query.Response" } }, "204": { "description": "No chunks", "schema": { "type": "string" } }, "400": { "description": "Invalid parameters", "schema": { "type": "string" } }, "405": { "description": "Method not allowed", "schema": { "type": "string" } }, "429": { "description": "too many requests", "schema": { "type": "string" } }, "500": { "description": "Failed to read logs", "schema": { "type": "string" } } } } } }, "definitions": { "github_com_naver_lobster_pkg_lobster_model.Sample": { "type": "object", "properties": { "lines": { "type": "integer", "format": "int64" }, "size": { "type": "integer", "format": "uint64" }, "timestamp": { "type": "string" } } }, "model.Chunk": { "type": "object", "properties": { "cluster": { "type": "string" }, "container": { "type": "string" }, "id": { "type": "string" }, "labels": { "$ref": "#/definitions/model.Labels" }, "line": { "type": "integer", "format": "int64" }, "namespace": { "type": "string" }, "pod": { "type": "string" }, "podUid": { "type": "string" }, "setName": { "type": "string" }, "size": { "type": "integer", "format": "int64" }, "source": { "$ref": "#/definitions/model.Source" }, "startedAt": { "type": "string" }, "storeAddr": { "type": "string" }, "updatedAt": { "type": "string" } } }, "model.Entry": { "type": "object", "properties": { "cluster": { "type": "string" }, "container": { "type": "string" }, "labels": { "type": "object", "additionalProperties": { "type": "string" } }, "message": { "type": "string" }, "namespace": { "type": "string" }, "pod": { "type": "string" }, "podUid": { "type": "string" }, "sourcePath": { "type": "string" }, "sourceType": { "type": "string" }, "stream": { "type": "string" }, "tag": { "type": "string" }, "time": { "type": "string" } } }, "model.Labels": { "type": "object", "additionalProperties": { "type": "string" } }, "model.PageInfo": { "description": "Page inforamtion.", "type": "object", "properties": { "current": { "type": "integer" }, "hasNext": { "type": "boolean" }, "isPartialContents": { "description": "partial logs are returned", "type": "boolean" }, "total": { "type": "integer" } } }, "model.Series": { "description": "Name: \"{cluster}_{namespace}_{pod}_{container}_{source}-{file number}\".", "type": "object", "properties": { "chunk_key": { "type": "string" }, "lines": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "samples": { "type": "array", "items": { "$ref": "#/definitions/github_com_naver_lobster_pkg_lobster_model.Sample" } }, "size": { "type": "integer", "format": "uint64" } } }, "model.Source": { "type": "object", "properties": { "path": { "type": "string" }, "type": { "type": "string" } } }, "query.Request": { "type": "object", "properties": { "attachment": { "type": "boolean", "default": false }, "burst": { "description": "The number of logs that can be returned in one page and this can be greater or less than burst", "type": "integer" }, "clusters": { "description": "Get chunks belongs to clusters", "type": "array", "items": { "type": "string" } }, "container": { "description": "Use internally", "type": "string" }, "containers": { "description": "Get chunks belongs to namespace and containers", "type": "array", "items": { "type": "string" } }, "enableLogEntryFormat": { "type": "boolean", "default": false }, "end": { "description": "End time for query", "type": "string" }, "exclude": { "type": "string" }, "id": { "description": "Use internally", "type": "string" }, "include": { "description": "Regular expression to search logs", "type": "string" }, "labels": { "description": "Get chunks belongs to namespaces and labels", "type": "array", "items": { "$ref": "#/definitions/model.Labels" } }, "local": { "description": "Use internally", "type": "boolean", "default": false }, "namespace": { "description": "Use internally", "type": "string" }, "namespaces": { "description": "Get chunks belongs to namespaces", "type": "array", "items": { "type": "string" } }, "page": { "description": "The page number for the returned logs", "type": "integer" }, "pod": { "description": "Use internally", "type": "string" }, "pod_uid": { "description": "Use internally", "type": "string" }, "pods": { "description": "Get chunks belongs to namespace and pods", "type": "array", "items": { "type": "string" } }, "setName": { "description": "Use internally", "type": "string" }, "setNames": { "description": "Get chunks belongs to namespace and set names(replicaset/statefulset)", "type": "array", "items": { "type": "string" } }, "source": { "description": "Use internally", "allOf": [ { "$ref": "#/definitions/model.Source" } ] }, "sources": { "description": "Get chunks belongs to namespace and log source", "type": "array", "items": { "$ref": "#/definitions/model.Source" } }, "start": { "description": "Start time for query", "type": "string" } } }, "query.Response": { "description": "Response wrapping series and logs from store.", "type": "object", "properties": { "contents": { "description": "logs in string", "type": "string" }, "pageInfo": { "description": "page information", "allOf": [ { "$ref": "#/definitions/model.PageInfo" } ] }, "series": { "description": "Array contains Series.", "type": "array", "items": { "$ref": "#/definitions/model.Series" } } } }, "query.ResponseEntries": { "description": "Response wrapping series and logs from querier.", "type": "object", "properties": { "contents": { "description": "log entries", "type": "array", "items": { "$ref": "#/definitions/model.Entry" } }, "pageInfo": { "description": "page information", "allOf": [ { "$ref": "#/definitions/model.PageInfo" } ] }, "series": { "description": "Array contains Series.", "type": "array", "items": { "$ref": "#/definitions/model.Series" } } } } } }