{ "swagger": "2.0", "info": { "description": "Descriptions of Lobster log-sink management APIs", "title": "Lobster Operator APIs document", "contact": {}, "version": "1.0" }, "paths": { "/api/v1/namespaces/{namespace}/sinks/{name}": { "get": { "produces": [ "application/json" ], "tags": [ "Get" ], "summary": "List sinks", "parameters": [ { "type": "string", "description": "namespace name", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "sink name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/v1.Sink" } } }, "400": { "description": "Invalid parameters", "schema": { "type": "string" } }, "405": { "description": "Method not allowed", "schema": { "type": "string" } }, "500": { "description": "Failed to get sink", "schema": { "type": "string" } } } }, "put": { "consumes": [ "application/json" ], "tags": [ "Put" ], "summary": "Put log sink", "parameters": [ { "type": "string", "description": "namespace name", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "sink name", "name": "name", "in": "path", "required": true }, { "description": "sink rules; All rules in the array must be unique", "name": "sink", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Sink" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "201": { "description": "Created successfully", "schema": { "type": "string" } }, "400": { "description": "Invalid parameters", "schema": { "type": "array", "items": { "$ref": "#/definitions/v1.ValidationError" } } }, "405": { "description": "Method not allowed", "schema": { "type": "string" } }, "422": { "description": "Restricted by limits", "schema": { "type": "string" } }, "500": { "description": "Failed to put sink rules", "schema": { "type": "string" } } } } }, "/api/v1/namespaces/{namespace}/sinks/{name}/rules/{rule}": { "delete": { "tags": [ "Delete" ], "summary": "Delete sink", "parameters": [ { "type": "string", "description": "namespace name", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "sink name", "name": "name", "in": "path", "required": true }, { "type": "string", "description": "log export rule name to delete", "name": "rule", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "400": { "description": "Invalid parameters", "schema": { "type": "string" } }, "404": { "description": "Not found", "schema": { "type": "string" } }, "405": { "description": "Method not allowed", "schema": { "type": "string" } }, "500": { "description": "Failed to delete sink", "schema": { "type": "string" } } } } }, "/api/v1/namespaces/{namespace}/sinks/{name}/validate": { "post": { "consumes": [ "application/json" ], "tags": [ "Post" ], "summary": "Validate log sink", "parameters": [ { "type": "string", "description": "namespace name", "name": "namespace", "in": "path", "required": true }, { "type": "string", "description": "sink name", "name": "name", "in": "path", "required": true }, { "description": "sink rules; All rules in the array must be unique", "name": "sink", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1.Sink" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "201": { "description": "Created successfully", "schema": { "type": "string" } }, "400": { "description": "Invalid parameters", "schema": { "type": "array", "items": { "$ref": "#/definitions/v1.ValidationError" } } }, "405": { "description": "Method not allowed", "schema": { "type": "string" } }, "422": { "description": "Restricted by limits", "schema": { "type": "string" } }, "500": { "description": "Failed to get sink rules", "schema": { "type": "string" } } } } } }, "definitions": { "v1.BasicBucket": { "type": "object", "properties": { "destination": { "description": "Address to export logs", "type": "string" }, "pathTemplate": { "description": "Path constructed from log metadata for exporting logs", "type": "string" }, "rootPath": { "description": "Deprecated; Root directory to store logs within external storage", "type": "string" }, "shouldEncodeFileName": { "description": "Provide an option to convert '+' to '%2B' to address issues in certain web environments where '+' is misinterpreted", "type": "boolean" }, "timeLayoutOfSubDirectory": { "description": "Deprecated; An option(default `2006-01`) that sets the name of the sub-directory following `{Root path}` to a time-based layout", "type": "string", "default": "2006-01" } } }, "v1.Filter": { "type": "object", "properties": { "clusters": { "description": "Filter logs only for specific Clusters", "type": "array", "items": { "type": "string" } }, "containers": { "description": "Filter logs only for specific Containers", "type": "array", "items": { "type": "string" } }, "exclude": { "description": "Filter only logs that do not match the re2 expression(https://github.com/google/re2/wiki/Syntax)", "type": "string" }, "include": { "description": "Filter only logs that match the re2 expression(https://github.com/google/re2/wiki/Syntax)", "type": "string" }, "labels": { "description": "Filter logs only for specific Pod labels", "type": "array", "items": { "type": "object", "additionalProperties": { "type": "string" } } }, "namespace": { "description": "Filter logs only for specific Namespace", "type": "string" }, "pods": { "description": "Filter logs only for specific Pods", "type": "array", "items": { "type": "string" } }, "setNames": { "description": "Filter logs only for specific ReplicaSets/StatefulSets", "type": "array", "items": { "type": "string" } }, "sources": { "description": "Filter logs only for specific Sources", "type": "array", "items": { "$ref": "#/definitions/v1.Source" } } } }, "v1.Kafka": { "type": "object", "properties": { "brokers": { "description": "Target kafka broker servers to send logs", "type": "array", "items": { "type": "string" } }, "clientId": { "description": "An identifier to distinguish request; default `lobster`", "type": "string" }, "compression": { "description": "Compression codec specifying the compression type", "type": "string" }, "idempotent": { "description": "The producer will ensure that exactly one", "type": "boolean" }, "key": { "description": "Target key to which logs will be exported (optional)", "type": "string" }, "partition": { "description": "Target partition to which logs will be exported (optional)", "type": "integer" }, "retryBackoff": { "description": "How long to wait for the cluster to settle between retries", "type": "string", "example": "time duration(e.g. 1m)" }, "retryMax": { "description": "The total number of times to retry sending a message", "type": "integer" }, "sasl": { "description": "SASL configuration", "allOf": [ { "$ref": "#/definitions/v1.SASL" } ] }, "tls": { "description": "TLS configuration", "allOf": [ { "$ref": "#/definitions/v1.TLS" } ] }, "topic": { "description": "Target topic to which logs will be exported (required)", "type": "string" } } }, "v1.LogExportRule": { "type": "object", "properties": { "basicBucket": { "description": "Settings required to export logs to basic bucket", "allOf": [ { "$ref": "#/definitions/v1.BasicBucket" } ] }, "description": { "description": "Description of this rule", "type": "string" }, "enableLogEntryFormat": { "description": "Enable structured messages to include chunk metadata", "type": "boolean" }, "filter": { "description": "Generate metrics from logs using target or log-based rules", "allOf": [ { "$ref": "#/definitions/v1.Filter" } ] }, "interval": { "description": "Interval to export logs", "type": "string", "example": "time duration(e.g. 1m)" }, "kafka": { "description": "Settings required to export logs to Kafka", "allOf": [ { "$ref": "#/definitions/v1.Kafka" } ] }, "name": { "description": "Rule name", "type": "string" }, "s3Bucket": { "description": "Settings required to export logs to S3 bucket", "allOf": [ { "$ref": "#/definitions/v1.S3Bucket" } ] } } }, "v1.LogMetricRule": { "type": "object", "properties": { "description": { "description": "Description of this rule", "type": "string" }, "filter": { "description": "Generate metrics from logs using target or log-based rules", "allOf": [ { "$ref": "#/definitions/v1.Filter" } ] }, "name": { "description": "Rule name", "type": "string" } } }, "v1.S3Bucket": { "type": "object", "properties": { "accessKey": { "description": "S3 bucket access key", "type": "string" }, "bucketName": { "description": "S3 bucket name", "type": "string" }, "destination": { "description": "S3 Address to export logs", "type": "string" }, "pathTemplate": { "description": "Path constructed from log metadata for exporting logs", "type": "string" }, "region": { "description": "S3 region", "type": "string" }, "rootPath": { "description": "Deprecated; Root directory to store logs within external storage", "type": "string" }, "secretKey": { "description": "S3 bucket secret key", "type": "string" }, "shouldEncodeFileName": { "description": "Provide an option to convert '+' to '%2B' to address issues in certain web environments where '+' is misinterpreted", "type": "boolean" }, "tags": { "description": "Tags for objects to be stored", "allOf": [ { "$ref": "#/definitions/v1.Tags" } ] }, "timeLayoutOfSubDirectory": { "description": "Deprecated; An option(default `2006-01`) that sets the name of the sub-directory following `{Root path}` to a time-based layout", "type": "string", "default": "2006-01" } } }, "v1.SASL": { "type": "object", "properties": { "accessToken": { "description": "Deprecated; OAuth access token", "type": "string" }, "clientId": { "description": "Application's ID", "type": "string" }, "clientSecret": { "description": "Application's secret", "type": "string" }, "enable": { "description": "Whether or not to use SASL authentication", "type": "boolean" }, "handshake": { "description": "Kafka SASL handshake", "type": "boolean" }, "mechanism": { "description": "Enabled SASL mechanism", "type": "string" }, "oAuthType": { "description": "Type for reflecting authentication server's specific requirements", "type": "string" }, "password": { "description": "Password for SASL/PLAIN authentication", "type": "string" }, "scopes": { "description": "Scopes used to specify permission", "type": "array", "items": { "type": "string" } }, "tokenUrl": { "description": "TokenURL server endpoint to obtain the access token", "type": "string" }, "user": { "description": "SASL/PLAIN or SASL/SCRAM authentication", "type": "string" }, "version": { "description": "SASL Protocol Version", "type": "integer" } } }, "v1.Sink": { "type": "object", "properties": { "description": { "type": "string" }, "logExportRules": { "type": "array", "items": { "$ref": "#/definitions/v1.LogExportRule" } }, "logMetricRules": { "type": "array", "items": { "$ref": "#/definitions/v1.LogMetricRule" } }, "name": { "type": "string" }, "namespace": { "type": "string" }, "type": { "type": "string" } } }, "v1.Source": { "type": "object", "properties": { "path": { "type": "string" }, "type": { "type": "string" } } }, "v1.TLS": { "type": "object", "properties": { "caCertificate": { "description": "CA certificate for TLS", "type": "string" }, "enable": { "description": "Whether or not to use TLS", "type": "boolean" }, "insecureSkipVerify": { "description": "Whether or not to skip verification of CA certificate in client", "type": "boolean" } } }, "v1.Tags": { "type": "object", "additionalProperties": { "type": "string" } }, "v1.ValidationError": { "type": "object", "properties": { "field": { "type": "string" }, "message": { "type": "string" } } } } }