diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5d554814..23e4ec43 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,7 +4,8 @@
1. [#140](https://github.com/influxdata/influxdb-client-python/pull/140): Added exponential backoff strategy for batching writes, Allowed to configure default retry strategy. Default value for `retry_interval` is 5_000 milliseconds.
1. [#136](https://github.com/influxdata/influxdb-client-python/pull/136): Allows users to skip of verifying SSL certificate
1. [#143](https://github.com/influxdata/influxdb-client-python/pull/143): Skip of verifying SSL certificate could be configured via config file or environment properties
-1. [#141](https://github.com/influxdata/influxdb-client-python/pull/141): Added possibility to use datetime nanoseconds precision by `pandas.Timestamp`
+1. [#141](https://github.com/influxdata/influxdb-client-python/pull/141): Added possibility to use datetime nanoseconds precision by `pandas.Timestamp`
+1. [#145](https://github.com/influxdata/influxdb-client-python/pull/145): Api generator was moved to influxdb-clients-apigen
## 1.9.0 [2020-07-17]
diff --git a/openapi-generator/pom.xml b/openapi-generator/pom.xml
deleted file mode 100644
index 1def9716..00000000
--- a/openapi-generator/pom.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
- 4.0.0
- org.influxdata
- openapi-generator
- jar
- openapi-generator
- 1.0.0
-
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
- 3.0.0-M1
-
-
- enforce-maven
-
- enforce
-
-
-
-
- 2.2.0
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- 2.12
-
-
-
- loggerPath
- conf/log4j.properties
-
-
- -Xms512m -Xmx1500m
- methods
- pertest
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 2.2
-
-
-
- jar
- test-jar
-
-
-
-
-
-
-
-
- org.codehaus.mojo
- build-helper-maven-plugin
- 3.0.0
-
-
- add_sources
- generate-sources
-
- add-source
-
-
-
-
- src/main/java
-
-
-
-
- add_test_sources
- generate-test-sources
-
- add-test-source
-
-
-
-
- src/test/java
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.6.1
-
- 1.8
- 1.8
-
-
-
-
-
-
- org.openapitools
- openapi-generator
- ${openapi-generator-version}
- provided
-
-
-
- UTF-8
- 3.3.4
- 1.0.0
- 4.8.1
-
-
diff --git a/openapi-generator/src/main/java/org/influxdata/codegen/InfluxPythonGenerator.java b/openapi-generator/src/main/java/org/influxdata/codegen/InfluxPythonGenerator.java
deleted file mode 100644
index 6ebb23db..00000000
--- a/openapi-generator/src/main/java/org/influxdata/codegen/InfluxPythonGenerator.java
+++ /dev/null
@@ -1,245 +0,0 @@
-package org.influxdata.codegen;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-import javax.annotation.Nonnull;
-
-import io.swagger.v3.oas.models.OpenAPI;
-import io.swagger.v3.oas.models.Operation;
-import io.swagger.v3.oas.models.media.Schema;
-import org.openapitools.codegen.CodegenModel;
-import org.openapitools.codegen.CodegenOperation;
-import org.openapitools.codegen.languages.PythonClientCodegen;
-
-import static org.openapitools.codegen.utils.StringUtils.camelize;
-import static org.openapitools.codegen.utils.StringUtils.underscore;
-
-public class InfluxPythonGenerator extends PythonClientCodegen {
-
- public InfluxPythonGenerator() {
- apiPackage = "service";
- modelPackage = "domain";
- }
-
- /**
- * Configures a friendly name for the generator. This will be used by the generator
- * to select the library with the -g flag.
- *
- * @return the friendly name for the generator
- */
- public String getName() {
- return "influx-python";
- }
-
- /**
- * Returns human-friendly help for the generator. Provide the consumer with help
- * tips, parameters here
- *
- * @return A string value for the help message
- */
- public String getHelp() {
- return "Generates a influx-python client library.";
- }
-
- @Override
- public String escapeText(String input) {
- if (input == null) {
- return input;
- }
-
- return super.escapeText(input).replace("\\\"", "\"");
- }
-
- @Override
- public CodegenOperation fromOperation(String path, String httpMethod, Operation operation, Map definitions, OpenAPI openAPI) {
-
- CodegenOperation op = super.fromOperation(path, httpMethod, operation, definitions, openAPI);
-
- //
- // Set base path
- //
- String url;
- if (operation.getServers() != null) {
- url = operation.getServers().get(0).getUrl();
- } else if (openAPI.getPaths().get(path).getServers() != null) {
- url = openAPI.getPaths().get(path).getServers().get(0).getUrl();
- } else {
- url = openAPI.getServers().get(0).getUrl();
- }
-
- if (!url.equals("/")) {
- op.path = url + op.path;
- }
-
- return op;
- }
-
-
- @Override
- public void processOpts() {
-
- super.processOpts();
-
- List useless = Arrays.asList(
- ".gitignore", ".travis.yml", "README.md", "setup.py", "requirements.txt", "test-requirements.txt",
- "tox.ini", "git_push.sh");
-
- //
- // Remove useless supports file
- //
- supportingFiles = supportingFiles.stream()
- .filter(supportingFile -> !useless.contains(supportingFile.destinationFilename))
- .collect(Collectors.toList());
- }
-
- @Override
- public CodegenModel fromModel(final String name, final Schema model, final Map allDefinitions) {
- CodegenModel codegenModel = super.fromModel(name, model, allDefinitions);
-
- if (name.endsWith("ViewProperties") && !name.equals("ViewProperties"))
- {
- codegenModel.setParent("ViewProperties");
- codegenModel.setParentSchema("ViewProperties");
- }
-
- if (allDefinitions.containsKey(name + "Base")) {
- codegenModel.setParent(name + "Base");
- codegenModel.setParentSchema(name + "Base");
- }
-
- if (name.equals("ViewProperties")) {
- codegenModel.setReadWriteVars(new ArrayList<>());
- codegenModel.setRequiredVars(new ArrayList<>());
- codegenModel.hasOnlyReadOnly = true;
- codegenModel.hasRequired = false;
- }
-
- if (codegenModel.name.equals("LesserThreshold") || codegenModel.name.equals("GreaterThreshold")
- || codegenModel.name.equals("RangeThreshold")) {
- codegenModel.setParent("Threshold");
- codegenModel.setParentSchema("Threshold");
- }
-
- if (codegenModel.name.equals("CheckBase")) {
- codegenModel.setParent("CheckDiscriminator");
- codegenModel.setParentSchema("CheckDiscriminator");
- }
-
- if (codegenModel.name.equals("CheckDiscriminator")) {
- codegenModel.setParent("PostCheck");
- codegenModel.setParentSchema("PostCheck");
- }
-
- if (codegenModel.name.equals("NotificationEndpointBase")) {
- codegenModel.setParent("NotificationEndpointDiscriminator");
- codegenModel.setParentSchema("NotificationEndpointDiscriminator");
- }
-
- if (codegenModel.name.equals("PostCheck") || codegenModel.name.equals("PostNotificationEndpoint")) {
- codegenModel.setParent(null);
- codegenModel.setParentSchema(null);
- }
-
- if (codegenModel.name.equals("DeadmanCheck") || codegenModel.name.equals("ThresholdCheck")) {
- codegenModel.setParent("Check");
- codegenModel.setParentSchema("Check");
- }
-
- if (codegenModel.name.equals("SlackNotificationEndpoint") || codegenModel.name.equals("PagerDutyNotificationEndpoint")
- || codegenModel.name.equals("HTTPNotificationEndpoint")) {
- codegenModel.setParent("NotificationEndpoint");
- codegenModel.setParentSchema("NotificationEndpoint");
- }
-
- if (codegenModel.name.equals("NotificationEndpointDiscriminator")) {
- codegenModel.setParent("PostNotificationEndpoint");
- codegenModel.setParentSchema("PostNotificationEndpoint");
- }
-
- if (codegenModel.name.equals("NotificationRuleBase")) {
- codegenModel.setParent("PostNotificationRule");
- codegenModel.setParentSchema("PostNotificationRule");
- }
-
- if (codegenModel.name.endsWith("Discriminator")) {
- codegenModel.hasOnlyReadOnly = true;
- codegenModel.hasRequired = false;
- codegenModel.readWriteVars.clear();
- }
-
- return codegenModel;
- }
-
- @Override
- public Map postProcessAllModels(final Map models) {
-
- Map allModels = super.postProcessAllModels(models);
-
- for (Map.Entry entry : allModels.entrySet()) {
-
- String modelName = entry.getKey();
- Object modelConfig = entry.getValue();
-
- CodegenModel model = getModel((HashMap) modelConfig);
-
- if (model.getParent() != null) {
- CodegenModel parentModel = getModel((HashMap) allModels.get(model.getParent()));
- model.vendorExtensions.put("x-parent-classFilename", parentModel.getClassFilename());
- model.vendorExtensions.put("x-has-parent-vars", !parentModel.getVars().isEmpty());
- model.vendorExtensions.put("x-parent-vars", parentModel.getVars());
- }
- }
-
- return allModels;
- }
-
- @Override
- public String toApiName(String name) {
- if (name.length() == 0) {
- return "DefaultService";
- }
- // e.g. phone_number_service => PhoneNumberService
- return camelize(name) + "Service";
- }
-
- @Override
- public String toApiVarName(String name) {
-
- if (name.length() == 0) {
- return "default_service";
- }
- return underscore(name) + "_service";
- }
-
- @Override
- public String toApiFilename(String name) {
- // replace - with _ e.g. created-at => created_at
- name = name.replaceAll("-", "_");
-
- // e.g. PhoneNumberService.py => phone_number_service.py
- return underscore(name) + "_service";
- }
-
- @Override
- public String toModelName(final String name) {
- final String modelName = super.toModelName(name);
- if ("PostBucketRequestRetentionRules".equals(modelName)) {
- return "BucketRetentionRules";
- }
-
- return modelName;
- }
-
- @Nonnull
- private CodegenModel getModel(@Nonnull final HashMap modelConfig) {
-
- HashMap models = (HashMap) ((ArrayList) modelConfig.get("models")).get(0);
-
- return (CodegenModel) models.get("model");
- }
-}
diff --git a/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig
deleted file mode 100644
index 3467968a..00000000
--- a/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig
+++ /dev/null
@@ -1 +0,0 @@
-org.influxdata.codegen.InfluxPythonGenerator
diff --git a/openapi-generator/src/main/resources/python/__init__api.mustache b/openapi-generator/src/main/resources/python/__init__api.mustache
deleted file mode 100644
index 3d764108..00000000
--- a/openapi-generator/src/main/resources/python/__init__api.mustache
+++ /dev/null
@@ -1,9 +0,0 @@
-# flake8: noqa
-
-{{>partial_header}}
-
-from __future__ import absolute_import
-
-# import apis into api package
-{{#apiInfo}}{{#apis}}from {{apiPackage}}.{{classVarName}} import {{classname}}
-{{/apis}}{{/apiInfo}}
\ No newline at end of file
diff --git a/openapi-generator/src/main/resources/python/__init__package.mustache b/openapi-generator/src/main/resources/python/__init__package.mustache
deleted file mode 100644
index 701bf902..00000000
--- a/openapi-generator/src/main/resources/python/__init__package.mustache
+++ /dev/null
@@ -1,29 +0,0 @@
-# coding: utf-8
-
-# flake8: noqa
-
-{{>partial_header}}
-
-from __future__ import absolute_import
-
-# import apis into sdk package
-{{#apiInfo}}{{#apis}}from {{apiPackage}}.{{classVarName}} import {{classname}}
-{{/apis}}{{/apiInfo}}
-# import ApiClient
-from {{packageName}}.api_client import ApiClient
-from {{packageName}}.configuration import Configuration
-# import models into sdk package
-{{#models}}{{#model}}from {{modelPackage}}.{{classFilename}} import {{classname}}
-{{/model}}{{/models}}
-from influxdb_client.client.authorizations_api import AuthorizationsApi
-from influxdb_client.client.bucket_api import BucketsApi
-from influxdb_client.client.labels_api import LabelsApi
-from influxdb_client.client.organizations_api import OrganizationsApi
-from influxdb_client.client.query_api import QueryApi
-from influxdb_client.client.tasks_api import TasksApi
-from influxdb_client.client.users_api import UsersApi
-from influxdb_client.client.write_api import WriteApi, WriteOptions
-from influxdb_client.client.influxdb_client import InfluxDBClient
-from influxdb_client.client.write.point import Point
-
-__version__ = '{{packageVersion}}'
diff --git a/openapi-generator/src/main/resources/python/api.mustache b/openapi-generator/src/main/resources/python/api.mustache
deleted file mode 100644
index b39bb2b4..00000000
--- a/openapi-generator/src/main/resources/python/api.mustache
+++ /dev/null
@@ -1,225 +0,0 @@
-# coding: utf-8
-
-{{>partial_header}}
-
-from __future__ import absolute_import
-
-import re # noqa: F401
-
-# python 2 and python 3 compatibility library
-import six
-
-from {{packageName}}.api_client import ApiClient
-
-
-{{#operations}}
-class {{classname}}(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
-
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- def __init__(self, api_client=None): # noqa: E501,D401,D403
- """{{classname}} - a operation defined in OpenAPI."""
- if api_client is None:
- api_client = ApiClient()
- self.api_client = api_client
-{{#operation}}
-
- def {{operationId}}(self, {{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs): # noqa: E501,D401,D403
- """{{#summary}}{{{.}}}{{/summary}}{{^summary}}{{operationId}}{{/summary}}.
-
-{{#notes}}
- {{{notes}}}
-{{/notes}}
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-{{#sortParamsByRequiredFlag}}
- >>> thread = api.{{operationId}}({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}async_req=True)
-{{/sortParamsByRequiredFlag}}
-{{^sortParamsByRequiredFlag}}
- >>> thread = api.{{operationId}}({{#allParams}}{{#required}}{{paramName}}={{paramName}}_value, {{/required}}{{/allParams}}async_req=True)
-{{/sortParamsByRequiredFlag}}
- >>> result = thread.get()
-
- :param async_req bool
-{{#allParams}}
- :param {{dataType}} {{paramName}}:{{#description}} {{{description}}}{{/description}}{{#required}} (required){{/required}}{{#optional}}(optional){{/optional}}
-{{/allParams}}
- :return: {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}None{{/returnType}}
- If the method is called asynchronously,
- returns the request thread.
- """ # noqa: E501
- kwargs['_return_http_data_only'] = True
- if kwargs.get('async_req'):
- return self.{{operationId}}_with_http_info({{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs) # noqa: E501
- else:
- (data) = self.{{operationId}}_with_http_info({{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs) # noqa: E501
- return data
-
- def {{operationId}}_with_http_info(self, {{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs): # noqa: E501,D401,D403
- """{{#summary}}{{{.}}}{{/summary}}{{^summary}}{{operationId}}{{/summary}}.
-
-{{#notes}}
- {{{notes}}}
-{{/notes}}
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-{{#sortParamsByRequiredFlag}}
- >>> thread = api.{{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}async_req=True)
-{{/sortParamsByRequiredFlag}}
-{{^sortParamsByRequiredFlag}}
- >>> thread = api.{{operationId}}_with_http_info({{#allParams}}{{#required}}{{paramName}}={{paramName}}_value, {{/required}}{{/allParams}}async_req=True)
-{{/sortParamsByRequiredFlag}}
- >>> result = thread.get()
-
- :param async_req bool
-{{#allParams}}
- :param {{dataType}} {{paramName}}:{{#description}} {{{description}}}{{/description}}{{#required}} (required){{/required}}{{#optional}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/optional}}
-{{/allParams}}
- :return: {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}None{{/returnType}}
- If the method is called asynchronously,
- returns the request thread.
- """ # noqa: E501
- local_var_params = locals()
-
- all_params = [{{#allParams}}'{{paramName}}'{{#hasMore}}, {{/hasMore}}{{/allParams}}] # noqa: E501
- all_params.append('async_req')
- all_params.append('_return_http_data_only')
- all_params.append('_preload_content')
- all_params.append('_request_timeout')
- all_params.append('urlopen_kw')
-
- for key, val in six.iteritems(local_var_params['kwargs']):
- if key not in all_params:
- raise TypeError(
- "Got an unexpected keyword argument '%s'"
- " to method {{operationId}}" % key
- )
- local_var_params[key] = val
- del local_var_params['kwargs']
-{{#allParams}}
-{{^isNullable}}
-{{#required}}
- # verify the required parameter '{{paramName}}' is set
- if ('{{paramName}}' not in local_var_params or
- local_var_params['{{paramName}}'] is None):
- raise ValueError("Missing the required parameter `{{paramName}}` when calling `{{operationId}}`") # noqa: E501
-{{/required}}
-{{/isNullable}}
-{{/allParams}}
-
-{{#allParams}}
-{{#hasValidation}}
- {{#maxLength}}
- if ('{{paramName}}' in local_var_params and
- len(local_var_params['{{paramName}}']) > {{maxLength}}):
- raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, length must be less than or equal to `{{maxLength}}`") # noqa: E501
- {{/maxLength}}
- {{#minLength}}
- if ('{{paramName}}' in local_var_params and
- len(local_var_params['{{paramName}}']) < {{minLength}}):
- raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, length must be greater than or equal to `{{minLength}}`") # noqa: E501
- {{/minLength}}
- {{#maximum}}
- if '{{paramName}}' in local_var_params and local_var_params['{{paramName}}'] >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}}: # noqa: E501
- raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, must be a value less than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}`{{maximum}}`") # noqa: E501
- {{/maximum}}
- {{#minimum}}
- if '{{paramName}}' in local_var_params and local_var_params['{{paramName}}'] <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}}: # noqa: E501
- raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, must be a value greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}`{{minimum}}`") # noqa: E501
- {{/minimum}}
- {{#pattern}}
- if '{{paramName}}' in local_var_params and not re.search(r'{{{vendorExtensions.x-regex}}}', local_var_params['{{paramName}}']{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): # noqa: E501
- raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, must conform to the pattern `{{{pattern}}}`") # noqa: E501
- {{/pattern}}
- {{#maxItems}}
- if ('{{paramName}}' in local_var_params and
- len(local_var_params['{{paramName}}']) > {{maxItems}}):
- raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, number of items must be less than or equal to `{{maxItems}}`") # noqa: E501
- {{/maxItems}}
- {{#minItems}}
- if ('{{paramName}}' in local_var_params and
- len(local_var_params['{{paramName}}']) < {{minItems}}):
- raise ValueError("Invalid value for parameter `{{paramName}}` when calling `{{operationId}}`, number of items must be greater than or equal to `{{minItems}}`") # noqa: E501
- {{/minItems}}
-{{/hasValidation}}
-{{#-last}}
-{{/-last}}
-{{/allParams}}
- collection_formats = {}
-
- path_params = {}
-{{#pathParams}}
- if '{{paramName}}' in local_var_params:
- path_params['{{baseName}}'] = local_var_params['{{paramName}}']{{#isListContainer}} # noqa: E501
- collection_formats['{{baseName}}'] = '{{collectionFormat}}'{{/isListContainer}} # noqa: E501
-{{/pathParams}}
-
- query_params = []
-{{#queryParams}}
- if '{{paramName}}' in local_var_params:
- query_params.append(('{{baseName}}', local_var_params['{{paramName}}'])){{#isListContainer}} # noqa: E501
- collection_formats['{{baseName}}'] = '{{collectionFormat}}'{{/isListContainer}} # noqa: E501
-{{/queryParams}}
-
- header_params = {}
-{{#headerParams}}
- if '{{paramName}}' in local_var_params:
- header_params['{{baseName}}'] = local_var_params['{{paramName}}']{{#isListContainer}} # noqa: E501
- collection_formats['{{baseName}}'] = '{{collectionFormat}}'{{/isListContainer}} # noqa: E501
-{{/headerParams}}
-
- form_params = []
- local_var_files = {}
-{{#formParams}}
- if '{{paramName}}' in local_var_params:
- {{^isFile}}form_params.append(('{{baseName}}', local_var_params['{{paramName}}'])){{/isFile}}{{#isFile}}local_var_files['{{baseName}}'] = local_var_params['{{paramName}}']{{/isFile}}{{#isListContainer}} # noqa: E501
- collection_formats['{{baseName}}'] = '{{collectionFormat}}'{{/isListContainer}} # noqa: E501
-{{/formParams}}
-
- body_params = None
-{{#bodyParam}}
- if '{{paramName}}' in local_var_params:
- body_params = local_var_params['{{paramName}}']
-{{/bodyParam}}
- {{#hasProduces}}
- # HTTP header `Accept`
- header_params['Accept'] = self.api_client.select_header_accept(
- [{{#produces}}'{{{mediaType}}}'{{#hasMore}}, {{/hasMore}}{{/produces}}]) # noqa: E501
-
- {{/hasProduces}}
- {{#hasConsumes}}
- # HTTP header `Content-Type`
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
- [{{#consumes}}'{{{mediaType}}}'{{#hasMore}}, {{/hasMore}}{{/consumes}}]) # noqa: E501
-
- {{/hasConsumes}}
- # Authentication setting
- auth_settings = [{{#authMethods}}'{{name}}'{{#hasMore}}, {{/hasMore}}{{/authMethods}}] # noqa: E501
-
- # urlopen optional setting
- urlopen_kw = None
- if 'urlopen_kw' in kwargs:
- urlopen_kw = kwargs['urlopen_kw']
-
- return self.api_client.call_api(
- '{{{path}}}', '{{httpMethod}}',
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type={{#returnType}}'{{returnType}}'{{/returnType}}{{^returnType}}None{{/returnType}}, # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get('async_req'),
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=local_var_params.get('_preload_content', True),
- _request_timeout=local_var_params.get('_request_timeout'),
- collection_formats=collection_formats,
- urlopen_kw=urlopen_kw)
-{{/operation}}
-{{/operations}}
diff --git a/openapi-generator/src/main/resources/python/api_client.mustache b/openapi-generator/src/main/resources/python/api_client.mustache
deleted file mode 100644
index a3d8dec5..00000000
--- a/openapi-generator/src/main/resources/python/api_client.mustache
+++ /dev/null
@@ -1,657 +0,0 @@
-# coding: utf-8
-{{>partial_header}}
-from __future__ import absolute_import
-
-import datetime
-import json
-import mimetypes
-from multiprocessing.pool import ThreadPool
-import os
-import re
-import tempfile
-
-# python 2 and python 3 compatibility library
-import six
-from six.moves.urllib.parse import quote
-{{#tornado}}
-import tornado.gen
-{{/tornado}}
-
-from {{packageName}}.configuration import Configuration
-import {{modelPackage}}
-from {{packageName}} import rest
-
-
-class ApiClient(object):
- """Generic API client for OpenAPI client library Build.
-
- OpenAPI generic API client. This client handles the client-
- server communication, and is invariant across implementations. Specifics of
- the methods and models for each application are generated from the OpenAPI
- templates.
-
- NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
- Do not edit the class manually.
-
- :param configuration: .Configuration object for this client
- :param header_name: a header to pass when making calls to the API.
- :param header_value: a header value to pass when making calls to
- the API.
- :param cookie: a cookie to include in the header when making calls
- to the API
- :param pool_threads: The number of threads to use for async requests
- to the API. More threads means more concurrent API requests.
- """
-
- PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types
- NATIVE_TYPES_MAPPING = {
- 'int': int,
- 'long': int if six.PY3 else long, # noqa: F821
- 'float': float,
- 'str': str,
- 'bool': bool,
- 'date': datetime.date,
- 'datetime': datetime.datetime,
- 'object': object,
- }
- _pool = None
-
- def __init__(self, configuration=None, header_name=None, header_value=None,
- cookie=None, pool_threads=None, retries=False):
- """Initialize generic API client."""
- if configuration is None:
- configuration = Configuration()
- self.configuration = configuration
- self.pool_threads = pool_threads
-
- self.rest_client = rest.RESTClientObject(configuration, retries=retries)
- self.default_headers = {}
- if header_name is not None:
- self.default_headers[header_name] = header_value
- self.cookie = cookie
- # Set default User-Agent.
- self.user_agent = 'influxdb-client-python/{{{packageVersion}}}'
-
- def __del__(self):
- """Dispose pools."""
- if self._pool:
- self._pool.close()
- self._pool.join()
- self._pool = None
- if self.rest_client and self.rest_client.pool_manager and hasattr(self.rest_client.pool_manager, 'clear'):
- self.rest_client.pool_manager.clear()
-
- @property
- def pool(self):
- """Create thread pool on first request avoids instantiating unused threadpool for blocking clients."""
- if self._pool is None:
- self._pool = ThreadPool(self.pool_threads)
- return self._pool
-
- @property
- def user_agent(self):
- """User agent for this API client."""
- return self.default_headers['User-Agent']
-
- @user_agent.setter
- def user_agent(self, value):
- """Set User agent for this API client."""
- self.default_headers['User-Agent'] = value
-
- def set_default_header(self, header_name, header_value):
- """Set HTTP header for this API client."""
- self.default_headers[header_name] = header_value
-
- {{#tornado}}
- @tornado.gen.coroutine
- {{/tornado}}
- {{#asyncio}}async {{/asyncio}}def __call_api(
- self, resource_path, method, path_params=None,
- query_params=None, header_params=None, body=None, post_params=None,
- files=None, response_type=None, auth_settings=None,
- _return_http_data_only=None, collection_formats=None,
- _preload_content=True, _request_timeout=None, urlopen_kw=None):
-
- config = self.configuration
-
- # header parameters
- header_params = header_params or {}
- config.update_request_header_params(resource_path, header_params)
- header_params.update(self.default_headers)
- if self.cookie:
- header_params['Cookie'] = self.cookie
- if header_params:
- header_params = self.sanitize_for_serialization(header_params)
- header_params = dict(self.parameters_to_tuples(header_params,
- collection_formats))
-
- # path parameters
- if path_params:
- path_params = self.sanitize_for_serialization(path_params)
- path_params = self.parameters_to_tuples(path_params,
- collection_formats)
- for k, v in path_params:
- # specified safe chars, encode everything
- resource_path = resource_path.replace(
- '{%s}' % k,
- quote(str(v), safe=config.safe_chars_for_path_param)
- )
-
- # query parameters
- if query_params:
- query_params = self.sanitize_for_serialization(query_params)
- query_params = self.parameters_to_tuples(query_params,
- collection_formats)
-
- # post parameters
- if post_params or files:
- post_params = self.prepare_post_parameters(post_params, files)
- post_params = self.sanitize_for_serialization(post_params)
- post_params = self.parameters_to_tuples(post_params,
- collection_formats)
-
- # auth setting
- self.update_params_for_auth(header_params, query_params, auth_settings)
-
- # body
- if body:
- body = self.sanitize_for_serialization(body)
- body = config.update_request_body(resource_path, body)
-
- # request url
- url = self.configuration.host + resource_path
-
- urlopen_kw = urlopen_kw or {}
-
- # perform request and return response
- response_data = {{#asyncio}}await {{/asyncio}}{{#tornado}}yield {{/tornado}}self.request(
- method, url, query_params=query_params, headers=header_params,
- post_params=post_params, body=body,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout, **urlopen_kw)
-
- self.last_response = response_data
-
- return_data = response_data
- if _preload_content:
- # deserialize response data
- if response_type:
- return_data = self.deserialize(response_data, response_type)
- else:
- return_data = None
-
-{{^tornado}}
- if _return_http_data_only:
- return (return_data)
- else:
- return (return_data, response_data.status,
- response_data.getheaders())
-{{/tornado}}
-{{#tornado}}
- if _return_http_data_only:
- raise tornado.gen.Return(return_data)
- else:
- raise tornado.gen.Return((return_data, response_data.status,
- response_data.getheaders()))
-{{/tornado}}
-
- def sanitize_for_serialization(self, obj):
- """Build a JSON POST object.
-
- If obj is None, return None.
- If obj is str, int, long, float, bool, return directly.
- If obj is datetime.datetime, datetime.date
- convert to string in iso8601 format.
- If obj is list, sanitize each element in the list.
- If obj is dict, return the dict.
- If obj is OpenAPI model, return the properties dict.
-
- :param obj: The data to serialize.
- :return: The serialized form of data.
- """
- if obj is None:
- return None
- elif isinstance(obj, self.PRIMITIVE_TYPES):
- return obj
- elif isinstance(obj, list):
- return [self.sanitize_for_serialization(sub_obj)
- for sub_obj in obj]
- elif isinstance(obj, tuple):
- return tuple(self.sanitize_for_serialization(sub_obj)
- for sub_obj in obj)
- elif isinstance(obj, (datetime.datetime, datetime.date)):
- return obj.isoformat()
-
- if isinstance(obj, dict):
- obj_dict = obj
- else:
- # Convert model obj to dict except
- # attributes `openapi_types`, `attribute_map`
- # and attributes which value is not None.
- # Convert attribute name to json key in
- # model definition for request.
- obj_dict = {obj.attribute_map[attr]: getattr(obj, attr)
- for attr, _ in six.iteritems(obj.openapi_types)
- if getattr(obj, attr) is not None}
-
- return {key: self.sanitize_for_serialization(val)
- for key, val in six.iteritems(obj_dict)}
-
- def deserialize(self, response, response_type):
- """Deserializes response into an object.
-
- :param response: RESTResponse object to be deserialized.
- :param response_type: class literal for
- deserialized object, or string of class name.
-
- :return: deserialized object.
- """
- # handle file downloading
- # save response body into a tmp file and return the instance
- if response_type == "file":
- return self.__deserialize_file(response)
-
- # fetch data from response object
- try:
- data = json.loads(response.data)
- except ValueError:
- data = response.data
-
- return self.__deserialize(data, response_type)
-
- def __deserialize(self, data, klass):
- """Deserializes dict, list, str into an object.
-
- :param data: dict, list or str.
- :param klass: class literal, or string of class name.
-
- :return: object.
- """
- if data is None:
- return None
-
- if type(klass) == str:
- if klass.startswith('list['):
- sub_kls = re.match(r'list\[(.*)\]', klass).group(1)
- return [self.__deserialize(sub_data, sub_kls)
- for sub_data in data]
-
- if klass.startswith('dict('):
- sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2)
- return {k: self.__deserialize(v, sub_kls)
- for k, v in six.iteritems(data)}
-
- # convert str to class
- if klass in self.NATIVE_TYPES_MAPPING:
- klass = self.NATIVE_TYPES_MAPPING[klass]
- else:
- klass = getattr({{modelPackage}}, klass)
-
- if klass in self.PRIMITIVE_TYPES:
- return self.__deserialize_primitive(data, klass)
- elif klass == object:
- return self.__deserialize_object(data)
- elif klass == datetime.date:
- return self.__deserialize_date(data)
- elif klass == datetime.datetime:
- return self.__deserialize_datatime(data)
- else:
- return self.__deserialize_model(data, klass)
-
- def call_api(self, resource_path, method,
- path_params=None, query_params=None, header_params=None,
- body=None, post_params=None, files=None,
- response_type=None, auth_settings=None, async_req=None,
- _return_http_data_only=None, collection_formats=None,
- _preload_content=True, _request_timeout=None, urlopen_kw=None):
- """Make the HTTP request (synchronous) and Return deserialized data.
-
- To make an async_req request, set the async_req parameter.
-
- :param resource_path: Path to method endpoint.
- :param method: Method to call.
- :param path_params: Path parameters in the url.
- :param query_params: Query parameters in the url.
- :param header_params: Header parameters to be
- placed in the request header.
- :param body: Request body.
- :param post_params dict: Request post form parameters,
- for `application/x-www-form-urlencoded`, `multipart/form-data`.
- :param auth_settings list: Auth Settings names for the request.
- :param response: Response data type.
- :param files dict: key -> filename, value -> filepath,
- for `multipart/form-data`.
- :param async_req bool: execute request asynchronously
- :param _return_http_data_only: response data without head status code
- and headers
- :param collection_formats: dict of collection formats for path, query,
- header, and post parameters.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param urlopen_kw: Additional parameters are passed to
- :meth:`urllib3.request.RequestMethods.request`
- :return:
- If async_req parameter is True,
- the request will be called asynchronously.
- The method will return the request thread.
- If parameter async_req is False or missing,
- then the method will return the response directly.
- """
- if not async_req:
- return self.__call_api(resource_path, method,
- path_params, query_params, header_params,
- body, post_params, files,
- response_type, auth_settings,
- _return_http_data_only, collection_formats,
- _preload_content, _request_timeout, urlopen_kw)
- else:
- thread = self.pool.apply_async(self.__call_api, (resource_path,
- method, path_params, query_params,
- header_params, body,
- post_params, files,
- response_type, auth_settings,
- _return_http_data_only,
- collection_formats,
- _preload_content, _request_timeout, urlopen_kw))
- return thread
-
- def request(self, method, url, query_params=None, headers=None,
- post_params=None, body=None, _preload_content=True,
- _request_timeout=None, **urlopen_kw):
- """Make the HTTP request using RESTClient."""
- if method == "GET":
- return self.rest_client.GET(url,
- query_params=query_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- headers=headers,
- **urlopen_kw)
- elif method == "HEAD":
- return self.rest_client.HEAD(url,
- query_params=query_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- headers=headers,
- **urlopen_kw)
- elif method == "OPTIONS":
- return self.rest_client.OPTIONS(url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- **urlopen_kw)
- elif method == "POST":
- return self.rest_client.POST(url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- **urlopen_kw)
- elif method == "PUT":
- return self.rest_client.PUT(url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- **urlopen_kw)
- elif method == "PATCH":
- return self.rest_client.PATCH(url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- **urlopen_kw)
- elif method == "DELETE":
- return self.rest_client.DELETE(url,
- query_params=query_params,
- headers=headers,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- **urlopen_kw)
- else:
- raise ValueError(
- "http method must be `GET`, `HEAD`, `OPTIONS`,"
- " `POST`, `PATCH`, `PUT` or `DELETE`."
- )
-
- def parameters_to_tuples(self, params, collection_formats):
- """Get parameters as list of tuples, formatting collections.
-
- :param params: Parameters as dict or list of two-tuples
- :param dict collection_formats: Parameter collection formats
- :return: Parameters as list of tuples, collections formatted
- """
- new_params = []
- if collection_formats is None:
- collection_formats = {}
- for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501
- if k in collection_formats:
- collection_format = collection_formats[k]
- if collection_format == 'multi':
- new_params.extend((k, value) for value in v)
- else:
- if collection_format == 'ssv':
- delimiter = ' '
- elif collection_format == 'tsv':
- delimiter = '\t'
- elif collection_format == 'pipes':
- delimiter = '|'
- else: # csv is the default
- delimiter = ','
- new_params.append(
- (k, delimiter.join(str(value) for value in v)))
- else:
- new_params.append((k, v))
- return new_params
-
- def prepare_post_parameters(self, post_params=None, files=None):
- """Build form parameters.
-
- :param post_params: Normal form parameters.
- :param files: File parameters.
- :return: Form parameters with files.
- """
- params = []
-
- if post_params:
- params = post_params
-
- if files:
- for k, v in six.iteritems(files):
- if not v:
- continue
- file_names = v if type(v) is list else [v]
- for n in file_names:
- with open(n, 'rb') as f:
- filename = os.path.basename(f.name)
- filedata = f.read()
- mimetype = (mimetypes.guess_type(filename)[0] or
- 'application/octet-stream')
- params.append(
- tuple([k, tuple([filename, filedata, mimetype])]))
-
- return params
-
- def select_header_accept(self, accepts):
- """Return `Accept` based on an array of accepts provided.
-
- :param accepts: List of headers.
- :return: Accept (e.g. application/json).
- """
- if not accepts:
- return
-
- accepts = [x.lower() for x in accepts]
-
- if 'application/json' in accepts:
- return 'application/json'
- else:
- return ', '.join(accepts)
-
- def select_header_content_type(self, content_types):
- """Return `Content-Type` based on an array of content_types provided.
-
- :param content_types: List of content-types.
- :return: Content-Type (e.g. application/json).
- """
- if not content_types:
- return 'application/json'
-
- content_types = [x.lower() for x in content_types]
-
- if 'application/json' in content_types or '*/*' in content_types:
- return 'application/json'
- else:
- return content_types[0]
-
- def update_params_for_auth(self, headers, querys, auth_settings):
- """Update header and query params based on authentication setting.
-
- :param headers: Header parameters dict to be updated.
- :param querys: Query parameters tuple list to be updated.
- :param auth_settings: Authentication setting identifiers list.
- """
- if not auth_settings:
- return
-
- for auth in auth_settings:
- auth_setting = self.configuration.auth_settings().get(auth)
- if auth_setting:
- if not auth_setting['value']:
- continue
- elif auth_setting['in'] == 'header':
- headers[auth_setting['key']] = auth_setting['value']
- elif auth_setting['in'] == 'query':
- querys.append((auth_setting['key'], auth_setting['value']))
- else:
- raise ValueError(
- 'Authentication token must be in `query` or `header`'
- )
-
- def __deserialize_file(self, response):
- """Deserializes body to file.
-
- Saves response body into a file in a temporary folder,
- using the filename from the `Content-Disposition` header if provided.
-
- :param response: RESTResponse.
- :return: file path.
- """
- fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path)
- os.close(fd)
- os.remove(path)
-
- content_disposition = response.getheader("Content-Disposition")
- if content_disposition:
- filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?',
- content_disposition).group(1)
- path = os.path.join(os.path.dirname(path), filename)
-
- with open(path, "wb") as f:
- f.write(response.data)
-
- return path
-
- def __deserialize_primitive(self, data, klass):
- """Deserializes string to primitive type.
-
- :param data: str.
- :param klass: class literal.
-
- :return: int, long, float, str, bool.
- """
- try:
- return klass(data)
- except UnicodeEncodeError:
- return six.text_type(data)
- except TypeError:
- return data
-
- def __deserialize_object(self, value):
- """Return an original value.
-
- :return: object.
- """
- return value
-
- def __deserialize_date(self, string):
- """Deserializes string to date.
-
- :param string: str.
- :return: date.
- """
- try:
- from dateutil.parser import parse
- return parse(string).date()
- except ImportError:
- return string
- except ValueError:
- raise rest.ApiException(
- status=0,
- reason="Failed to parse `{0}` as date object".format(string)
- )
-
- def __deserialize_datatime(self, string):
- """Deserializes string to datetime.
-
- The string should be in iso8601 datetime format.
-
- :param string: str.
- :return: datetime.
- """
- try:
- from dateutil.parser import parse
- return parse(string)
- except ImportError:
- return string
- except ValueError:
- raise rest.ApiException(
- status=0,
- reason=(
- "Failed to parse `{0}` as datetime object"
- .format(string)
- )
- )
-
- def __deserialize_model(self, data, klass):
- """Deserializes list or dict to model.
-
- :param data: dict, list.
- :param klass: class literal.
- :return: model object.
- """
- if not klass.openapi_types and not hasattr(klass,
- 'get_real_child_model'):
- return data
-
- kwargs = {}
- if klass.openapi_types is not None:
- for attr, attr_type in six.iteritems(klass.openapi_types):
- if (data is not None and
- klass.attribute_map[attr] in data and
- isinstance(data, (list, dict))):
- value = data[klass.attribute_map[attr]]
- kwargs[attr] = self.__deserialize(value, attr_type)
-
- instance = klass(**kwargs)
-
- if hasattr(instance, 'get_real_child_model'):
- klass_name = instance.get_real_child_model(data)
- if klass_name:
- instance = self.__deserialize(data, klass_name)
- return instance
diff --git a/openapi-generator/src/main/resources/python/configuration.mustache b/openapi-generator/src/main/resources/python/configuration.mustache
deleted file mode 100644
index db22e92d..00000000
--- a/openapi-generator/src/main/resources/python/configuration.mustache
+++ /dev/null
@@ -1,275 +0,0 @@
-# coding: utf-8
-
-{{>partial_header}}
-
-from __future__ import absolute_import
-
-import copy
-import logging
-import multiprocessing
-import sys
-import urllib3
-
-import six
-from six.moves import http_client as httplib
-
-
-class TypeWithDefault(type):
- """NOTE: This class is auto generated by OpenAPI Generator.
-
- Ref: https://openapi-generator.tech
- Do not edit the class manually.
- """
-
- def __init__(cls, name, bases, dct):
- """Initialize with defaults."""
- super(TypeWithDefault, cls).__init__(name, bases, dct)
- cls._default = None
-
- def __call__(cls):
- """Call self as a function."""
- if cls._default is None:
- cls._default = type.__call__(cls)
- return copy.copy(cls._default)
-
- def set_default(cls, default):
- """Set dafaults."""
- cls._default = copy.copy(default)
-
-
-class Configuration(six.with_metaclass(TypeWithDefault, object)):
- """NOTE: This class is auto generated by OpenAPI Generator.
-
- Ref: https://openapi-generator.tech
- Do not edit the class manually.
- """
-
- def __init__(self):
- """Initialize configuration."""
- # Default Base url
- self.host = "{{{basePath}}}"
- # Temp file folder for downloading files
- self.temp_folder_path = None
-
- # Authentication Settings
- # dict to store API key(s)
- self.api_key = {}
- # dict to store API prefix (e.g. Bearer)
- self.api_key_prefix = {}
- # Username for HTTP basic authentication
- self.username = ""
- # Password for HTTP basic authentication
- self.password = ""
-{{#authMethods}}{{#isOAuth}}
- # access token for OAuth
- self.access_token = ""
-{{/isOAuth}}{{/authMethods}}
- # Logging Settings
- self.logger = {}
- self.logger["package_logger"] = logging.getLogger("{{packageName}}")
- self.logger["urllib3_logger"] = logging.getLogger("urllib3")
- # Log format
- self.logger_format = '%(asctime)s %(levelname)s %(message)s'
- # Log stream handler
- self.logger_stream_handler = None
- # Log file handler
- self.logger_file_handler = None
- # Debug file location
- self.logger_file = None
- # Debug switch
- self.debug = False
-
- # SSL/TLS verification
- # Set this to false to skip verifying SSL certificate when calling API
- # from https server.
- self.verify_ssl = True
- # Set this to customize the certificate file to verify the peer.
- self.ssl_ca_cert = None
- # client certificate file
- self.cert_file = None
- # client key file
- self.key_file = None
- # Set this to True/False to enable/disable SSL hostname verification.
- self.assert_hostname = None
-
- # urllib3 connection pool's maximum number of connections saved
- # per pool. urllib3 uses 1 connection as default value, but this is
- # not the best value when you are making a lot of possibly parallel
- # requests to the same host, which is often the case here.
- # cpu_count * 5 is used as default value to increase performance.
- self.connection_pool_maxsize = multiprocessing.cpu_count() * 5
-
- # Proxy URL
- self.proxy = None
- # Safe chars for path_param
- self.safe_chars_for_path_param = ''
-
- @property
- def logger_file(self):
- """Logger file.
-
- If the logger_file is None, then add stream handler and remove file
- handler. Otherwise, add file handler and remove stream handler.
-
- :param value: The logger_file path.
- :type: str
- """
- return self.__logger_file
-
- @logger_file.setter
- def logger_file(self, value):
- """Logger file.
-
- If the logger_file is None, then add stream handler and remove file
- handler. Otherwise, add file handler and remove stream handler.
-
- :param value: The logger_file path.
- :type: str
- """
- self.__logger_file = value
- if self.__logger_file:
- # If set logging file,
- # then add file handler and remove stream handler.
- self.logger_file_handler = logging.FileHandler(self.__logger_file)
- self.logger_file_handler.setFormatter(self.logger_formatter)
- for _, logger in six.iteritems(self.logger):
- logger.addHandler(self.logger_file_handler)
-
- @property
- def debug(self):
- """Debug status.
-
- :param value: The debug status, True or False.
- :type: bool
- """
- return self.__debug
-
- @debug.setter
- def debug(self, value):
- """Debug status.
-
- :param value: The debug status, True or False.
- :type: bool
- """
- self.__debug = value
- if self.__debug:
- # if debug status is True, turn on debug logging
- for _, logger in six.iteritems(self.logger):
- logger.setLevel(logging.DEBUG)
- # turn on httplib debug
- httplib.HTTPConnection.debuglevel = 1
- else:
- # if debug status is False, turn off debug logging,
- # setting log level to default `logging.WARNING`
- for _, logger in six.iteritems(self.logger):
- logger.setLevel(logging.WARNING)
- # turn off httplib debug
- httplib.HTTPConnection.debuglevel = 0
-
- @property
- def logger_format(self):
- """Logger format.
-
- The logger_formatter will be updated when sets logger_format.
-
- :param value: The format string.
- :type: str
- """
- return self.__logger_format
-
- @logger_format.setter
- def logger_format(self, value):
- """Logger format.
-
- The logger_formatter will be updated when sets logger_format.
-
- :param value: The format string.
- :type: str
- """
- self.__logger_format = value
- self.logger_formatter = logging.Formatter(self.__logger_format)
-
- def get_api_key_with_prefix(self, identifier):
- """Get API key (with prefix if set).
-
- :param identifier: The identifier of apiKey.
- :return: The token for api key authentication.
- """
- if (self.api_key.get(identifier) and
- self.api_key_prefix.get(identifier)):
- return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] # noqa: E501
- elif self.api_key.get(identifier):
- return self.api_key[identifier]
-
- def get_basic_auth_token(self):
- """Get HTTP basic authentication header (string).
-
- :return: The token for basic HTTP authentication.
- """
- return urllib3.util.make_headers(
- basic_auth=self.username + ':' + self.password
- ).get('authorization')
-
- def auth_settings(self):
- """Get Auth Settings dict for api client.
-
- :return: The Auth Settings information dict.
- """
- return {
-{{#authMethods}}
-{{#isApiKey}}
- '{{name}}':
- {
- 'type': 'api_key',
- 'in': {{#isKeyInHeader}}'header'{{/isKeyInHeader}}{{#isKeyInQuery}}'query'{{/isKeyInQuery}},
- 'key': '{{keyParamName}}',
- 'value': self.get_api_key_with_prefix('{{keyParamName}}')
- },
-{{/isApiKey}}
-{{#isBasic}}
- '{{name}}':
- {
- 'type': 'basic',
- 'in': 'header',
- 'key': 'Authorization',
- 'value': self.get_basic_auth_token()
- },
-{{/isBasic}}{{#isOAuth}}
- '{{name}}':
- {
- 'type': 'oauth2',
- 'in': 'header',
- 'key': 'Authorization',
- 'value': 'Bearer ' + self.access_token
- },
-{{/isOAuth}}{{/authMethods}}
- }
-
- def to_debug_report(self):
- """Get the essential information for debugging.
-
- :return: The report for debugging.
- """
- return "Python SDK Debug Report:\n"\
- "OS: {env}\n"\
- "Python Version: {pyversion}\n"\
- "Version of the API: {{version}}\n"\
- "SDK Package Version: {{packageVersion}}".\
- format(env=sys.platform, pyversion=sys.version)
-
- def update_request_header_params(self, path: str, params: dict):
- """Update header params based on custom settings.
-
- :param path: Resource path
- :param params: Header parameters dict to be updated.
- """
- pass
-
- def update_request_body(self, path: str, body):
- """Update http body based on custom settings.
-
- :param path: Resource path
- :param body: Request body to be updated.
- :return: Updated body
- """
- return body
diff --git a/openapi-generator/src/main/resources/python/model.mustache b/openapi-generator/src/main/resources/python/model.mustache
deleted file mode 100644
index daa904df..00000000
--- a/openapi-generator/src/main/resources/python/model.mustache
+++ /dev/null
@@ -1,231 +0,0 @@
-# coding: utf-8
-
-{{>partial_header}}
-
-import pprint
-import re # noqa: F401
-
-import six
-{{#models}}
-{{#model}}
-{{#parent}}
-from influxdb_client.domain.{{{vendorExtensions.x-parent-classFilename}}} import {{{parent}}}
-{{/parent}}
-{{/model}}
-{{/models}}
-
-
-{{#models}}
-{{#model}}
-class {{classname}}({{#parent}}{{{parent}}}{{/parent}}{{^parent}}object{{/parent}}):
- """NOTE: This class is auto generated by OpenAPI Generator.
-
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """{{#allowableValues}}
-
- """
- allowed enum values
- """
-{{#enumVars}}
- {{name}} = {{{value}}}{{^-last}}
-{{/-last}}
-{{/enumVars}}{{/allowableValues}}
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
-{{#vars}}
- '{{name}}': '{{{dataType}}}'{{#hasMore}},{{/hasMore}}{{^hasMore}}{{#model.vendorExtensions.x-has-parent-vars}},{{/model.vendorExtensions.x-has-parent-vars}}{{/hasMore}}
-{{/vars}}
-{{#vendorExtensions.x-parent-vars}}
- '{{name}}': '{{{dataType}}}'{{#hasMore}},{{/hasMore}}
-{{/vendorExtensions.x-parent-vars}}
- }
-
- attribute_map = {
-{{#vars}}
- '{{name}}': '{{baseName}}'{{#hasMore}},{{/hasMore}}{{^hasMore}}{{#model.vendorExtensions.x-has-parent-vars}},{{/model.vendorExtensions.x-has-parent-vars}}{{/hasMore}}
-{{/vars}}
-{{#vendorExtensions.x-parent-vars}}
- '{{name}}': '{{baseName}}'{{#hasMore}},{{/hasMore}}
-{{/vendorExtensions.x-parent-vars}}
- }
-{{#discriminator}}
-
- discriminator_value_class_map = {
- {{#children}}'{{^vendorExtensions.x-discriminator-value}}{{name}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}': '{{{classname}}}'{{^-last}},
- {{/-last}}{{/children}}
- }
-{{/discriminator}}
-
- def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}{{#vendorExtensions.x-parent-vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vendorExtensions.x-parent-vars}}): # noqa: E501,D401,D403
- """{{classname}} - a model defined in OpenAPI.""" # noqa: E501{{#parent}}
- {{{parent}}}.__init__(self{{#vendorExtensions.x-parent-vars}}, {{name}}={{name}}{{/vendorExtensions.x-parent-vars}}) # noqa: E501
-{{/parent}}
-{{#vars}}{{#-first}}
-{{/-first}}
- self._{{name}} = None
-{{/vars}}
- self.discriminator = {{#discriminator}}'{{{discriminatorName}}}'{{/discriminator}}{{^discriminator}}None{{/discriminator}}
-{{#vars}}{{#-first}}
-{{/-first}}
-{{#required}}
- self.{{name}} = {{name}}
-{{/required}}
-{{^required}}
-{{#isNullable}}
- self.{{name}} = {{name}}
-{{/isNullable}}
-{{^isNullable}}
- if {{name}} is not None:
- self.{{name}} = {{name}}
-{{/isNullable}}
-{{/required}}
-{{/vars}}
-
-{{#vars}}
- @property
- def {{name}}(self):
- """Get the {{name}} of this {{classname}}.
-{{#description}}
-
- {{{description}}}
-{{/description}}
-
- :return: The {{name}} of this {{classname}}.
- :rtype: {{dataType}}
- """ # noqa: E501
- return self._{{name}}
-
- @{{name}}.setter
- def {{name}}(self, {{name}}):
- """Set the {{name}} of this {{classname}}.
-{{#description}}
-
- {{{description}}}
-{{/description}}
-
- :param {{name}}: The {{name}} of this {{classname}}.
- :type: {{dataType}}
- """ # noqa: E501
-{{^isNullable}}
-{{#required}}
- if {{name}} is None:
- raise ValueError("Invalid value for `{{name}}`, must not be `None`") # noqa: E501
-{{/required}}
-{{/isNullable}}
-{{#isEnum}}
-{{#isContainer}}
- allowed_values = [{{#isNullable}}None,{{/isNullable}}{{#allowableValues}}{{#values}}{{#items.isString}}"{{/items.isString}}{{{this}}}{{#items.isString}}"{{/items.isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501
-{{#isListContainer}}
- if not set({{{name}}}).issubset(set(allowed_values)):
- raise ValueError(
- "Invalid values for `{{{name}}}` [{0}], must be a subset of [{1}]" # noqa: E501
- .format(", ".join(map(str, set({{{name}}}) - set(allowed_values))), # noqa: E501
- ", ".join(map(str, allowed_values)))
- )
-{{/isListContainer}}
-{{#isMapContainer}}
- if not set({{{name}}}.keys()).issubset(set(allowed_values)):
- raise ValueError(
- "Invalid keys in `{{{name}}}` [{0}], must be a subset of [{1}]" # noqa: E501
- .format(", ".join(map(str, set({{{name}}}.keys()) - set(allowed_values))), # noqa: E501
- ", ".join(map(str, allowed_values)))
- )
-{{/isMapContainer}}
-{{/isContainer}}
-{{/isEnum}}
-{{^isEnum}}
-{{#hasValidation}}
-{{#maxLength}}
- if {{name}} is not None and len({{name}}) > {{maxLength}}:
- raise ValueError("Invalid value for `{{name}}`, length must be less than or equal to `{{maxLength}}`") # noqa: E501
-{{/maxLength}}
-{{#minLength}}
- if {{name}} is not None and len({{name}}) < {{minLength}}:
- raise ValueError("Invalid value for `{{name}}`, length must be greater than or equal to `{{minLength}}`") # noqa: E501
-{{/minLength}}
-{{#maximum}}
- if {{name}} is not None and {{name}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}}: # noqa: E501
- raise ValueError("Invalid value for `{{name}}`, must be a value less than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}`{{maximum}}`") # noqa: E501
-{{/maximum}}
-{{#minimum}}
- if {{name}} is not None and {{name}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}}: # noqa: E501
- raise ValueError("Invalid value for `{{name}}`, must be a value greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}`{{minimum}}`") # noqa: E501
-{{/minimum}}
-{{#pattern}}
- if {{name}} is not None and not re.search(r'{{{vendorExtensions.x-regex}}}', {{name}}{{#vendorExtensions.x-modifiers}}{{#-first}}, flags={{/-first}}re.{{.}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}): # noqa: E501
- raise ValueError(r"Invalid value for `{{name}}`, must be a follow pattern or equal to `{{{pattern}}}`") # noqa: E501
-{{/pattern}}
-{{#maxItems}}
- if {{name}} is not None and len({{name}}) > {{maxItems}}:
- raise ValueError("Invalid value for `{{name}}`, number of items must be less than or equal to `{{maxItems}}`") # noqa: E501
-{{/maxItems}}
-{{#minItems}}
- if {{name}} is not None and len({{name}}) < {{minItems}}:
- raise ValueError("Invalid value for `{{name}}`, number of items must be greater than or equal to `{{minItems}}`") # noqa: E501
-{{/minItems}}
-{{/hasValidation}}
-{{/isEnum}}
- self._{{name}} = {{name}}
-
-{{/vars}}
-{{#discriminator}}
- def get_real_child_model(self, data):
- """Return the real base class specified by the discriminator."""
- discriminator_key = self.attribute_map[self.discriminator]
- discriminator_value = data[discriminator_key]
- return self.discriminator_value_class_map.get(discriminator_value)
-
-{{/discriminator}}
- def to_dict(self):
- """Return the model properties as a dict."""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value
- ))
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict") else item,
- value.items()
- ))
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Return the string representation of the model."""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`."""
- return self.to_str()
-
- def __eq__(self, other):
- """Return true if both objects are equal."""
- if not isinstance(other, {{classname}}):
- return False
-
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- """Return true if both objects are not equal."""
- return not self == other
-{{/model}}
-{{/models}}
diff --git a/openapi-generator/src/main/resources/python/partial_header.mustache b/openapi-generator/src/main/resources/python/partial_header.mustache
deleted file mode 100644
index 93c95dd9..00000000
--- a/openapi-generator/src/main/resources/python/partial_header.mustache
+++ /dev/null
@@ -1,17 +0,0 @@
-"""
-{{#appName}}
-{{{appName}}}.
-{{/appName}}
-
-{{#appDescription}}
-{{{appDescription}}} # noqa: E501
-{{/appDescription}}
-
-{{#version}}
-OpenAPI spec version: {{{version}}}
-{{/version}}
-{{#infoEmail}}
-Contact: {{{infoEmail}}}
-{{/infoEmail}}
-Generated by: https://openapi-generator.tech
-"""
diff --git a/openapi-generator/src/main/resources/python/rest.mustache b/openapi-generator/src/main/resources/python/rest.mustache
deleted file mode 100644
index 82422a20..00000000
--- a/openapi-generator/src/main/resources/python/rest.mustache
+++ /dev/null
@@ -1,372 +0,0 @@
-# coding: utf-8
-
-{{>partial_header}}
-
-from __future__ import absolute_import
-
-import io
-import json
-import logging
-import re
-import ssl
-
-import certifi
-# python 2 and python 3 compatibility library
-import six
-from six.moves.urllib.parse import urlencode
-
-try:
- import urllib3
-except ImportError:
- raise ImportError('OpenAPI Python client requires urllib3.')
-
-
-logger = logging.getLogger(__name__)
-
-
-class RESTResponse(io.IOBase):
- """NOTE: This class is auto generated by OpenAPI Generator.
-
- Ref: https://openapi-generator.tech
- Do not edit the class manually.
- """
-
- def __init__(self, resp):
- """Initialize with HTTP response."""
- self.urllib3_response = resp
- self.status = resp.status
- self.reason = resp.reason
- self.data = resp.data
-
- def getheaders(self):
- """Return a dictionary of the response headers."""
- return self.urllib3_response.getheaders()
-
- def getheader(self, name, default=None):
- """Return a given response header."""
- return self.urllib3_response.getheader(name, default)
-
-
-class RESTClientObject(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
-
- Ref: https://openapi-generator.tech
- Do not edit the class manually.
- """
-
- def __init__(self, configuration, pools_size=4, maxsize=None, retries=False):
- """Initialize REST client."""
- # urllib3.PoolManager will pass all kw parameters to connectionpool
- # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
- # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501
- # maxsize is the number of requests to host that are allowed in parallel # noqa: E501
- # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501
-
- self.configuration = configuration
- self.pools_size = pools_size
- self.maxsize = maxsize
- self.retries = retries
-
- # cert_reqs
- if configuration.verify_ssl:
- cert_reqs = ssl.CERT_REQUIRED
- else:
- cert_reqs = ssl.CERT_NONE
-
- # ca_certs
- if configuration.ssl_ca_cert:
- ca_certs = configuration.ssl_ca_cert
- else:
- # if not set certificate file, use Mozilla's root certificates.
- ca_certs = certifi.where()
-
- addition_pool_args = {}
- if configuration.assert_hostname is not None:
- addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501
- addition_pool_args['retries'] = self.retries
-
- if maxsize is None:
- if configuration.connection_pool_maxsize is not None:
- maxsize = configuration.connection_pool_maxsize
- else:
- maxsize = 4
-
- # https pool manager
- if configuration.proxy:
- self.pool_manager = urllib3.ProxyManager(
- num_pools=pools_size,
- maxsize=maxsize,
- cert_reqs=cert_reqs,
- ca_certs=ca_certs,
- cert_file=configuration.cert_file,
- key_file=configuration.key_file,
- proxy_url=configuration.proxy,
- **addition_pool_args
- )
- else:
- self.pool_manager = urllib3.PoolManager(
- num_pools=pools_size,
- maxsize=maxsize,
- cert_reqs=cert_reqs,
- ca_certs=ca_certs,
- cert_file=configuration.cert_file,
- key_file=configuration.key_file,
- **addition_pool_args
- )
-
- def request(self, method, url, query_params=None, headers=None,
- body=None, post_params=None, _preload_content=True,
- _request_timeout=None, **urlopen_kw):
- """Perform requests.
-
- :param method: http request method
- :param url: http request url
- :param query_params: query parameters in the url
- :param headers: http request headers
- :param body: request json body, for `application/json`
- :param post_params: request post parameters,
- `application/x-www-form-urlencoded`
- and `multipart/form-data`
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param urlopen_kw: Additional parameters are passed to
- :meth:`urllib3.request.RequestMethods.request`
- """
- method = method.upper()
- assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT',
- 'PATCH', 'OPTIONS']
-
- if post_params and body:
- raise ValueError(
- "body parameter cannot be used with post_params parameter."
- )
-
- post_params = post_params or {}
- headers = headers or {}
-
- timeout = None
- if _request_timeout:
- if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821
- timeout = urllib3.Timeout(total=_request_timeout)
- elif (isinstance(_request_timeout, tuple) and
- len(_request_timeout) == 2):
- timeout = urllib3.Timeout(
- connect=_request_timeout[0], read=_request_timeout[1])
-
- if 'Content-Type' not in headers:
- headers['Content-Type'] = 'application/json'
-
- try:
- # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`
- if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']:
- if query_params:
- url += '?' + urlencode(query_params)
- if re.search('json', headers['Content-Type'], re.IGNORECASE):
- request_body = None
- if body is not None:
- request_body = json.dumps(body)
- r = self.pool_manager.request(
- method, url,
- body=request_body,
- preload_content=_preload_content,
- timeout=timeout,
- headers=headers,
- **urlopen_kw)
- elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501
- r = self.pool_manager.request(
- method, url,
- fields=post_params,
- encode_multipart=False,
- preload_content=_preload_content,
- timeout=timeout,
- headers=headers,
- **urlopen_kw)
- elif headers['Content-Type'] == 'multipart/form-data':
- # must del headers['Content-Type'], or the correct
- # Content-Type which generated by urllib3 will be
- # overwritten.
- del headers['Content-Type']
- r = self.pool_manager.request(
- method, url,
- fields=post_params,
- encode_multipart=True,
- preload_content=_preload_content,
- timeout=timeout,
- headers=headers,
- **urlopen_kw)
- # Pass a `string` parameter directly in the body to support
- # other content types than Json when `body` argument is
- # provided in serialized form
- elif isinstance(body, str) or isinstance(body, bytes):
- request_body = body
- r = self.pool_manager.request(
- method, url,
- body=request_body,
- preload_content=_preload_content,
- timeout=timeout,
- headers=headers,
- **urlopen_kw)
- else:
- # Cannot generate the request from given parameters
- msg = """Cannot prepare a request message for provided
- arguments. Please check that your arguments match
- declared content type."""
- raise ApiException(status=0, reason=msg)
- # For `GET`, `HEAD`
- else:
- r = self.pool_manager.request(method, url,
- fields=query_params,
- preload_content=_preload_content,
- timeout=timeout,
- headers=headers,
- **urlopen_kw)
- except urllib3.exceptions.SSLError as e:
- msg = "{0}\n{1}".format(type(e).__name__, str(e))
- raise ApiException(status=0, reason=msg)
-
- if _preload_content:
- r = RESTResponse(r)
-
- # In the python 3, the response.data is bytes.
- # we need to decode it to string.
- if six.PY3:
- r.data = r.data.decode('utf8')
-
- # log response body
- logger.debug("response body: %s", r.data)
-
- if not 200 <= r.status <= 299:
- raise ApiException(http_resp=r)
-
- return r
-
- def GET(self, url, headers=None, query_params=None, _preload_content=True,
- _request_timeout=None, **urlopen_kw):
- """Perform GET HTTP request."""
- return self.request("GET", url,
- headers=headers,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- query_params=query_params,
- **urlopen_kw)
-
- def HEAD(self, url, headers=None, query_params=None, _preload_content=True,
- _request_timeout=None, **urlopen_kw):
- """Perform HEAD HTTP request."""
- return self.request("HEAD", url,
- headers=headers,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- query_params=query_params,
- **urlopen_kw)
-
- def OPTIONS(self, url, headers=None, query_params=None, post_params=None,
- body=None, _preload_content=True, _request_timeout=None, **urlopen_kw):
- """Perform OPTIONS HTTP request."""
- return self.request("OPTIONS", url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- **urlopen_kw)
-
- def DELETE(self, url, headers=None, query_params=None, body=None,
- _preload_content=True, _request_timeout=None, **urlopen_kw):
- """Perform DELETE HTTP request."""
- return self.request("DELETE", url,
- headers=headers,
- query_params=query_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- **urlopen_kw)
-
- def POST(self, url, headers=None, query_params=None, post_params=None,
- body=None, _preload_content=True, _request_timeout=None, **urlopen_kw):
- """Perform POST HTTP request."""
- return self.request("POST", url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- **urlopen_kw)
-
- def PUT(self, url, headers=None, query_params=None, post_params=None,
- body=None, _preload_content=True, _request_timeout=None, **urlopen_kw):
- """Perform PUT HTTP request."""
- return self.request("PUT", url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- **urlopen_kw)
-
- def PATCH(self, url, headers=None, query_params=None, post_params=None,
- body=None, _preload_content=True, _request_timeout=None, **urlopen_kw):
- """Perform PATCH HTTP request."""
- return self.request("PATCH", url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- **urlopen_kw)
-
- def __getstate__(self):
- """Return a dict of attributes that you want to pickle."""
- state = self.__dict__.copy()
- # Remove Pool managaer
- del state['pool_manager']
- return state
-
- def __setstate__(self, state):
- """Set your object with the provided dict."""
- self.__dict__.update(state)
- # Init Pool manager
- self.__init__(self.configuration, self.pools_size, self.maxsize, self.retries)
-
-
-class ApiException(Exception):
- """NOTE: This class is auto generated by OpenAPI Generator.
-
- Ref: https://openapi-generator.tech
- Do not edit the class manually.
- """
-
- def __init__(self, status=None, reason=None, http_resp=None):
- """Initialize with HTTP response."""
- if http_resp:
- self.status = http_resp.status
- self.reason = http_resp.reason
- self.body = http_resp.data
- self.headers = http_resp.getheaders()
- else:
- self.status = status
- self.reason = reason
- self.body = None
- self.headers = None
-
- def __str__(self):
- """Get custom error messages for exception."""
- error_message = "({0})\n"\
- "Reason: {1}\n".format(self.status, self.reason)
- if self.headers:
- error_message += "HTTP response headers: {0}\n".format(
- self.headers)
-
- if self.body:
- error_message += "HTTP response body: {0}\n".format(self.body)
-
- return error_message
diff --git a/scripts/generate-sources.sh b/scripts/generate-sources.sh
deleted file mode 100755
index 91a2c76a..00000000
--- a/scripts/generate-sources.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-
-#!/usr/bin/env bash
-
-SCRIPT_PATH="$( cd "$(dirname "$0")" || exit ; pwd -P )"
-
-# Generate OpenAPI generator
-cd "${SCRIPT_PATH}"/../openapi-generator/ || exit
-mvn clean install -DskipTests
-
-# delete old sources
-rm "${SCRIPT_PATH}"/../influxdb_client/domain/*.py
-rm "${SCRIPT_PATH}"/../influxdb_client/service/*.py
-
-# Generate client
-cd "${SCRIPT_PATH}"/ || exit
-mvn org.openapitools:openapi-generator-maven-plugin:generate
-
-cp "${SCRIPT_PATH}"/../influxdb_client/service/__init__.py "${SCRIPT_PATH}"/../influxdb_client/client/
-cp "${SCRIPT_PATH}"/../influxdb_client/service/__init__.py "${SCRIPT_PATH}"/../influxdb_client/client/write/
-cp "${SCRIPT_PATH}"/../influxdb_client/service/__init__.py "${SCRIPT_PATH}"/../tests/
\ No newline at end of file
diff --git a/scripts/pom.xml b/scripts/pom.xml
deleted file mode 100644
index 753ff1ff..00000000
--- a/scripts/pom.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
- 4.0.0
- org.influxdata
- influxdb-client-python
- jar
- 1.0-SNAPSHOT
- influxdb-client-python
-
- urllib3
-
-
-
-
- org.openapitools
- openapi-generator-maven-plugin
- 3.3.4
-
- ${project.basedir}/swagger.yml
- influx-python
-
- optionalProjectFile=true
- true
- influxdb_client
- /
- false
- 1.10.0dev
-
- false
- false
- true
- false
- true
- false
- false
-
- false
- ${library}
-
-
-
- org.influxdata
- openapi-generator
- 1.0.0
-
-
-
-
-
-
diff --git a/scripts/swagger.yml b/scripts/swagger.yml
deleted file mode 100644
index 0438698c..00000000
--- a/scripts/swagger.yml
+++ /dev/null
@@ -1,10057 +0,0 @@
-openapi: "3.0.0"
-info:
- title: Influx API Service
- version: 0.1.0
-servers:
- - url: /api/v2
-paths:
- /signin:
- post:
- operationId: PostSignin
- summary: Exchange basic auth credentials for session
- security:
- - BasicAuth: []
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- responses:
- "204":
- description: Successfully authenticated
- "401":
- description: Unauthorized access
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "403":
- description: user account is disabled
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unsuccessful authentication
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /signout:
- post:
- operationId: PostSignout
- summary: Expire the current session
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- responses:
- "204":
- description: Session successfully expired
- "401":
- description: Unauthorized access
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unsuccessful session expiry
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /:
- get:
- operationId: GetRoutes
- summary: Map of all top level routes available
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- responses:
- default:
- description: All routes
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Routes"
- /setup:
- get:
- operationId: GetSetup
- tags:
- - Setup
- summary: Check if database has default user, org, bucket
- description: Returns `true` if no default user, organization, or bucket has been created.
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- responses:
- "200":
- description:
- allowed true or false
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/IsOnboarding"
- post:
- operationId: PostSetup
- tags:
- - Setup
- summary: Set up initial user, org and bucket
- description: Post an onboarding request to set up initial user, org and bucket.
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- requestBody:
- description: Source to create
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/OnboardingRequest"
- responses:
- "201":
- description: Created default user, bucket, org
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/OnboardingResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /setup/user:
- post:
- operationId: PostSetupUser
- tags:
- - Setup
- summary: Set up a new user, org and bucket
- description: Post an onboarding request to set up a new user, org and bucket.
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- requestBody:
- description: Source to create
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/OnboardingRequest"
- responses:
- "201":
- description: Created default user, bucket, org
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/OnboardingResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /documents/templates:
- get:
- operationId: GetDocumentsTemplates
- tags:
- - Templates
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: query
- name: org
- description: Specifies the name of the organization of the template.
- schema:
- type: string
- - in: query
- name: orgID
- description: Specifies the organization ID of the template.
- schema:
- type: string
- responses:
- "200":
- description: A list of template documents
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Documents"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostDocumentsTemplates
- tags:
- - Templates
- summary: Create a template
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- requestBody:
- description: Template that will be created
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/DocumentCreate"
- responses:
- "201":
- description: Template created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Document"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/documents/templates/{templateID}":
- get:
- operationId: GetDocumentsTemplatesID
- tags:
- - Templates
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: templateID
- schema:
- type: string
- required: true
- description: The template ID.
- responses:
- "200":
- description: The template requested
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Document"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- put:
- operationId: PutDocumentsTemplatesID
- tags:
- - Templates
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: templateID
- schema:
- type: string
- required: true
- description: The template ID.
- requestBody:
- description: Template that will be updated
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/DocumentUpdate"
- responses:
- "200":
- description: The newly updated template
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Document"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- delete:
- operationId: DeleteDocumentsTemplatesID
- tags:
- - Templates
- summary: Delete a template
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: templateID
- schema:
- type: string
- required: true
- description: The template ID.
- responses:
- "204":
- description: Delete has been accepted
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/documents/templates/{templateID}/labels":
- get:
- operationId: GetDocumentsTemplatesIDLabels
- tags:
- - Templates
- summary: List all labels for a template
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: templateID
- schema:
- type: string
- required: true
- description: The template ID.
- responses:
- "200":
- description: A list of all labels for a template
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelsResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostDocumentsTemplatesIDLabels
- tags:
- - Templates
- summary: Add a label to a template
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: templateID
- schema:
- type: string
- required: true
- description: The template ID.
- requestBody:
- description: Label to add
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelMapping"
- responses:
- "201":
- description: The label added to the template
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/documents/templates/{templateID}/labels/{labelID}":
- delete:
- operationId: DeleteDocumentsTemplatesIDLabelsID
- tags:
- - Templates
- summary: Delete a label from a template
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: templateID
- schema:
- type: string
- required: true
- description: The template ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The label ID.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: Template not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /dbrps:
- get:
- operationId: GetDBRPs
- tags:
- - DBRPs
- summary: List all database retention policy mappings
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: query
- name: orgID
- required: true
- description: Specifies the organization ID to filter on
- schema:
- type: string
- - in: query
- name: id
- description: Specifies the mapping ID to filter on
- schema:
- type: string
- - in: query
- name: bucketID
- description: Specifies the bucket ID to filter on
- schema:
- type: string
- - in: query
- name: default
- description: Specifies filtering on default
- schema:
- type: boolean
- - in: query
- name: db
- description: Specifies the database to filter on
- schema:
- type: string
- - in: query
- name: rp
- description: Specifies the retention policy to filter on
- schema:
- type: string
- responses:
- "200":
- description: A list of all database retention policy mappings
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/DBRPs"
- "400":
- description: if any of the parameter passed is invalid
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostDBRP
- tags:
- - DBRPs
- summary: Add a database retention policy mapping
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- requestBody:
- description: The database retention policy mapping to add
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/DBRP"
- responses:
- "201":
- description: Database retention policy mapping created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/DBRP"
- "400":
- description: if any of the IDs in the mapping is invalid
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/dbrps/{dbrpID}":
- get:
- operationId: GetDBRPsID
- tags:
- - DBRPs
- summary: Retrieve a database retention policy mapping
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: query
- name: orgID
- required: true
- description: Specifies the organization ID of the mapping
- schema:
- type: string
- - in: path
- name: dbrpID
- schema:
- type: string
- required: true
- description: The database retention policy mapping ID
- responses:
- "200":
- description: The database retention policy requested
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/DBRP"
- "400":
- description: if any of the IDs passed is invalid
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- patch:
- operationId: PatchDBRPID
- tags:
- - DBRPs
- summary: Update a database retention policy mapping
- requestBody:
- description: Database retention policy update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/DBRPUpdate"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: query
- name: orgID
- required: true
- description: Specifies the organization ID of the mapping
- schema:
- type: string
- - in: path
- name: dbrpID
- schema:
- type: string
- required: true
- description: The database retention policy mapping.
- responses:
- "200":
- description: An updated mapping
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/DBRP"
- "404":
- description: The mapping was not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "400":
- description: if any of the IDs passed is invalid
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- delete:
- operationId: DeleteDBRPID
- tags:
- - DBRPs
- summary: Delete a database retention policy
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: query
- name: orgID
- required: true
- description: Specifies the organization ID of the mapping
- schema:
- type: string
- - in: path
- name: dbrpID
- schema:
- type: string
- required: true
- description: The database retention policy mapping
- responses:
- "204":
- description: Delete has been accepted
- "400":
- description: if any of the IDs passed is invalid
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /telegrafs:
- get:
- operationId: GetTelegrafs
- tags:
- - Telegrafs
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: query
- name: orgID
- description: The organization ID the Telegraf config belongs to.
- schema:
- type: string
- responses:
- "200":
- description: A list of Telegraf configs
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Telegrafs"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostTelegrafs
- tags:
- - Telegrafs
- summary: Create a Telegraf config
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- requestBody:
- description: Telegraf config to create
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/TelegrafRequest"
- responses:
- "201":
- description: Telegraf config created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Telegraf"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/telegrafs/{telegrafID}":
- get:
- operationId: GetTelegrafsID
- tags:
- - Telegrafs
- summary: Retrieve a Telegraf config
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- - in: header
- name: Accept
- required: false
- schema:
- type: string
- default: application/toml
- enum:
- - application/toml
- - application/json
- - application/octet-stream
- responses:
- "200":
- description: Telegraf config details
- content:
- application/toml:
- example: "[agent]\ninterval = \"10s\""
- schema:
- type: string
- application/json:
- schema:
- $ref: "#/components/schemas/Telegraf"
- application/octet-stream:
- example: "[agent]\ninterval = \"10s\""
- schema:
- type: string
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- put:
- operationId: PutTelegrafsID
- tags:
- - Telegrafs
- summary: Update a Telegraf config
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- requestBody:
- description: Telegraf config update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/TelegrafRequest"
- responses:
- "200":
- description: An updated Telegraf config
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Telegraf"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- delete:
- operationId: DeleteTelegrafsID
- tags:
- - Telegrafs
- summary: Delete a Telegraf config
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- responses:
- "204":
- description: Delete has been accepted
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/telegrafs/{telegrafID}/labels":
- get:
- operationId: GetTelegrafsIDLabels
- tags:
- - Telegrafs
- summary: List all labels for a Telegraf config
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- responses:
- "200":
- description: A list of all labels for a Telegraf config
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelsResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostTelegrafsIDLabels
- tags:
- - Telegrafs
- summary: Add a label to a Telegraf config
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- requestBody:
- description: Label to add
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelMapping"
- responses:
- "201":
- description: The label added to the Telegraf config
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/telegrafs/{telegrafID}/labels/{labelID}":
- delete:
- operationId: DeleteTelegrafsIDLabelsID
- tags:
- - Telegrafs
- summary: Delete a label from a Telegraf config
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The label ID.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: Telegraf config not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/telegrafs/{telegrafID}/members":
- get:
- operationId: GetTelegrafsIDMembers
- tags:
- - Users
- - Telegrafs
- summary: List all users with member privileges for a Telegraf config
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- responses:
- "200":
- description: A list of Telegraf config members
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceMembers"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostTelegrafsIDMembers
- tags:
- - Users
- - Telegrafs
- summary: Add a member to a Telegraf config
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- requestBody:
- description: User to add as member
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AddResourceMemberRequestBody"
- responses:
- "201":
- description: Member added to Telegraf config
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceMember"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/telegrafs/{telegrafID}/members/{userID}":
- delete:
- operationId: DeleteTelegrafsIDMembersID
- tags:
- - Users
- - Telegrafs
- summary: Remove a member from a Telegraf config
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the member to remove.
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- responses:
- "204":
- description: Member removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/telegrafs/{telegrafID}/owners":
- get:
- operationId: GetTelegrafsIDOwners
- tags:
- - Users
- - Telegrafs
- summary: List all owners of a Telegraf config
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- responses:
- "200":
- description: A list of Telegraf config owners
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceOwners"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostTelegrafsIDOwners
- tags:
- - Users
- - Telegrafs
- summary: Add an owner to a Telegraf config
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- requestBody:
- description: User to add as owner
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AddResourceMemberRequestBody"
- responses:
- "201":
- description: Telegraf config owner added
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceOwner"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/telegrafs/{telegrafID}/owners/{userID}":
- delete:
- operationId: DeleteTelegrafsIDOwnersID
- tags:
- - Users
- - Telegrafs
- summary: Remove an owner from a Telegraf config
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the owner to remove.
- - in: path
- name: telegrafID
- schema:
- type: string
- required: true
- description: The Telegraf config ID.
- responses:
- "204":
- description: Owner removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /scrapers:
- get:
- operationId: GetScrapers
- tags:
- - ScraperTargets
- summary: Get all scraper targets
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: query
- name: name
- description: Specifies the name of the scraper target.
- schema:
- type: string
- - in: query
- name: id
- description: List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used.
- schema:
- type: array
- items:
- type: string
- - in: query
- name: orgID
- description: Specifies the organization ID of the scraper target.
- schema:
- type: string
- - in: query
- name: org
- description: Specifies the organization name of the scraper target.
- schema:
- type: string
- responses:
- "200":
- description: All scraper targets
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ScraperTargetResponses"
- post:
- operationId: PostScrapers
- summary: Create a scraper target
- tags:
- - ScraperTargets
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- requestBody:
- description: Scraper target to create
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ScraperTargetRequest"
- responses:
- "201":
- description: Scraper target created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ScraperTargetResponse"
- default:
- description: Internal server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/scrapers/{scraperTargetID}":
- get:
- operationId: GetScrapersID
- tags:
- - ScraperTargets
- summary: Get a scraper target by ID
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: scraperTargetID
- required: true
- schema:
- type: string
- description: The scraper target ID.
- responses:
- "200":
- description: Scraper target updated
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ScraperTargetResponse"
- default:
- description: Internal server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- delete:
- operationId: DeleteScrapersID
- tags:
- - ScraperTargets
- summary: Delete a scraper target
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: scraperTargetID
- required: true
- schema:
- type: string
- description: The scraper target ID.
- responses:
- "204":
- description: Scraper target deleted
- default:
- description: Internal server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- patch:
- operationId: PatchScrapersID
- summary: Update a scraper target
- tags:
- - ScraperTargets
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: scraperTargetID
- required: true
- schema:
- type: string
- description: The scraper target ID.
- requestBody:
- description: Scraper target update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ScraperTargetRequest"
- responses:
- "200":
- description: Scraper target updated
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ScraperTargetResponse"
- default:
- description: Internal server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/scrapers/{scraperTargetID}/labels":
- get:
- operationId: GetScrapersIDLabels
- tags:
- - ScraperTargets
- summary: List all labels for a scraper target
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- responses:
- "200":
- description: A list of all labels for a scraper target
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelsResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostScrapersIDLabels
- tags:
- - ScraperTargets
- summary: Add a label to a scraper target
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- requestBody:
- description: Label to add
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelMapping"
- responses:
- "201":
- description: The newly added label
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/scrapers/{scraperTargetID}/labels/{labelID}":
- delete:
- operationId: DeleteScrapersIDLabelsID
- tags:
- - ScraperTargets
- summary: Delete a label from a scraper target
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The label ID.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: Scraper target not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- patch:
- operationId: PatchScrapersIDLabelsID
- tags:
- - ScraperTargets
- summary: Update a label on a scraper target
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The label ID.
- requestBody:
- description: Label update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Label"
- responses:
- "200":
- description: Updated successfully
- "404":
- description: Scraper target not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/scrapers/{scraperTargetID}/members":
- get:
- operationId: GetScrapersIDMembers
- tags:
- - Users
- - ScraperTargets
- summary: List all users with member privileges for a scraper target
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- responses:
- "200":
- description: A list of scraper target members
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceMembers"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostScrapersIDMembers
- tags:
- - Users
- - ScraperTargets
- summary: Add a member to a scraper target
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- requestBody:
- description: User to add as member
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AddResourceMemberRequestBody"
- responses:
- "201":
- description: Member added to scraper targets
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceMember"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/scrapers/{scraperTargetID}/members/{userID}":
- delete:
- operationId: DeleteScrapersIDMembersID
- tags:
- - Users
- - ScraperTargets
- summary: Remove a member from a scraper target
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of member to remove.
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- responses:
- "204":
- description: Member removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/scrapers/{scraperTargetID}/owners":
- get:
- operationId: GetScrapersIDOwners
- tags:
- - Users
- - ScraperTargets
- summary: List all owners of a scraper target
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- responses:
- "200":
- description: A list of scraper target owners
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceOwners"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostScrapersIDOwners
- tags:
- - Users
- - ScraperTargets
- summary: Add an owner to a scraper target
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- requestBody:
- description: User to add as owner
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AddResourceMemberRequestBody"
- responses:
- "201":
- description: Scraper target owner added
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceOwner"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/scrapers/{scraperTargetID}/owners/{userID}":
- delete:
- operationId: DeleteScrapersIDOwnersID
- tags:
- - Users
- - ScraperTargets
- summary: Remove an owner from a scraper target
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of owner to remove.
- - in: path
- name: scraperTargetID
- schema:
- type: string
- required: true
- description: The scraper target ID.
- responses:
- "204":
- description: Owner removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /variables:
- get:
- operationId: GetVariables
- tags:
- - Variables
- summary: Get all variables
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: query
- name: org
- description: The organization name.
- schema:
- type: string
- - in: query
- name: orgID
- description: The organization ID.
- schema:
- type: string
- responses:
- "200":
- description: All variables for an organization
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Variables"
- "400":
- description: Invalid request
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Internal server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostVariables
- summary: Create a variable
- tags:
- - Variables
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- requestBody:
- description: Variable to create
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Variable"
- responses:
- "201":
- description: Variable created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Variable"
- default:
- description: Internal server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/variables/{variableID}":
- get:
- operationId: GetVariablesID
- tags:
- - Variables
- summary: Get a variable
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: variableID
- required: true
- schema:
- type: string
- description: The variable ID.
- responses:
- "200":
- description: Variable found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Variable"
- "404":
- description: Variable not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Internal server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- delete:
- operationId: DeleteVariablesID
- tags:
- - Variables
- summary: Delete a variable
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: variableID
- required: true
- schema:
- type: string
- description: The variable ID.
- responses:
- "204":
- description: Variable deleted
- default:
- description: Internal server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- patch:
- operationId: PatchVariablesID
- summary: Update a variable
- tags:
- - Variables
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: variableID
- required: true
- schema:
- type: string
- description: The variable ID.
- requestBody:
- description: Variable update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Variable"
- responses:
- "200":
- description: Variable updated
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Variable"
- default:
- description: Internal server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- put:
- operationId: PutVariablesID
- summary: Replace a variable
- tags:
- - Variables
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: variableID
- required: true
- schema:
- type: string
- description: The variable ID.
- requestBody:
- description: Variable to replace
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Variable"
- responses:
- "200":
- description: Variable updated
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Variable"
- default:
- description: Internal server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/variables/{variableID}/labels":
- get:
- operationId: GetVariablesIDLabels
- tags:
- - Variables
- summary: List all labels for a variable
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: variableID
- schema:
- type: string
- required: true
- description: The variable ID.
- responses:
- "200":
- description: A list of all labels for a variable
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelsResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostVariablesIDLabels
- tags:
- - Variables
- summary: Add a label to a variable
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: variableID
- schema:
- type: string
- required: true
- description: The variable ID.
- requestBody:
- description: Label to add
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelMapping"
- responses:
- "201":
- description: The newly added label
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/variables/{variableID}/labels/{labelID}":
- delete:
- operationId: DeleteVariablesIDLabelsID
- tags:
- - Variables
- summary: Delete a label from a variable
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: variableID
- schema:
- type: string
- required: true
- description: The variable ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The label ID to delete.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: Variable not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /write:
- post:
- operationId: PostWrite
- tags:
- - Write
- summary: Write time series data into InfluxDB
- requestBody:
- description: Line protocol body
- required: true
- content:
- text/plain:
- schema:
- type: string
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: header
- name: Content-Encoding
- description: When present, its value indicates to the database that compression is applied to the line-protocol body.
- schema:
- type: string
- description: Specifies that the line protocol in the body is encoded with gzip or not encoded with identity.
- default: identity
- enum:
- - gzip
- - identity
- - in: header
- name: Content-Type
- description: Content-Type is used to indicate the format of the data sent to the server.
- schema:
- type: string
- description: Text/plain specifies the text line protocol; charset is assumed to be utf-8.
- default: text/plain; charset=utf-8
- enum:
- - text/plain
- - text/plain; charset=utf-8
- - application/vnd.influx.arrow
- - in: header
- name: Content-Length
- description: Content-Length is an entity header is indicating the size of the entity-body, in bytes, sent to the database. If the length is greater than the database max body configuration option, a 413 response is sent.
- schema:
- type: integer
- description: The length in decimal number of octets.
- - in: header
- name: Accept
- description: Specifies the return content format.
- schema:
- type: string
- description: The return format for errors.
- default: application/json
- enum:
- - application/json
- - in: query
- name: org
- description: Specifies the destination organization for writes. Takes either the ID or Name interchangeably. If both `orgID` and `org` are specified, `org` takes precedence.
- required: true
- schema:
- type: string
- description: All points within batch are written to this organization.
- - in: query
- name: orgID
- description: Specifies the ID of the destination organization for writes. If both `orgID` and `org` are specified, `org` takes precedence.
- schema:
- type: string
- - in: query
- name: bucket
- description: The destination bucket for writes.
- required: true
- schema:
- type: string
- description: All points within batch are written to this bucket.
- - in: query
- name: precision
- description: The precision for the unix timestamps within the body line-protocol.
- schema:
- $ref: "#/components/schemas/WritePrecision"
- responses:
- "204":
- description: Write data is correctly formatted and accepted for writing to the bucket.
- "400":
- description: Line protocol poorly formed and no points were written. Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written.
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LineProtocolError"
- "401":
- description: Token does not have sufficient permissions to write to this organization and bucket or the organization and bucket do not exist.
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "403":
- description: No token was sent and they are required.
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "413":
- description: Write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written.
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LineProtocolLengthError"
- "429":
- description: Token is temporarily over quota. The Retry-After header describes when to try the write again.
- headers:
- Retry-After:
- description: A non-negative decimal integer indicating the seconds to delay after the response is received.
- schema:
- type: integer
- format: int32
- "503":
- description: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again.
- headers:
- Retry-After:
- description: A non-negative decimal integer indicating the seconds to delay after the response is received.
- schema:
- type: integer
- format: int32
- default:
- description: Internal server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /delete:
- post:
- summary: Delete time series data from InfluxDB
- requestBody:
- description: Predicate delete request
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/DeletePredicateRequest"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: query
- name: org
- description: Specifies the organization to delete data from.
- schema:
- type: string
- description: Only points from this organization are deleted.
- - in: query
- name: bucket
- description: Specifies the bucket to delete data from.
- schema:
- type: string
- description: Only points from this bucket are deleted.
- - in: query
- name: orgID
- description: Specifies the organization ID of the resource.
- schema:
- type: string
- - in: query
- name: bucketID
- description: Specifies the bucket ID to delete data from.
- schema:
- type: string
- description: Only points from this bucket ID are deleted.
- responses:
- "204":
- description: delete has been accepted
- "400":
- description: invalid request.
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "404":
- description: the bucket or organization is not found.
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "403":
- description: no token was sent or does not have sufficient permissions.
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: internal server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /ready:
- servers:
- - url: /
- get:
- operationId: GetReady
- tags:
- - Ready
- summary: Get the readiness of an instance at startup
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- responses:
- "200":
- description: The instance is ready
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Ready"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /health:
- servers:
- - url: /
- get:
- operationId: GetHealth
- tags:
- - Health
- summary: Get the health of an instance
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- responses:
- "200":
- description: The instance is healthy
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/HealthCheck"
- "503":
- description: The instance is unhealthy
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/HealthCheck"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /sources:
- post:
- operationId: PostSources
- tags:
- - Sources
- summary: Creates a source
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- requestBody:
- description: Source to create
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Source"
- responses:
- "201":
- description: Created Source
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Source"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- get:
- operationId: GetSources
- tags:
- - Sources
- summary: Get all sources
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: query
- name: org
- description: The organization name.
- schema:
- type: string
- responses:
- "200":
- description: All sources
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Sources"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /sources/{sourceID}:
- delete:
- operationId: DeleteSourcesID
- tags:
- - Sources
- summary: Delete a source
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: sourceID
- schema:
- type: string
- required: true
- description: The source ID.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: View not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- patch:
- operationId: PatchSourcesID
- tags:
- - Sources
- summary: Update a Source
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: sourceID
- schema:
- type: string
- required: true
- description: The source ID.
- requestBody:
- description: Source update
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Source"
- responses:
- "200":
- description: Created Source
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Source"
- "404":
- description: Source not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- get:
- operationId: GetSourcesID
- tags:
- - Sources
- summary: Get a source
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: sourceID
- schema:
- type: string
- required: true
- description: The source ID.
- responses:
- "200":
- description: A source
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Source"
- "404":
- description: Source not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /sources/{sourceID}/health:
- get:
- operationId: GetSourcesIDHealth
- tags:
- - Sources
- summary: Get the health of a source
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: sourceID
- schema:
- type: string
- required: true
- description: The source ID.
- responses:
- "200":
- description: The source is healthy
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/HealthCheck"
- "503":
- description: The source is not healthy
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/HealthCheck"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /sources/{sourceID}/buckets:
- get:
- operationId: GetSourcesIDBuckets
- tags:
- - Sources
- - Buckets
- summary: Get buckets in a source
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: sourceID
- schema:
- type: string
- required: true
- description: The source ID.
- - in: query
- name: org
- description: The organization name.
- schema:
- type: string
- responses:
- "200":
- description: A source
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Buckets"
- "404":
- description: Source not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /labels:
- post:
- operationId: PostLabels
- tags:
- - Labels
- summary: Create a label
- requestBody:
- description: Label to create
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelCreateRequest"
- responses:
- "201":
- description: Added label
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- get:
- operationId: GetLabels
- tags:
- - Labels
- summary: Get all labels
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: query
- name: orgID
- description: The organization ID.
- schema:
- type: string
- responses:
- "200":
- description: All labels
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelsResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /labels/{labelID}:
- get:
- operationId: GetLabelsID
- tags:
- - Labels
- summary: Get a label
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The ID of the label to update.
- responses:
- "200":
- description: A label
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- patch:
- operationId: PatchLabelsID
- tags:
- - Labels
- summary: Update a label
- requestBody:
- description: Label update
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelUpdate"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The ID of the label to update.
- responses:
- "200":
- description: Updated label
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelResponse"
- "404":
- description: Label not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- delete:
- operationId: DeleteLabelsID
- tags:
- - Labels
- summary: Delete a label
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The ID of the label to delete.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: Label not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /dashboards:
- post:
- operationId: PostDashboards
- tags:
- - Dashboards
- summary: Create a dashboard
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- requestBody:
- description: Dashboard to create
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/CreateDashboardRequest"
- responses:
- "201":
- description: Added dashboard
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Dashboard"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- get:
- operationId: GetDashboards
- tags:
- - Dashboards
- summary: Get all dashboards
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: query
- name: owner
- description: The owner ID.
- schema:
- type: string
- - in: query
- name: sortBy
- description: The column to sort by.
- schema:
- type: string
- enum:
- - "ID"
- - "CreatedAt"
- - "UpdatedAt"
- - in: query
- name: id
- description: List of dashboard IDs to return. If both `id and `owner` are specified, only `id` is used.
- schema:
- type: array
- items:
- type: string
- - in: query
- name: orgID
- description: The organization ID.
- schema:
- type: string
- - in: query
- name: org
- description: The organization name.
- schema:
- type: string
- responses:
- "200":
- description: All dashboards
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Dashboards"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/dashboards/{dashboardID}":
- get:
- operationId: GetDashboardsID
- tags:
- - Dashboards
- summary: Get a Dashboard
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The ID of the dashboard to update.
- - in: query
- name: include
- required: false
- schema:
- type: string
- enum:
- - properties
- description: Includes the cell view properties in the response if set to `properties`
- responses:
- "200":
- description: Get a single dashboard
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Dashboard"
- "404":
- description: Dashboard not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- patch:
- operationId: PatchDashboardsID
- tags:
- - Dashboards
- summary: Update a dashboard
- requestBody:
- description: Patching of a dashboard
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Dashboard"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The ID of the dashboard to update.
- responses:
- "200":
- description: Updated dashboard
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Dashboard"
- "404":
- description: Dashboard not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- delete:
- operationId: DeleteDashboardsID
- tags:
- - Dashboards
- summary: Delete a dashboard
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The ID of the dashboard to update.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: Dashboard not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/dashboards/{dashboardID}/cells":
- put:
- operationId: PutDashboardsIDCells
- tags:
- - Cells
- - Dashboards
- summary: Replace cells in a dashboard
- description: Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells.
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Cells"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The ID of the dashboard to update.
- responses:
- "201":
- description: Replaced dashboard cells
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Dashboard"
- "404":
- description: Dashboard not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostDashboardsIDCells
- tags:
- - Cells
- - Dashboards
- summary: Create a dashboard cell
- requestBody:
- description: Cell that will be added
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/CreateCell"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The ID of the dashboard to update.
- responses:
- "201":
- description: Cell successfully added
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Cell"
- "404":
- description: Dashboard not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/dashboards/{dashboardID}/cells/{cellID}":
- patch:
- operationId: PatchDashboardsIDCellsID
- tags:
- - Cells
- - Dashboards
- summary: Update the non-positional information related to a cell
- description: Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts.
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/CellUpdate"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The ID of the dashboard to update.
- - in: path
- name: cellID
- schema:
- type: string
- required: true
- description: The ID of the cell to update.
- responses:
- "200":
- description: Updated dashboard cell
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Cell"
- "404":
- description: Cell or dashboard not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- delete:
- operationId: DeleteDashboardsIDCellsID
- tags:
- - Cells
- - Dashboards
- summary: Delete a dashboard cell
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The ID of the dashboard to delete.
- - in: path
- name: cellID
- schema:
- type: string
- required: true
- description: The ID of the cell to delete.
- responses:
- "204":
- description: Cell successfully deleted
- "404":
- description: Cell or dashboard not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/dashboards/{dashboardID}/cells/{cellID}/view":
- get:
- operationId: GetDashboardsIDCellsIDView
- tags:
- - Cells
- - Dashboards
- - Views
- summary: Retrieve the view for a cell
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- - in: path
- name: cellID
- schema:
- type: string
- required: true
- description: The cell ID.
- responses:
- "200":
- description: A dashboard cells view
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/View"
- "404":
- description: Cell or dashboard not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- patch:
- operationId: PatchDashboardsIDCellsIDView
- tags:
- - Cells
- - Dashboards
- - Views
- summary: Update the view for a cell
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/View"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The ID of the dashboard to update.
- - in: path
- name: cellID
- schema:
- type: string
- required: true
- description: The ID of the cell to update.
- responses:
- "200":
- description: Updated cell view
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/View"
- "404":
- description: Cell or dashboard not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/dashboards/{dashboardID}/labels":
- get:
- operationId: GetDashboardsIDLabels
- tags:
- - Dashboards
- summary: list all labels for a dashboard
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- responses:
- "200":
- description: A list of all labels for a dashboard
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelsResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostDashboardsIDLabels
- tags:
- - Dashboards
- summary: Add a label to a dashboard
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- requestBody:
- description: Label to add
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelMapping"
- responses:
- "201":
- description: The label added to the dashboard
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/dashboards/{dashboardID}/labels/{labelID}":
- delete:
- operationId: DeleteDashboardsIDLabelsID
- tags:
- - Dashboards
- summary: Delete a label from a dashboard
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The ID of the label to delete.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: Dashboard not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/dashboards/{dashboardID}/members":
- get:
- operationId: GetDashboardsIDMembers
- tags:
- - Users
- - Dashboards
- summary: List all dashboard members
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- responses:
- "200":
- description: A list of users who have member privileges for a dashboard
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceMembers"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostDashboardsIDMembers
- tags:
- - Users
- - Dashboards
- summary: Add a member to a dashboard
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- requestBody:
- description: User to add as member
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AddResourceMemberRequestBody"
- responses:
- "201":
- description: Added to dashboard members
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceMember"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/dashboards/{dashboardID}/members/{userID}":
- delete:
- operationId: DeleteDashboardsIDMembersID
- tags:
- - Users
- - Dashboards
- summary: Remove a member from a dashboard
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the member to remove.
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- responses:
- "204":
- description: Member removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/dashboards/{dashboardID}/owners":
- get:
- operationId: GetDashboardsIDOwners
- tags:
- - Users
- - Dashboards
- summary: List all dashboard owners
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- responses:
- "200":
- description: A list of users who have owner privileges for a dashboard
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceOwners"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostDashboardsIDOwners
- tags:
- - Users
- - Dashboards
- summary: Add an owner to a dashboard
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- requestBody:
- description: User to add as owner
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AddResourceMemberRequestBody"
- responses:
- "201":
- description: Added to dashboard owners
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceOwner"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/dashboards/{dashboardID}/owners/{userID}":
- delete:
- operationId: DeleteDashboardsIDOwnersID
- tags:
- - Users
- - Dashboards
- summary: Remove an owner from a dashboard
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the owner to remove.
- - in: path
- name: dashboardID
- schema:
- type: string
- required: true
- description: The dashboard ID.
- responses:
- "204":
- description: Owner removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /query/ast:
- post:
- operationId: PostQueryAst
- description: Analyzes flux query and generates a query specification.
- tags:
- - Query
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: header
- name: Content-Type
- schema:
- type: string
- enum:
- - application/json
- requestBody:
- description: Analyzed Flux query to generate abstract syntax tree.
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LanguageRequest"
- responses:
- "200":
- description: Abstract syntax tree of flux query.
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ASTResponse"
- default:
- description: Any response other than 200 is an internal server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /query/suggestions:
- get:
- operationId: GetQuerySuggestions
- tags:
- - Query
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- responses:
- "200":
- description: Suggestions for next functions in call chain
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/FluxSuggestions"
- default:
- description: Any response other than 200 is an internal server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/query/suggestions/{name}":
- get:
- operationId: GetQuerySuggestionsName
- tags:
- - Query
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: name
- schema:
- type: string
- required: true
- description: The name of the branching suggestion.
- responses:
- "200":
- description: Suggestions for next functions in call chain
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/FluxSuggestion"
- default:
- description: Any response other than 200 is an internal server error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /authorizations:
- get:
- operationId: GetAuthorizations
- tags:
- - Authorizations
- summary: List all authorizations
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: query
- name: userID
- schema:
- type: string
- description: Only show authorizations that belong to a user ID.
- - in: query
- name: user
- schema:
- type: string
- description: Only show authorizations that belong to a user name.
- - in: query
- name: orgID
- schema:
- type: string
- description: Only show authorizations that belong to an organization ID.
- - in: query
- name: org
- schema:
- type: string
- description: Only show authorizations that belong to a organization name.
- responses:
- "200":
- description: A list of authorizations
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Authorizations"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostAuthorizations
- tags:
- - Authorizations
- summary: Create an authorization
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- requestBody:
- description: Authorization to create
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Authorization"
- responses:
- "201":
- description: Authorization created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Authorization"
- "400":
- description: Invalid request
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /authorizations/{authID}:
- get:
- operationId: GetAuthorizationsID
- tags:
- - Authorizations
- summary: Retrieve an authorization
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: authID
- schema:
- type: string
- required: true
- description: The ID of the authorization to get.
- responses:
- "200":
- description: Authorization details
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Authorization"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- patch:
- operationId: PatchAuthorizationsID
- tags:
- - Authorizations
- summary: Update an authorization to be active or inactive
- requestBody:
- description: Authorization to update
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AuthorizationUpdateRequest"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: authID
- schema:
- type: string
- required: true
- description: The ID of the authorization to update.
- responses:
- "200":
- description: The active or inactie authorization
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Authorization"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- delete:
- operationId: DeleteAuthorizationsID
- tags:
- - Authorizations
- summary: Delete a authorization
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: authID
- schema:
- type: string
- required: true
- description: The ID of the authorization to delete.
- responses:
- "204":
- description: Authorization deleted
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /query/analyze:
- post:
- operationId: PostQueryAnalyze
- tags:
- - Query
- summary: Analyze an InfluxQL or Flux query
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: header
- name: Content-Type
- schema:
- type: string
- enum:
- - application/json
- requestBody:
- description: Flux or InfluxQL query to analyze
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Query"
- responses:
- "200":
- description: Query analyze results. Errors will be empty if the query is valid.
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AnalyzeQueryResponse"
- default:
- description: Internal server error
- headers:
- X-Influx-Error:
- description: Error string describing the problem
- schema:
- type: string
- X-Influx-Reference:
- description: Reference code unique to the error type
- schema:
- type: integer
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /query:
- post:
- operationId: PostQuery
- tags:
- - Query
- summary: Query InfluxDB
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: header
- name: Accept-Encoding
- description: The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.
- schema:
- type: string
- description: Specifies that the query response in the body should be encoded with gzip or not encoded with identity.
- default: identity
- enum:
- - gzip
- - identity
- - in: header
- name: Content-Type
- schema:
- type: string
- enum:
- - application/json
- - application/vnd.flux
- - in: query
- name: org
- description: Specifies the name of the organization executing the query. Takes either the ID or Name interchangeably. If both `orgID` and `org` are specified, `org` takes precedence.
- schema:
- type: string
- - in: query
- name: orgID
- description: Specifies the ID of the organization executing the query. If both `orgID` and `org` are specified, `org` takes precedence.
- schema:
- type: string
- requestBody:
- description: Flux query or specification to execute
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Query"
- application/vnd.flux:
- schema:
- type: string
- responses:
- "200":
- description: Query results
- headers:
- Content-Encoding:
- description: The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body
- schema:
- type: string
- description: Specifies that the response in the body is encoded with gzip or not encoded with identity.
- default: identity
- enum:
- - gzip
- - identity
- content:
- text/csv:
- schema:
- type: string
- example: >
- result,table,_start,_stop,_time,region,host,_value
- mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:00Z,east,A,15.43
- mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:20Z,east,B,59.25
- mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east,C,52.62
- application/vnd.influx.arrow:
- schema:
- type: string
- format: binary
- "429":
- description: Token is temporarily over quota. The Retry-After header describes when to try the read again.
- headers:
- Retry-After:
- description: A non-negative decimal integer indicating the seconds to delay after the response is received.
- schema:
- type: integer
- format: int32
- default:
- description: Error processing query
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /buckets:
- get:
- operationId: GetBuckets
- tags:
- - Buckets
- summary: List all buckets
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - $ref: "#/components/parameters/Offset"
- - $ref: "#/components/parameters/Limit"
- - in: query
- name: org
- description: The organization name.
- schema:
- type: string
- - in: query
- name: orgID
- description: The organization ID.
- schema:
- type: string
- - in: query
- name: name
- description: Only returns buckets with a specific name.
- schema:
- type: string
- responses:
- "200":
- description: A list of buckets
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Buckets"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostBuckets
- tags:
- - Buckets
- summary: Create a bucket
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- requestBody:
- description: Bucket to create
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/PostBucketRequest"
- responses:
- "201":
- description: Bucket created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Bucket"
- 422:
- description: Request body failed validation
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/buckets/{bucketID}":
- get:
- operationId: GetBucketsID
- tags:
- - Buckets
- summary: Retrieve a bucket
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: The bucket ID.
- responses:
- "200":
- description: Bucket details
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Bucket"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- patch:
- operationId: PatchBucketsID
- tags:
- - Buckets
- summary: Update a bucket
- requestBody:
- description: Bucket update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Bucket"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: The bucket ID.
- responses:
- "200":
- description: An updated bucket
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Bucket"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- delete:
- operationId: DeleteBucketsID
- tags:
- - Buckets
- summary: Delete a bucket
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: The ID of the bucket to delete.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: Bucket not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/buckets/{bucketID}/labels":
- get:
- operationId: GetBucketsIDLabels
- tags:
- - Buckets
- summary: List all labels for a bucket
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: The bucket ID.
- responses:
- "200":
- description: A list of all labels for a bucket
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelsResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostBucketsIDLabels
- tags:
- - Buckets
- summary: Add a label to a bucket
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: The bucket ID.
- requestBody:
- description: Label to add
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelMapping"
- responses:
- "201":
- description: The newly added label
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/buckets/{bucketID}/labels/{labelID}":
- delete:
- operationId: DeleteBucketsIDLabelsID
- tags:
- - Buckets
- summary: delete a label from a bucket
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: The bucket ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The ID of the label to delete.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: Bucket not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/buckets/{bucketID}/members":
- get:
- operationId: GetBucketsIDMembers
- tags:
- - Users
- - Buckets
- summary: List all users with member privileges for a bucket
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: The bucket ID.
- responses:
- "200":
- description: A list of bucket members
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceMembers"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostBucketsIDMembers
- tags:
- - Users
- - Buckets
- summary: Add a member to a bucket
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: The bucket ID.
- requestBody:
- description: User to add as member
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AddResourceMemberRequestBody"
- responses:
- "201":
- description: Member added to bucket
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceMember"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/buckets/{bucketID}/members/{userID}":
- delete:
- operationId: DeleteBucketsIDMembersID
- tags:
- - Users
- - Buckets
- summary: Remove a member from a bucket
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the member to remove.
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: The bucket ID.
- responses:
- "204":
- description: Member removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/buckets/{bucketID}/owners":
- get:
- operationId: GetBucketsIDOwners
- tags:
- - Users
- - Buckets
- summary: List all owners of a bucket
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: The bucket ID.
- responses:
- "200":
- description: A list of bucket owners
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceOwners"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostBucketsIDOwners
- tags:
- - Users
- - Buckets
- summary: Add an owner to a bucket
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: The bucket ID.
- requestBody:
- description: User to add as owner
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AddResourceMemberRequestBody"
- responses:
- "201":
- description: Bucket owner added
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceOwner"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/buckets/{bucketID}/owners/{userID}":
- delete:
- operationId: DeleteBucketsIDOwnersID
- tags:
- - Users
- - Buckets
- summary: Remove an owner from a bucket
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the owner to remove.
- - in: path
- name: bucketID
- schema:
- type: string
- required: true
- description: The bucket ID.
- responses:
- "204":
- description: Owner removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /orgs:
- get:
- operationId: GetOrgs
- tags:
- - Organizations
- summary: List all organizations
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: query
- name: org
- schema:
- type: string
- description: Filter organizations to a specific organization name.
- - in: query
- name: orgID
- schema:
- type: string
- description: Filter organizations to a specific organization ID.
- - in: query
- name: userID
- schema:
- type: string
- description: Filter organizations to a specific user ID.
- responses:
- "200":
- description: A list of organizations
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Organizations"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostOrgs
- tags:
- - Organizations
- summary: Create an organization
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- requestBody:
- description: Organization to create
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Organization"
- responses:
- "201":
- description: Organization created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Organization"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/orgs/{orgID}":
- get:
- operationId: GetOrgsID
- tags:
- - Organizations
- summary: Retrieve an organization
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The ID of the organization to get.
- responses:
- "200":
- description: Organization details
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Organization"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- patch:
- operationId: PatchOrgsID
- tags:
- - Organizations
- summary: Update an organization
- requestBody:
- description: Organization update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Organization"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The ID of the organization to get.
- responses:
- "200":
- description: Organization updated
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Organization"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- delete:
- operationId: DeleteOrgsID
- tags:
- - Organizations
- summary: Delete an organization
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The ID of the organization to delete.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: Organization not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/orgs/{orgID}/labels":
- get:
- operationId: GetOrgsIDLabels
- tags:
- - Organizations
- summary: List all labels for a organization
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- responses:
- "200":
- description: A list of all labels for an organization
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelsResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostOrgsIDLabels
- tags:
- - Organizations
- summary: Add a label to an organization
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- requestBody:
- description: Label to add
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelMapping"
- responses:
- "201":
- description: Returns the created label
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/orgs/{orgID}/labels/{labelID}":
- delete:
- operationId: DeleteOrgsIDLabelsID
- tags:
- - Organizations
- summary: Delete a label from an organization
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The label ID.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: Organization not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/orgs/{orgID}/secrets":
- get:
- operationId: GetOrgsIDSecrets
- tags:
- - Secrets
- - Organizations
- summary: List all secret keys for an organization
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- responses:
- "200":
- description: A list of all secret keys
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/SecretKeysResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- patch:
- operationId: PatchOrgsIDSecrets
- tags:
- - Secrets
- - Organizations
- summary: Update secrets in an organization
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- requestBody:
- description: Secret key value pairs to update/add
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Secrets"
- responses:
- "204":
- description: Keys successfully patched
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/orgs/{orgID}/secrets/delete": # had to make this because swagger wouldn't let me have a request body with a DELETE
- post:
- operationId: PostOrgsIDSecrets
- tags:
- - Secrets
- - Organizations
- summary: Delete secrets from an organization
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- requestBody:
- description: Secret key to delete
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/SecretKeys"
- responses:
- "204":
- description: Keys successfully patched
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/orgs/{orgID}/members":
- get:
- operationId: GetOrgsIDMembers
- tags:
- - Users
- - Organizations
- summary: List all members of an organization
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- responses:
- "200":
- description: A list of organization members
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceMembers"
- "404":
- description: Organization not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostOrgsIDMembers
- tags:
- - Users
- - Organizations
- summary: Add a member to an organization
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- requestBody:
- description: User to add as member
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AddResourceMemberRequestBody"
- responses:
- "201":
- description: Added to organization created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceMember"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/orgs/{orgID}/members/{userID}":
- delete:
- operationId: DeleteOrgsIDMembersID
- tags:
- - Users
- - Organizations
- summary: Remove a member from an organization
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the member to remove.
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- responses:
- "204":
- description: Member removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/orgs/{orgID}/owners":
- get:
- operationId: GetOrgsIDOwners
- tags:
- - Users
- - Organizations
- summary: List all owners of an organization
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- responses:
- "200":
- description: A list of organization owners
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceOwners"
- "404":
- description: Organization not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostOrgsIDOwners
- tags:
- - Users
- - Organizations
- summary: Add an owner to an organization
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- requestBody:
- description: User to add as owner
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AddResourceMemberRequestBody"
- responses:
- "201":
- description: Organization owner added
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceOwner"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/orgs/{orgID}/owners/{userID}":
- delete:
- operationId: DeleteOrgsIDOwnersID
- tags:
- - Users
- - Organizations
- summary: Remove an owner from an organization
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the owner to remove.
- - in: path
- name: orgID
- schema:
- type: string
- required: true
- description: The organization ID.
- responses:
- "204":
- description: Owner removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /packages:
- post:
- operationId: CreatePkg
- tags:
- - InfluxPackages
- summary: Create a new Influx package
- requestBody:
- description: Influx package to create.
- required: false
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/PkgCreate"
- responses:
- "200":
- description: Influx package created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Pkg"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /packages/apply:
- post:
- operationId: ApplyPkg
- tags:
- - InfluxPackages
- summary: Apply or dry-run an Influx package
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/PkgApply"
- text/yml:
- schema:
- $ref: "#/components/schemas/PkgApply"
- responses:
- "200":
- description: >
- Influx package dry-run successful, no new resources created.
- The provided diff and summary will not have IDs for resources
- that do not exist at the time of the dry run.
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/PkgSummary"
- "201":
- description: >
- Influx package applied successfully. Newly created resources created
- available in summary. The diff compares the state of the world before
- the package is applied with the changes the application will impose.
- This corresponds to `"dryRun": true`
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/PkgSummary"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /tasks:
- get:
- operationId: GetTasks
- tags:
- - Tasks
- summary: List all tasks
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: query
- name: name
- description: Returns task with a specific name.
- schema:
- type: string
- - in: query
- name: after
- schema:
- type: string
- description: Return tasks after a specified ID.
- - in: query
- name: user
- schema:
- type: string
- description: Filter tasks to a specific user ID.
- - in: query
- name: org
- schema:
- type: string
- description: Filter tasks to a specific organization name.
- - in: query
- name: orgID
- schema:
- type: string
- description: Filter tasks to a specific organization ID.
- - in: query
- name: status
- schema:
- type: string
- enum:
- - active
- - inactive
- description: Filter tasks by a status--"inactive" or "active".
- - in: query
- name: limit
- schema:
- type: integer
- minimum: 1
- maximum: 500
- default: 100
- description: The number of tasks to return
- responses:
- "200":
- description: A list of tasks
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Tasks"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostTasks
- tags:
- - Tasks
- summary: Create a new task
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- requestBody:
- description: Task to create
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/TaskCreateRequest"
- responses:
- "201":
- description: Task created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Task"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/tasks/{taskID}":
- get:
- operationId: GetTasksID
- tags:
- - Tasks
- summary: Retrieve a task
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- responses:
- "200":
- description: Task details
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Task"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- patch:
- operationId: PatchTasksID
- tags:
- - Tasks
- summary: Update a task
- description: Update a task. This will cancel all queued runs.
- requestBody:
- description: Task update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/TaskUpdateRequest"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- responses:
- "200":
- description: Task updated
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Task"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- delete:
- operationId: DeleteTasksID
- tags:
- - Tasks
- summary: Delete a task
- description: Deletes a task and all associated records
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The ID of the task to delete.
- responses:
- "204":
- description: Task deleted
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/tasks/{taskID}/runs":
- get:
- operationId: GetTasksIDRuns
- tags:
- - Tasks
- summary: List runs for a task
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The ID of the task to get runs for.
- - in: query
- name: after
- schema:
- type: string
- description: Returns runs after a specific ID.
- - in: query
- name: limit
- schema:
- type: integer
- minimum: 1
- maximum: 500
- default: 100
- description: The number of runs to return
- - in: query
- name: afterTime
- schema:
- type: string
- format: date-time
- description: Filter runs to those scheduled after this time, RFC3339
- - in: query
- name: beforeTime
- schema:
- type: string
- format: date-time
- description: Filter runs to those scheduled before this time, RFC3339
- responses:
- "200":
- description: A list of task runs
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Runs"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostTasksIDRuns
- tags:
- - Tasks
- summary: Manually start a task run, overriding the current schedule
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- requestBody:
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/RunManually"
- responses:
- "201":
- description: Run scheduled to start
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Run"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/tasks/{taskID}/runs/{runID}":
- get:
- operationId: GetTasksIDRunsID
- tags:
- - Tasks
- summary: Retrieve a single run for a task
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- - in: path
- name: runID
- schema:
- type: string
- required: true
- description: The run ID.
- responses:
- "200":
- description: The run record
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Run"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- delete:
- operationId: DeleteTasksIDRunsID
- tags:
- - Tasks
- summary: Cancel a running task
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- - in: path
- name: runID
- schema:
- type: string
- required: true
- description: The run ID.
- responses:
- "204":
- description: Delete has been accepted
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/tasks/{taskID}/runs/{runID}/retry":
- post:
- operationId: PostTasksIDRunsIDRetry
- tags:
- - Tasks
- summary: Retry a task run
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- - in: path
- name: runID
- schema:
- type: string
- required: true
- description: The run ID.
- responses:
- "200":
- description: Run that has been queued
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Run"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/tasks/{taskID}/logs":
- get:
- operationId: GetTasksIDLogs
- tags:
- - Tasks
- summary: Retrieve all logs for a task
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- responses:
- "200":
- description: All logs for a task
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Logs"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/tasks/{taskID}/runs/{runID}/logs":
- get:
- operationId: GetTasksIDRunsIDLogs
- tags:
- - Tasks
- summary: Retrieve all logs for a run
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: ID of task to get logs for.
- - in: path
- name: runID
- schema:
- type: string
- required: true
- description: ID of run to get logs for.
- responses:
- "200":
- description: All logs for a run
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Logs"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/tasks/{taskID}/labels":
- get:
- operationId: GetTasksIDLabels
- tags:
- - Tasks
- summary: List all labels for a task
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- responses:
- "200":
- description: A list of all labels for a task
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelsResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostTasksIDLabels
- tags:
- - Tasks
- summary: Add a label to a task
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- requestBody:
- description: Label to add
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelMapping"
- responses:
- "201":
- description: A list of all labels for a task
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/tasks/{taskID}/labels/{labelID}":
- delete:
- operationId: DeleteTasksIDLabelsID
- tags:
- - Tasks
- summary: Delete a label from a task
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The label ID.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: Task not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /me:
- get:
- operationId: GetMe
- tags:
- - Users
- summary: Return the current authenticated user
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- responses:
- "200":
- description: Currently authenticated user
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/User"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /me/password:
- put:
- operationId: PutMePassword
- tags:
- - Users
- summary: Update a password
- security:
- - BasicAuth: []
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- requestBody:
- description: New password
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/PasswordResetBody"
- responses:
- "204":
- description: Password successfully updated
- default:
- description: Unsuccessful authentication
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/tasks/{taskID}/members":
- get:
- operationId: GetTasksIDMembers
- tags:
- - Users
- - Tasks
- summary: List all task members
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- responses:
- "200":
- description: A list of users who have member privileges for a task
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceMembers"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostTasksIDMembers
- tags:
- - Users
- - Tasks
- summary: Add a member to a task
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- requestBody:
- description: User to add as member
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AddResourceMemberRequestBody"
- responses:
- "201":
- description: Added to task members
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceMember"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/tasks/{taskID}/members/{userID}":
- delete:
- operationId: DeleteTasksIDMembersID
- tags:
- - Users
- - Tasks
- summary: Remove a member from a task
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the member to remove.
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- responses:
- "204":
- description: Member removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/tasks/{taskID}/owners":
- get:
- operationId: GetTasksIDOwners
- tags:
- - Users
- - Tasks
- summary: List all owners of a task
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- responses:
- "200":
- description: A list of users who have owner privileges for a task
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceOwners"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostTasksIDOwners
- tags:
- - Users
- - Tasks
- summary: Add an owner to a task
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- requestBody:
- description: User to add as owner
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AddResourceMemberRequestBody"
- responses:
- "201":
- description: Added to task owners
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ResourceOwner"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/tasks/{taskID}/owners/{userID}":
- delete:
- operationId: DeleteTasksIDOwnersID
- tags:
- - Users
- - Tasks
- summary: Remove an owner from a task
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the owner to remove.
- - in: path
- name: taskID
- schema:
- type: string
- required: true
- description: The task ID.
- responses:
- "204":
- description: Owner removed
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /users:
- get:
- operationId: GetUsers
- tags:
- - Users
- summary: List all users
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- responses:
- "200":
- description: A list of users
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Users"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostUsers
- tags:
- - Users
- summary: Create a user
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- requestBody:
- description: User to create
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/User"
- responses:
- "201":
- description: User created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/User"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/users/{userID}":
- get:
- operationId: GetUsersID
- tags:
- - Users
- summary: Retrieve a user
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The user ID.
- responses:
- "200":
- description: User details
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/User"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- patch:
- operationId: PatchUsersID
- tags:
- - Users
- summary: Update a user
- requestBody:
- description: User update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/User"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the user to update.
- responses:
- "200":
- description: User updated
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/User"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- delete:
- operationId: DeleteUsersID
- tags:
- - Users
- summary: Delete a user
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The ID of the user to delete.
- responses:
- "204":
- description: User deleted
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/users/{userID}/password":
- post:
- operationId: PostUsersIDPassword
- tags:
- - Users
- summary: Update a password
- security:
- - BasicAuth: []
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: userID
- schema:
- type: string
- required: true
- description: The user ID.
- requestBody:
- description: New password
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/PasswordResetBody"
- responses:
- "204":
- description: Password successfully updated
- default:
- description: Unsuccessful authentication
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /checks:
- get:
- operationId: GetChecks
- tags:
- - Checks
- summary: Get all checks
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - $ref: "#/components/parameters/Offset"
- - $ref: "#/components/parameters/Limit"
- - in: query
- name: orgID
- required: true
- description: Only show checks that belong to a specific organization ID.
- schema:
- type: string
- responses:
- "200":
- description: A list of checks
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Checks"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: CreateCheck
- tags:
- - Checks
- summary: Add new check
- requestBody:
- description: Check to create
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/PostCheck"
- responses:
- "201":
- description: Check created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Check"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/checks/{checkID}":
- get:
- operationId: GetChecksID
- tags:
- - Checks
- summary: Get a check
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: checkID
- schema:
- type: string
- required: true
- description: The check ID.
- responses:
- "200":
- description: The check requested
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Check"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- put:
- operationId: PutChecksID
- tags:
- - Checks
- summary: Update a check
- requestBody:
- description: Check update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Check"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: checkID
- schema:
- type: string
- required: true
- description: The check ID.
- responses:
- "200":
- description: An updated check
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Check"
- "404":
- description: The check was not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- patch:
- operationId: PatchChecksID
- tags:
- - Checks
- summary: Update a check
- requestBody:
- description: Check update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/CheckPatch"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: checkID
- schema:
- type: string
- required: true
- description: The check ID.
- responses:
- "200":
- description: An updated check
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Check"
- "404":
- description: The check was not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- delete:
- operationId: DeleteChecksID
- tags:
- - Checks
- summary: Delete a check
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: checkID
- schema:
- type: string
- required: true
- description: The check ID.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: The check was not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/checks/{checkID}/labels":
- get:
- operationId: GetChecksIDLabels
- tags:
- - Checks
- summary: List all labels for a check
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: checkID
- schema:
- type: string
- required: true
- description: The check ID.
- responses:
- "200":
- description: A list of all labels for a check
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelsResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostChecksIDLabels
- tags:
- - Checks
- summary: Add a label to a check
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: checkID
- schema:
- type: string
- required: true
- description: The check ID.
- requestBody:
- description: Label to add
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelMapping"
- responses:
- "201":
- description: The label was added to the check
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/checks/{checkID}/labels/{labelID}":
- delete:
- operationId: DeleteChecksIDLabelsID
- tags:
- - Checks
- summary: Delete label from a check
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: checkID
- schema:
- type: string
- required: true
- description: The check ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The ID of the label to delete.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: Check or label not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /notificationRules:
- get:
- operationId: GetNotificationRules
- tags:
- - NotificationRules
- summary: Get all notification rules
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - $ref: "#/components/parameters/Offset"
- - $ref: "#/components/parameters/Limit"
- - in: query
- name: orgID
- required: true
- description: Only show notification rules that belong to a specific organization ID.
- schema:
- type: string
- - in: query
- name: checkID
- description: Only show notifications that belong to the specific check ID.
- schema:
- type: string
- - in: query
- name: tag
- description: Only return notification rules that "would match" statuses which contain the tag key value pairs provided.
- schema:
- type: string
- pattern: ^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$
- example: env:prod
- responses:
- "200":
- description: A list of notification rules
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/NotificationRules"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: CreateNotificationRule
- tags:
- - NotificationRules
- summary: Add a notification rule
- requestBody:
- description: Notification rule to create
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/PostNotificationRule"
- responses:
- "201":
- description: Notification rule created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/NotificationRule"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/checks/{checkID}/query":
- get:
- operationId: GetChecksIDQuery
- tags:
- - Checks
- summary: Get a check query
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: checkID
- schema:
- type: string
- required: true
- description: The check ID.
- responses:
- "200":
- description: The check query requested
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/FluxResponse"
- "400":
- description: Invalid request
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "404":
- description: Check not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/notificationRules/{ruleID}":
- get:
- operationId: GetNotificationRulesID
- tags:
- - NotificationRules
- summary: Get a notification rule
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: ruleID
- schema:
- type: string
- required: true
- description: The notification rule ID.
- responses:
- "200":
- description: The notification rule requested
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/NotificationRule"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- put:
- operationId: PutNotificationRulesID
- tags:
- - NotificationRules
- summary: Update a notification rule
- requestBody:
- description: Notification rule update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/NotificationRule"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: ruleID
- schema:
- type: string
- required: true
- description: The notification rule ID.
- responses:
- "200":
- description: An updated notification rule
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/NotificationRule"
- "404":
- description: The notification rule was not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- patch:
- operationId: PatchNotificationRulesID
- tags:
- - NotificationRules
- summary: Update a notification rule
- requestBody:
- description: Notification rule update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/NotificationRuleUpdate"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: ruleID
- schema:
- type: string
- required: true
- description: The notification rule ID.
- responses:
- "200":
- description: An updated notification rule
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/NotificationRule"
- "404":
- description: The notification rule was not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- delete:
- operationId: DeleteNotificationRulesID
- tags:
- - NotificationRules
- summary: Delete a notification rule
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: ruleID
- schema:
- type: string
- required: true
- description: The notification rule ID.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: The check was not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/notificationRules/{ruleID}/labels":
- get:
- operationId: GetNotificationRulesIDLabels
- tags:
- - NotificationRules
- summary: List all labels for a notification rule
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: ruleID
- schema:
- type: string
- required: true
- description: The notification rule ID.
- responses:
- "200":
- description: A list of all labels for a notification rule
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelsResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostNotificationRuleIDLabels
- tags:
- - NotificationRules
- summary: Add a label to a notification rule
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: ruleID
- schema:
- type: string
- required: true
- description: The notification rule ID.
- requestBody:
- description: Label to add
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelMapping"
- responses:
- "201":
- description: The label was added to the notification rule
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/notificationRules/{ruleID}/labels/{labelID}":
- delete:
- operationId: DeleteNotificationRulesIDLabelsID
- tags:
- - NotificationRules
- summary: Delete label from a notification rule
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: ruleID
- schema:
- type: string
- required: true
- description: The notification rule ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The ID of the label to delete.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: Rule or label not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/notificationRules/{ruleID}/query":
- get:
- operationId: GetNotificationRulesIDQuery
- tags:
- - Rules
- summary: Get a notification rule query
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: ruleID
- schema:
- type: string
- required: true
- description: The notification rule ID.
- responses:
- "200":
- description: The notification rule query requested
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/FluxResponse"
- "400":
- description: Invalid request
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "404":
- description: Notification rule not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- /notificationEndpoints:
- get:
- operationId: GetNotificationEndpoints
- tags:
- - NotificationEndpoints
- summary: Get all notification endpoints
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - $ref: "#/components/parameters/Offset"
- - $ref: "#/components/parameters/Limit"
- - in: query
- name: orgID
- required: true
- description: Only show notification endpoints that belong to specific organization ID.
- schema:
- type: string
- responses:
- "200":
- description: A list of notification endpoints
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/NotificationEndpoints"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: CreateNotificationEndpoint
- tags:
- - NotificationEndpoints
- summary: Add a notification endpoint
- requestBody:
- description: Notification endpoint to create
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/PostNotificationEndpoint"
- responses:
- "201":
- description: Notification endpoint created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/NotificationEndpoint"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/notificationEndpoints/{endpointID}":
- get:
- operationId: GetNotificationEndpointsID
- tags:
- - NotificationEndpoints
- summary: Get a notification endpoint
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: endpointID
- schema:
- type: string
- required: true
- description: The notification endpoint ID.
- responses:
- "200":
- description: The notification endpoint requested
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/NotificationEndpoint"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- put:
- operationId: PutNotificationEndpointsID
- tags:
- - NotificationEndpoints
- summary: Update a notification endpoint
- requestBody:
- description: A new notification endpoint to replace the existing endpoint with
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/NotificationEndpoint"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: endpointID
- schema:
- type: string
- required: true
- description: The notification endpoint ID.
- responses:
- "200":
- description: An updated notification endpoint
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/NotificationEndpoint"
- "404":
- description: The notification endpoint was not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- patch:
- operationId: PatchNotificationEndpointsID
- tags:
- - NotificationEndpoints
- summary: Update a notification endpoint
- requestBody:
- description: Check update to apply
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/NotificationEndpointUpdate"
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: endpointID
- schema:
- type: string
- required: true
- description: The notification endpoint ID.
- responses:
- "200":
- description: An updated notification endpoint
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/NotificationEndpoint"
- "404":
- description: The notification endpoint was not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- delete:
- operationId: DeleteNotificationEndpointsID
- tags:
- - NotificationEndpoints
- summary: Delete a notification endpoint
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: endpointID
- schema:
- type: string
- required: true
- description: The notification endpoint ID.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: The endpoint was not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/notificationEndpoints/{endpointID}/labels":
- get:
- operationId: GetNotificationEndpointsIDLabels
- tags:
- - NotificationEndpoints
- summary: List all labels for a notification endpoint
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: endpointID
- schema:
- type: string
- required: true
- description: The notification endpoint ID.
- responses:
- "200":
- description: A list of all labels for a notification endpoint
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelsResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- post:
- operationId: PostNotificationEndpointIDLabels
- tags:
- - NotificationEndpoints
- summary: Add a label to a notification endpoint
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: endpointID
- schema:
- type: string
- required: true
- description: The notification endpoint ID.
- requestBody:
- description: Label to add
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelMapping"
- responses:
- "201":
- description: The label was added to the notification endpoint
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LabelResponse"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- "/notificationEndpoints/{endpointID}/labels/{labelID}":
- delete:
- operationId: DeleteNotificationEndpointsIDLabelsID
- tags:
- - NotificationEndpoints
- summary: Delete a label from a notification endpoint
- parameters:
- - $ref: "#/components/parameters/TraceSpan"
- - in: path
- name: endpointID
- schema:
- type: string
- required: true
- description: The notification endpoint ID.
- - in: path
- name: labelID
- schema:
- type: string
- required: true
- description: The ID of the label to delete.
- responses:
- "204":
- description: Delete has been accepted
- "404":
- description: Endpoint or label not found
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
- default:
- description: Unexpected error
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/Error"
-components:
- parameters:
- Offset:
- in: query
- name: offset
- required: false
- schema:
- type: integer
- minimum: 0
- Limit:
- in: query
- name: limit
- required: false
- schema:
- type: integer
- minimum: 1
- maximum: 100
- default: 20
- Descending:
- in: query
- name: descending
- required: false
- schema:
- type: boolean
- default: false
- SortBy:
- in: query
- name: sortBy
- required: false
- schema:
- type: string
- TraceSpan:
- in: header
- name: Zap-Trace-Span
- description: OpenTracing span context
- example:
- trace_id: "1"
- span_id: "1"
- baggage:
- key: value
- required: false
- schema:
- type: string
- schemas:
- LanguageRequest:
- description: Flux query to be analyzed.
- type: object
- required:
- - query
- properties:
- query:
- description: Flux query script to be analyzed
- type: string
- Query:
- description: Query influx using the Flux language
- type: object
- required:
- - query
- properties:
- extern:
- $ref: "#/components/schemas/File"
- query:
- description: Query script to execute.
- type: string
- type:
- description: The type of query. Must be "flux".
- type: string
- enum:
- - flux
- dialect:
- $ref: "#/components/schemas/Dialect"
- now:
- description: Specifies the time that should be reported as "now" in the query. Default is the server's now time.
- type: string
- format: date-time
- Package:
- description: Represents a complete package source tree.
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- path:
- description: Package import path
- type: string
- package:
- description: Package name
- type: string
- files:
- description: Package files
- type: array
- items:
- $ref: "#/components/schemas/File"
- File:
- description: Represents a source from a single file
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- name:
- description: The name of the file.
- type: string
- package:
- $ref: "#/components/schemas/PackageClause"
- imports:
- description: A list of package imports
- type: array
- items:
- $ref: "#/components/schemas/ImportDeclaration"
- body:
- description: List of Flux statements
- type: array
- items:
- $ref: "#/components/schemas/Statement"
- PackageClause:
- description: Defines a package identifier
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- name:
- $ref: "#/components/schemas/Identifier"
- ImportDeclaration:
- description: Declares a package import
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- as:
- $ref: "#/components/schemas/Identifier"
- path:
- $ref: "#/components/schemas/StringLiteral"
- DeletePredicateRequest:
- description: The delete predicate request.
- type: object
- required: [start, stop]
- properties:
- start:
- description: RFC3339Nano
- type: string
- format: date-time
- stop:
- description: RFC3339Nano
- type: string
- format: date-time
- predicate:
- description: InfluxQL-like delete statement
- example: tag1="value1" and (tag2="value2" and tag3!="value3")
- type: string
- Node:
- oneOf:
- - $ref: "#/components/schemas/Expression"
- - $ref: "#/components/schemas/Block"
- Block:
- description: A set of statements
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- body:
- description: Block body
- type: array
- items:
- $ref: "#/components/schemas/Statement"
- Statement:
- oneOf:
- - $ref: "#/components/schemas/BadStatement"
- - $ref: "#/components/schemas/VariableAssignment"
- - $ref: "#/components/schemas/MemberAssignment"
- - $ref: "#/components/schemas/ExpressionStatement"
- - $ref: "#/components/schemas/ReturnStatement"
- - $ref: "#/components/schemas/OptionStatement"
- - $ref: "#/components/schemas/BuiltinStatement"
- - $ref: "#/components/schemas/TestStatement"
- BadStatement:
- description: A placeholder for statements for which no correct statement nodes can be created
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- text:
- description: Raw source text
- type: string
- VariableAssignment:
- description: Represents the declaration of a variable
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- id:
- $ref: "#/components/schemas/Identifier"
- init:
- $ref: "#/components/schemas/Expression"
- MemberAssignment:
- description: Object property assignment
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- member:
- $ref: "#/components/schemas/MemberExpression"
- init:
- $ref: "#/components/schemas/Expression"
- ExpressionStatement:
- description: May consist of an expression that does not return a value and is executed solely for its side-effects
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- expression:
- $ref: "#/components/schemas/Expression"
- ReturnStatement:
- description: Defines an expression to return
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- argument:
- $ref: "#/components/schemas/Expression"
- OptionStatement:
- description: A single variable declaration
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- assignment:
- oneOf:
- - $ref: "#/components/schemas/VariableAssignment"
- - $ref: "#/components/schemas/MemberAssignment"
- BuiltinStatement:
- description: Declares a builtin identifier and its type
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- id:
- $ref: "#/components/schemas/Identifier"
- TestStatement:
- description: Declares a Flux test case
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- assignment:
- $ref: "#/components/schemas/VariableAssignment"
- Expression:
- oneOf:
- - $ref: "#/components/schemas/ArrayExpression"
- - $ref: "#/components/schemas/FunctionExpression"
- - $ref: "#/components/schemas/BinaryExpression"
- - $ref: "#/components/schemas/CallExpression"
- - $ref: "#/components/schemas/ConditionalExpression"
- - $ref: "#/components/schemas/LogicalExpression"
- - $ref: "#/components/schemas/MemberExpression"
- - $ref: "#/components/schemas/IndexExpression"
- - $ref: "#/components/schemas/ObjectExpression"
- - $ref: "#/components/schemas/ParenExpression"
- - $ref: "#/components/schemas/PipeExpression"
- - $ref: "#/components/schemas/UnaryExpression"
- - $ref: "#/components/schemas/BooleanLiteral"
- - $ref: "#/components/schemas/DateTimeLiteral"
- - $ref: "#/components/schemas/DurationLiteral"
- - $ref: "#/components/schemas/FloatLiteral"
- - $ref: "#/components/schemas/IntegerLiteral"
- - $ref: "#/components/schemas/PipeLiteral"
- - $ref: "#/components/schemas/RegexpLiteral"
- - $ref: "#/components/schemas/StringLiteral"
- - $ref: "#/components/schemas/UnsignedIntegerLiteral"
- - $ref: "#/components/schemas/Identifier"
- ArrayExpression:
- description: Used to create and directly specify the elements of an array object
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- elements:
- description: Elements of the array
- type: array
- items:
- $ref: "#/components/schemas/Expression"
- FunctionExpression:
- description: Function expression
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- params:
- description: Function parameters
- type: array
- items:
- $ref: "#/components/schemas/Property"
- body:
- $ref: "#/components/schemas/Node"
- BinaryExpression:
- description: uses binary operators to act on two operands in an expression
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- operator:
- type: string
- left:
- $ref: "#/components/schemas/Expression"
- right:
- $ref: "#/components/schemas/Expression"
- CallExpression:
- description: Represents a function call
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- callee:
- $ref: "#/components/schemas/Expression"
- arguments:
- description: Function arguments
- type: array
- items:
- $ref: "#/components/schemas/Expression"
- ConditionalExpression:
- description: Selects one of two expressions, `Alternate` or `Consequent`, depending on a third boolean expression, `Test`
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- test:
- $ref: "#/components/schemas/Expression"
- alternate:
- $ref: "#/components/schemas/Expression"
- consequent:
- $ref: "#/components/schemas/Expression"
- LogicalExpression:
- description: Represents the rule conditions that collectively evaluate to either true or false
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- operator:
- type: string
- left:
- $ref: "#/components/schemas/Expression"
- right:
- $ref: "#/components/schemas/Expression"
- MemberExpression:
- description: Represents accessing a property of an object
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- object:
- $ref: "#/components/schemas/Expression"
- property:
- $ref: "#/components/schemas/PropertyKey"
- IndexExpression:
- description: Represents indexing into an array
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- array:
- $ref: "#/components/schemas/Expression"
- index:
- $ref: "#/components/schemas/Expression"
- ObjectExpression:
- description: Allows the declaration of an anonymous object within a declaration
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- properties:
- description: Object properties
- type: array
- items:
- $ref: "#/components/schemas/Property"
- ParenExpression:
- description: Represents an expression wrapped in parenthesis
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- expression:
- $ref: "#/components/schemas/Expression"
- PipeExpression:
- description: Call expression with pipe argument
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- argument:
- $ref: "#/components/schemas/Expression"
- call:
- $ref: "#/components/schemas/CallExpression"
- UnaryExpression:
- description: Uses operators to act on a single operand in an expression
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- operator:
- type: string
- argument:
- $ref: "#/components/schemas/Expression"
- BooleanLiteral:
- description: Represents boolean values
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- value:
- type: boolean
- DateTimeLiteral:
- description: Represents an instant in time with nanosecond precision using the syntax of golang's RFC3339 Nanosecond variant
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- value:
- type: string
- DurationLiteral:
- description: Represents the elapsed time between two instants as an int64 nanosecond count with syntax of golang's time.Duration
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- values:
- description: Duration values
- type: array
- items:
- $ref: "#/components/schemas/Duration"
- FloatLiteral:
- description: Represents floating point numbers according to the double representations defined by the IEEE-754-1985
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- value:
- type: number
- IntegerLiteral:
- description: Represents integer numbers
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- value:
- type: string
- PipeLiteral:
- description: Represents a specialized literal value, indicating the left hand value of a pipe expression
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- RegexpLiteral:
- description: Expressions begin and end with `/` and are regular expressions with syntax accepted by RE2
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- value:
- type: string
- StringLiteral:
- description: Expressions begin and end with double quote marks
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- value:
- type: string
- UnsignedIntegerLiteral:
- description: Represents integer numbers
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- value:
- type: string
- Duration:
- description: A pair consisting of length of time and the unit of time measured. It is the atomic unit from which all duration literals are composed.
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- magnitude:
- type: integer
- unit:
- type: string
- Property:
- description: The value associated with a key
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- key:
- $ref: "#/components/schemas/PropertyKey"
- value:
- $ref: "#/components/schemas/Expression"
- PropertyKey:
- oneOf:
- - $ref: "#/components/schemas/Identifier"
- - $ref: "#/components/schemas/StringLiteral"
- Identifier:
- description: A valid Flux identifier
- type: object
- properties:
- type:
- $ref: "#/components/schemas/NodeType"
- name:
- type: string
- NodeType:
- description: Type of AST node
- type: string
- Dialect:
- description: Dialect are options to change the default CSV output format; https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions
- type: object
- properties:
- header:
- description: If true, the results will contain a header row
- type: boolean
- default: true
- delimiter:
- description: Separator between cells; the default is ,
- type: string
- default: ","
- maxLength: 1
- minLength: 1
- annotations:
- description: Https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns
- type: array
- items:
- type: string
- enum:
- - "group"
- - "datatype"
- - "default"
- uniqueItems: true
- commentPrefix:
- description: Character prefixed to comment strings
- type: string
- default: "#"
- maxLength: 1
- minLength: 0
- dateTimeFormat:
- description: Format of timestamps
- type: string
- default: "RFC3339"
- enum:
- - RFC3339
- - RFC3339Nano
- Permission:
- required: [action, resource]
- properties:
- action:
- type: string
- enum:
- - read
- - write
- resource:
- type: object
- required: [type]
- properties:
- type:
- type: string
- enum:
- - authorizations
- - buckets
- - dashboards
- - orgs
- - sources
- - tasks
- - telegrafs
- - users
- - variables
- - scrapers
- - secrets
- - labels
- - views
- - documents
- - notificationRules
- - notificationEndpoints
- - checks
- - dbrp
- id:
- type: string
- nullable: true
- description: If ID is set that is a permission for a specific resource. if it is not set it is a permission for all resources of that resource type.
- name:
- type: string
- nullable: true
- description: Optional name of the resource if the resource has a name field.
- orgID:
- type: string
- nullable: true
- description: If orgID is set that is a permission for all resources owned my that org. if it is not set it is a permission for all resources of that resource type.
- org:
- type: string
- nullable: true
- description: Optional name of the organization of the organization with orgID.
- AuthorizationUpdateRequest:
- properties:
- status:
- description: If inactive the token is inactive and requests using the token will be rejected.
- default: active
- type: string
- enum:
- - active
- - inactive
- description:
- type: string
- description: A description of the token.
- Authorization:
- required: [orgID, permissions]
- allOf:
- - $ref: "#/components/schemas/AuthorizationUpdateRequest"
- - type: object
- properties:
- createdAt:
- type: string
- format: date-time
- readOnly: true
- updatedAt:
- type: string
- format: date-time
- readOnly: true
- orgID:
- type: string
- description: ID of org that authorization is scoped to.
- permissions:
- type: array
- minLength: 1
- description: List of permissions for an auth. An auth must have at least one Permission.
- items:
- $ref: "#/components/schemas/Permission"
- id:
- readOnly: true
- type: string
- token:
- readOnly: true
- type: string
- description: Passed via the Authorization Header and Token Authentication type.
- userID:
- readOnly: true
- type: string
- description: ID of user that created and owns the token.
- user:
- readOnly: true
- type: string
- description: Name of user that created and owns the token.
- org:
- readOnly: true
- type: string
- description: Name of the org token is scoped to.
- links:
- type: object
- readOnly: true
- example:
- self: "/api/v2/authorizations/1"
- user: "/api/v2/users/12"
- properties:
- self:
- readOnly: true
- $ref: "#/components/schemas/Link"
- user:
- readOnly: true
- $ref: "#/components/schemas/Link"
- Authorizations:
- type: object
- properties:
- links:
- readOnly: true
- $ref: "#/components/schemas/Links"
- authorizations:
- type: array
- items:
- $ref: "#/components/schemas/Authorization"
- PostBucketRequest:
- properties:
- orgID:
- type: string
- name:
- type: string
- description:
- type: string
- rp:
- type: string
- retentionRules:
- type: array
- description: Rules to expire or retain data. No rules means data never expires.
- items:
- type: object
- properties:
- type:
- type: string
- default: expire
- enum:
- - expire
- everySeconds:
- type: integer
- description: Duration in seconds for how long data will be kept in the database.
- example: 86400
- minimum: 1
- required: [type, everySeconds]
- required: [name, retentionRules]
- Bucket:
- properties:
- links:
- type: object
- readOnly: true
- example:
- labels: "/api/v2/buckets/1/labels"
- members: "/api/v2/buckets/1/members"
- org: "/api/v2/orgs/2"
- owners: "/api/v2/buckets/1/owners"
- self: "/api/v2/buckets/1"
- write: "/api/v2/write?org=2&bucket=1"
- properties:
- labels:
- description: URL to retrieve labels for this bucket
- $ref: "#/components/schemas/Link"
- members:
- description: URL to retrieve members that can read this bucket
- $ref: "#/components/schemas/Link"
- org:
- description: URL to retrieve parent organization for this bucket
- $ref: "#/components/schemas/Link"
- owners:
- description: URL to retrieve owners that can read and write to this bucket.
- $ref: "#/components/schemas/Link"
- self:
- description: URL for this bucket
- $ref: "#/components/schemas/Link"
- write:
- description: URL to write line protocol for this bucket
- $ref: "#/components/schemas/Link"
- id:
- readOnly: true
- type: string
- type:
- readOnly: true
- type: string
- default: user
- enum:
- - user
- - system
- name:
- type: string
- description:
- type: string
- orgID:
- type: string
- rp:
- type: string
- createdAt:
- type: string
- format: date-time
- readOnly: true
- updatedAt:
- type: string
- format: date-time
- readOnly: true
- retentionRules:
- type: array
- description: Rules to expire or retain data. No rules means data never expires.
- items:
- type: object
- properties:
- type:
- type: string
- default: expire
- enum:
- - expire
- everySeconds:
- type: integer
- description: Duration in seconds for how long data will be kept in the database.
- example: 86400
- minimum: 1
- required: [type, everySeconds]
- labels:
- $ref: "#/components/schemas/Labels"
- required: [name, retentionRules]
- Buckets:
- type: object
- properties:
- links:
- readOnly: true
- $ref: "#/components/schemas/Links"
- buckets:
- type: array
- items:
- $ref: "#/components/schemas/Bucket"
- Link:
- type: string
- format: uri
- readOnly: true
- description: URI of resource.
- Links:
- type: object
- properties:
- next:
- $ref: "#/components/schemas/Link"
- self:
- $ref: "#/components/schemas/Link"
- prev:
- $ref: "#/components/schemas/Link"
- required: [self]
- Logs:
- type: object
- properties:
- events:
- readOnly: true
- type: array
- items:
- $ref: "#/components/schemas/LogEvent"
- LogEvent:
- type: object
- properties:
- time:
- readOnly: true
- description: Time event occurred, RFC3339Nano.
- type: string
- format: date-time
- message:
- readOnly: true
- description: A description of the event that occurred.
- type: string
- example: Halt and catch fire
- Organization:
- properties:
- links:
- type: object
- readOnly: true
- example:
- self: "/api/v2/orgs/1"
- members: "/api/v2/orgs/1/members"
- owners: "/api/v2/orgs/1/owners"
- labels: "/api/v2/orgs/1/labels"
- secrets: "/api/v2/orgs/1/secrets"
- buckets: "/api/v2/buckets?org=myorg"
- tasks: "/api/v2/tasks?org=myorg"
- dashboards: "/api/v2/dashboards?org=myorg"
- properties:
- self:
- $ref: "#/components/schemas/Link"
- members:
- $ref: "#/components/schemas/Link"
- owners:
- $ref: "#/components/schemas/Link"
- labels:
- $ref: "#/components/schemas/Link"
- secrets:
- $ref: "#/components/schemas/Link"
- buckets:
- $ref: "#/components/schemas/Link"
- tasks:
- $ref: "#/components/schemas/Link"
- dashboards:
- $ref: "#/components/schemas/Link"
- id:
- readOnly: true
- type: string
- name:
- type: string
- description:
- type: string
- createdAt:
- type: string
- format: date-time
- readOnly: true
- updatedAt:
- type: string
- format: date-time
- readOnly: true
- status:
- description: If inactive the organization is inactive.
- default: active
- type: string
- enum:
- - active
- - inactive
- required: [name]
- Organizations:
- type: object
- properties:
- links:
- $ref: "#/components/schemas/Links"
- orgs:
- type: array
- items:
- $ref: "#/components/schemas/Organization"
- PkgApply:
- type: object
- properties:
- apply:
- type: boolean
- package:
- $ref: "#/components/schemas/Pkg"
- PkgCreate:
- type: object
- properties:
- pkgName:
- type: string
- pkgDescription:
- type: string
- pkgVersion:
- type: string
- resources:
- type: object
- properties:
- id:
- type: string
- kind:
- type: string
- enum:
- - bucket
- - dashboard
- - label
- - variable
- name:
- type: string
- required: [id, kind]
- Pkg:
- type: object
- properties:
- apiVersion:
- type: string
- kind:
- type: string
- enum:
- - package
- meta:
- type: object
- properties:
- description:
- type: string
- pkgName:
- type: string
- pkgVersion:
- type: string
- spec:
- type: object
- properties:
- resources:
- type: array
- items:
- type: object
- PkgSummary:
- type: object
- properties:
- summary:
- type: object
- properties:
- buckets:
- type: array
- items:
- allOf:
- - $ref: "#/components/schemas/Bucket"
- - type: object
- properties:
- labelAssociations:
- type: array
- items:
- $ref: "#/components/schemas/Label"
- labels:
- type: array
- items:
- $ref: "#/components/schemas/Label"
- dashboards:
- type: array
- items:
- type: object
- properties:
- id:
- type: "string"
- orgID:
- type: "string"
- name:
- type: "string"
- description:
- type: "string"
- labelAssociations:
- type: array
- items:
- $ref: "#/components/schemas/Label"
- charts:
- type: array
- items:
- $ref: "#/components/schemas/PkgChart"
- labelMappings:
- type: array
- items:
- type: object
- properties:
- resourceName:
- type: string
- resourceID:
- type: string
- resourceType:
- type: string
- labelName:
- type: string
- labelID:
- type: string
- variables:
- type: array
- items:
- allOf:
- - $ref: "#/components/schemas/Variable"
- - type: object
- properties:
- labelAssociations:
- type: array
- items:
- $ref: "#/components/schemas/Label"
- diff:
- type: object
- properties:
- buckets:
- type: array
- items:
- type: object
- properties:
- id:
- type: string
- name:
- type: string
- oldDescription:
- type: string
- newDescription:
- type: string
- oldRP:
- type: string
- newRP:
- type: string
- dashboards:
- type: array
- items:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- charts:
- type: array
- items:
- $ref: "#/components/schemas/PkgChart"
- labels:
- type: array
- items:
- type: object
- properties:
- id:
- type: string
- name:
- type: string
- oldDescription:
- type: string
- newDescription:
- type: string
- oldColor:
- type: string
- newColor:
- type: string
- labelMappings:
- type: array
- items:
- type: object
- properties:
- isNew:
- type: boolean
- resourceType:
- type: string
- resourceID:
- type: string
- resourceName:
- type: string
- labelID:
- type: string
- labelName:
- type: string
- variables:
- type: array
- items:
- type: object
- properties:
- id:
- type: string
- name:
- type: string
- oldDescription:
- type: string
- newDescription:
- type: string
- oldArgs:
- $ref: "#/components/schemas/VariableProperties"
- newArgs:
- $ref: "#/components/schemas/VariableProperties"
- errors:
- type: array
- items:
- type: object
- properties:
- kind:
- type: string
- reason:
- type: string
- fields:
- type: array
- items:
- type: string
- indexes:
- type: array
- items:
- type: integer
- PkgChart:
- type: object
- properties:
- xPos:
- type: integer
- yPos:
- type: integer
- height:
- type: integer
- width:
- type: integer
- properties: # field name is properties
- $ref: "#/components/schemas/ViewProperties"
- Runs:
- type: object
- properties:
- links:
- readOnly: true
- $ref: "#/components/schemas/Links"
- runs:
- type: array
- items:
- $ref: "#/components/schemas/Run"
- Run:
- properties:
- id:
- readOnly: true
- type: string
- taskID:
- readOnly: true
- type: string
- status:
- readOnly: true
- type: string
- enum:
- - scheduled
- - started
- - failed
- - success
- - canceled
- scheduledFor:
- description: Time used for run's "now" option, RFC3339.
- type: string
- format: date-time
- log:
- description: An array of logs associated with the run.
- type: array
- readOnly: true
- items:
- type: object
- properties:
- runID:
- type: string
- time:
- type: string
- message:
- type: string
- startedAt:
- readOnly: true
- description: Time run started executing, RFC3339Nano.
- type: string
- format: date-time
- finishedAt:
- readOnly: true
- description: Time run finished executing, RFC3339Nano.
- type: string
- format: date-time
- requestedAt:
- readOnly: true
- description: Time run was manually requested, RFC3339Nano.
- type: string
- format: date-time
- links:
- type: object
- readOnly: true
- example:
- self: "/api/v2/tasks/1/runs/1"
- task: "/api/v2/tasks/1"
- retry: "/api/v2/tasks/1/runs/1/retry"
- properties:
- self:
- type: string
- format: uri
- task:
- type: string
- format: uri
- retry:
- type: string
- format: uri
- RunManually:
- properties:
- scheduledFor:
- nullable: true
- description: Time used for run's "now" option, RFC3339. Default is the server's now time.
- type: string
- format: date-time
- Tasks:
- type: object
- properties:
- links:
- readOnly: true
- $ref: "#/components/schemas/Links"
- tasks:
- type: array
- items:
- $ref: "#/components/schemas/Task"
- Task:
- type: object
- properties:
- id:
- readOnly: true
- type: string
- type:
- description: The type of task, this can be used for filtering tasks on list actions.
- type: string
- orgID:
- description: The ID of the organization that owns this Task.
- type: string
- org:
- description: The name of the organization that owns this Task.
- type: string
- name:
- description: The name of the task.
- type: string
- description:
- description: An optional description of the task.
- type: string
- status:
- $ref: "#/components/schemas/TaskStatusType"
- labels:
- $ref: "#/components/schemas/Labels"
- authorizationID:
- description: The ID of the authorization used when this task communicates with the query engine.
- type: string
- flux:
- description: The Flux script to run for this task.
- type: string
- every:
- description: A simple task repetition schedule; parsed from Flux.
- type: string
- cron:
- description: A task repetition schedule in the form '* * * * * *'; parsed from Flux.
- type: string
- offset:
- description: Duration to delay after the schedule, before executing the task; parsed from flux, if set to zero it will remove this option and use 0 as the default.
- type: string
- latestCompleted:
- description: Timestamp of latest scheduled, completed run, RFC3339.
- type: string
- format: date-time
- readOnly: true
- lastRunStatus:
- readOnly: true
- type: string
- enum:
- - failed
- - success
- - canceled
- lastRunError:
- readOnly: true
- type: string
- createdAt:
- type: string
- format: date-time
- readOnly: true
- updatedAt:
- type: string
- format: date-time
- readOnly: true
- links:
- type: object
- readOnly: true
- example:
- self: "/api/v2/tasks/1"
- owners: "/api/v2/tasks/1/owners"
- members: "/api/v2/tasks/1/members"
- labels: "/api/v2/tasks/1/labels"
- runs: "/api/v2/tasks/1/runs"
- logs: "/api/v2/tasks/1/logs"
- properties:
- self:
- $ref: "#/components/schemas/Link"
- owners:
- $ref: "#/components/schemas/Link"
- members:
- $ref: "#/components/schemas/Link"
- runs:
- $ref: "#/components/schemas/Link"
- logs:
- $ref: "#/components/schemas/Link"
- labels:
- $ref: "#/components/schemas/Link"
- required: [id, name, orgID, flux]
- TaskStatusType:
- type: string
- enum: [active, inactive]
- User:
- properties:
- id:
- readOnly: true
- type: string
- oauthID:
- type: string
- name:
- type: string
- status:
- description: If inactive the user is inactive.
- default: active
- type: string
- enum:
- - active
- - inactive
- links:
- type: object
- readOnly: true
- example:
- self: "/api/v2/users/1"
- properties:
- self:
- type: string
- format: uri
- required: [name]
- Users:
- type: object
- properties:
- links:
- type: object
- properties:
- self:
- type: string
- format: uri
- users:
- type: array
- items:
- $ref: "#/components/schemas/User"
- ResourceMember:
- allOf:
- - $ref: "#/components/schemas/User"
- - type: object
- properties:
- role:
- type: string
- default: member
- enum:
- - member
- ResourceMembers:
- type: object
- properties:
- links:
- type: object
- properties:
- self:
- type: string
- format: uri
- users:
- type: array
- items:
- $ref: "#/components/schemas/ResourceMember"
- ResourceOwner:
- allOf:
- - $ref: "#/components/schemas/User"
- - type: object
- properties:
- role:
- type: string
- default: owner
- enum:
- - owner
- ResourceOwners:
- type: object
- properties:
- links:
- type: object
- properties:
- self:
- type: string
- format: uri
- users:
- type: array
- items:
- $ref: "#/components/schemas/ResourceOwner"
- FluxSuggestions:
- type: object
- properties:
- funcs:
- type: array
- items:
- $ref: "#/components/schemas/FluxSuggestion"
- FluxSuggestion:
- type: object
- properties:
- name:
- type: string
- params:
- type: object
- additionalProperties:
- type: string
- Routes:
- properties:
- authorizations:
- type: string
- format: uri
- buckets:
- type: string
- format: uri
- dashboards:
- type: string
- format: uri
- external:
- type: object
- properties:
- statusFeed:
- type: string
- format: uri
- variables:
- type: string
- format: uri
- me:
- type: string
- format: uri
- orgs:
- type: string
- format: uri
- query:
- type: object
- properties:
- self:
- type: string
- format: uri
- ast:
- type: string
- format: uri
- analyze:
- type: string
- format: uri
- suggestions:
- type: string
- format: uri
- setup:
- type: string
- format: uri
- signin:
- type: string
- format: uri
- signout:
- type: string
- format: uri
- sources:
- type: string
- format: uri
- system:
- type: object
- properties:
- metrics:
- type: string
- format: uri
- debug:
- type: string
- format: uri
- health:
- type: string
- format: uri
- tasks:
- type: string
- format: uri
- telegrafs:
- type: string
- format: uri
- users:
- type: string
- format: uri
- write:
- type: string
- format: uri
- Error:
- properties:
- code:
- description: Code is the machine-readable error code.
- readOnly: true
- type: string
- # This set of enumerations must remain in sync with the constants defined in errors.go
- enum:
- - internal error
- - not found
- - conflict
- - invalid
- - unprocessable entity
- - empty value
- - unavailable
- - forbidden
- - too many requests
- - unauthorized
- - method not allowed
- message:
- readOnly: true
- description: Message is a human-readable message.
- type: string
- required: [code, message]
- LineProtocolError:
- properties:
- code:
- description: Code is the machine-readable error code.
- readOnly: true
- type: string
- enum:
- - internal error
- - not found
- - conflict
- - invalid
- - empty value
- - unavailable
- message:
- readOnly: true
- description: Message is a human-readable message.
- type: string
- op:
- readOnly: true
- description: Op describes the logical code operation during error. Useful for debugging.
- type: string
- err:
- readOnly: true
- description: Err is a stack of errors that occurred during processing of the request. Useful for debugging.
- type: string
- line:
- readOnly: true
- description: First line within sent body containing malformed data
- type: integer
- format: int32
- required: [code, message, op, err]
- LineProtocolLengthError:
- properties:
- code:
- description: Code is the machine-readable error code.
- readOnly: true
- type: string
- enum:
- - invalid
- message:
- readOnly: true
- description: Message is a human-readable message.
- type: string
- maxLength:
- readOnly: true
- description: Max length in bytes for a body of line-protocol.
- type: integer
- format: int32
- required: [code, message, maxLength]
- Field:
- type: object
- properties:
- value:
- description: >-
- value is the value of the field. Meaning of the value is implied by
- the `type` key
- type: string
- type:
- description: >-
- `type` describes the field type. `func` is a function. `field` is a field reference.
- type: string
- enum:
- - func
- - field
- - integer
- - number
- - regex
- - wildcard
- alias:
- description: >-
- Alias overrides the field name in the returned response. Applies only
- if type is `func`
- type: string
- args:
- description: Args are the arguments to the function
- type: array
- items:
- $ref: "#/components/schemas/Field"
- BuilderConfig:
- type: object
- properties:
- buckets:
- type: array
- items:
- type: string
- tags:
- type: array
- items:
- $ref: "#/components/schemas/BuilderTagsType"
- functions:
- type: array
- items:
- $ref: "#/components/schemas/BuilderFunctionsType"
- aggregateWindow:
- type: object
- properties:
- period:
- type: string
- BuilderTagsType:
- type: object
- properties:
- key:
- type: string
- values:
- type: array
- items:
- type: string
- BuilderFunctionsType:
- type: object
- properties:
- name:
- type: string
- DashboardQuery:
- type: object
- properties:
- text:
- type: string
- description: The text of the Flux query.
- editMode:
- $ref: "#/components/schemas/QueryEditMode"
- name:
- type: string
- builderConfig:
- $ref: "#/components/schemas/BuilderConfig"
- QueryEditMode:
- type: string
- enum: ["builder", "advanced"]
- Axis:
- type: object
- description: The description of a particular axis for a visualization.
- properties:
- bounds:
- type: array
- minItems: 0
- maxItems: 2
- description: >-
- The extents of an axis in the form [lower, upper]. Clients determine
- whether bounds are to be inclusive or exclusive of their limits
- items:
- type: string
- label:
- description: Label is a description of this Axis
- type: string
- prefix:
- description: Prefix represents a label prefix for formatting axis values.
- type: string
- suffix:
- description: Suffix represents a label suffix for formatting axis values.
- type: string
- base:
- description: Base represents the radix for formatting axis values.
- type: string
- enum: ["", "2", "10"]
- scale:
- $ref: "#/components/schemas/AxisScale"
- AxisScale:
- description: 'Scale is the axis formatting scale. Supported: "log", "linear"'
- type: string
- enum: ["log", "linear"]
- DashboardColor:
- type: object
- description: Defines an encoding of data value into color space.
- required: [id, type, hex, name, value]
- properties:
- id:
- description: The unique ID of the view color.
- type: string
- type:
- description: Type is how the color is used.
- type: string
- enum:
- - min
- - max
- - threshold
- - scale
- - text
- - background
- hex:
- description: The hex number of the color
- type: string
- maxLength: 7
- minLength: 7
- name:
- description: The user-facing name of the hex color.
- type: string
- value:
- description: The data value mapped to this color.
- type: number
- format: float
- RenamableField:
- description: Describes a field that can be renamed and made visible or invisible.
- type: object
- properties:
- internalName:
- description: The calculated name of a field.
- readOnly: true
- type: string
- displayName:
- description: The name that a field is renamed to by the user.
- type: string
- visible:
- description: Indicates whether this field should be visible on the table.
- type: boolean
- XYViewProperties:
- type: object
- required:
- - type
- - geom
- - queries
- - shape
- - axes
- - colors
- - legend
- - note
- - showNoteWhenEmpty
- - position
- properties:
- timeFormat:
- type: string
- type:
- type: string
- enum: [xy]
- queries:
- type: array
- items:
- $ref: "#/components/schemas/DashboardQuery"
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: "#/components/schemas/DashboardColor"
- shape:
- type: string
- enum: ["chronograf-v2"]
- note:
- type: string
- showNoteWhenEmpty:
- description: If true, will display note when empty
- type: boolean
- axes:
- $ref: "#/components/schemas/Axes"
- legend:
- $ref: "#/components/schemas/Legend"
- xColumn:
- type: string
- yColumn:
- type: string
- shadeBelow:
- type: boolean
- position:
- type: string
- enum: [overlaid, stacked]
- geom:
- $ref: "#/components/schemas/XYGeom"
- XYGeom:
- type: string
- enum: [line, step, stacked, bar, monotoneX]
- LinePlusSingleStatProperties:
- type: object
- required:
- - type
- - queries
- - shape
- - axes
- - colors
- - legend
- - note
- - showNoteWhenEmpty
- - prefix
- - suffix
- - decimalPlaces
- - position
- properties:
- timeFormat:
- type: string
- type:
- type: string
- enum: [line-plus-single-stat]
- queries:
- type: array
- items:
- $ref: "#/components/schemas/DashboardQuery"
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: "#/components/schemas/DashboardColor"
- shape:
- type: string
- enum: ["chronograf-v2"]
- note:
- type: string
- showNoteWhenEmpty:
- description: If true, will display note when empty
- type: boolean
- axes:
- $ref: "#/components/schemas/Axes"
- legend:
- $ref: "#/components/schemas/Legend"
- xColumn:
- type: string
- yColumn:
- type: string
- shadeBelow:
- type: boolean
- position:
- type: string
- enum: [overlaid, stacked]
- prefix:
- type: string
- suffix:
- type: string
- decimalPlaces:
- $ref: "#/components/schemas/DecimalPlaces"
- ScatterViewProperties:
- type: object
- required:
- - type
- - queries
- - colors
- - shape
- - note
- - showNoteWhenEmpty
- - xColumn
- - yColumn
- - fillColumns
- - symbolColumns
- - xDomain
- - yDomain
- - xAxisLabel
- - yAxisLabel
- - xPrefix
- - yPrefix
- - xSuffix
- - ySuffix
- properties:
- timeFormat:
- type: string
- type:
- type: string
- enum: [scatter]
- queries:
- type: array
- items:
- $ref: "#/components/schemas/DashboardQuery"
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- type: string
- shape:
- type: string
- enum: ["chronograf-v2"]
- note:
- type: string
- showNoteWhenEmpty:
- description: If true, will display note when empty
- type: boolean
- xColumn:
- type: string
- yColumn:
- type: string
- fillColumns:
- type: array
- items:
- type: string
- symbolColumns:
- type: array
- items:
- type: string
- xDomain:
- type: array
- items:
- type: number
- maxItems: 2
- yDomain:
- type: array
- items:
- type: number
- maxItems: 2
- xAxisLabel:
- type: string
- yAxisLabel:
- type: string
- xPrefix:
- type: string
- xSuffix:
- type: string
- yPrefix:
- type: string
- ySuffix:
- type: string
- HeatmapViewProperties:
- type: object
- required:
- - type
- - queries
- - colors
- - shape
- - note
- - showNoteWhenEmpty
- - xColumn
- - yColumn
- - xDomain
- - yDomain
- - xAxisLabel
- - yAxisLabel
- - xPrefix
- - yPrefix
- - xSuffix
- - ySuffix
- - binSize
- properties:
- timeFormat:
- type: string
- type:
- type: string
- enum: [heatmap]
- queries:
- type: array
- items:
- $ref: "#/components/schemas/DashboardQuery"
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- type: string
- shape:
- type: string
- enum: ["chronograf-v2"]
- note:
- type: string
- showNoteWhenEmpty:
- description: If true, will display note when empty
- type: boolean
- xColumn:
- type: string
- yColumn:
- type: string
- xDomain:
- type: array
- items:
- type: number
- maxItems: 2
- yDomain:
- type: array
- items:
- type: number
- maxItems: 2
- xAxisLabel:
- type: string
- yAxisLabel:
- type: string
- xPrefix:
- type: string
- xSuffix:
- type: string
- yPrefix:
- type: string
- ySuffix:
- type: string
- binSize:
- type: number
- SingleStatViewProperties:
- type: object
- required:
- - type
- - queries
- - colors
- - shape
- - note
- - showNoteWhenEmpty
- - prefix
- - tickPrefix
- - suffix
- - tickSuffix
- - legend
- - decimalPlaces
- properties:
- type:
- type: string
- enum: [single-stat]
- queries:
- type: array
- items:
- $ref: "#/components/schemas/DashboardQuery"
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: "#/components/schemas/DashboardColor"
- shape:
- type: string
- enum: ["chronograf-v2"]
- note:
- type: string
- showNoteWhenEmpty:
- description: If true, will display note when empty
- type: boolean
- prefix:
- type: string
- tickPrefix:
- type: string
- suffix:
- type: string
- tickSuffix:
- type: string
- legend:
- $ref: "#/components/schemas/Legend"
- decimalPlaces:
- $ref: "#/components/schemas/DecimalPlaces"
- HistogramViewProperties:
- type: object
- required:
- - type
- - queries
- - colors
- - shape
- - note
- - showNoteWhenEmpty
- - xColumn
- - fillColumns
- - xDomain
- - xAxisLabel
- - position
- - binCount
- properties:
- type:
- type: string
- enum: [histogram]
- queries:
- type: array
- items:
- $ref: "#/components/schemas/DashboardQuery"
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: "#/components/schemas/DashboardColor"
- shape:
- type: string
- enum: ["chronograf-v2"]
- note:
- type: string
- showNoteWhenEmpty:
- description: If true, will display note when empty
- type: boolean
- xColumn:
- type: string
- fillColumns:
- type: array
- items:
- type: string
- xDomain:
- type: array
- items:
- type: number
- format: float
- xAxisLabel:
- type: string
- position:
- type: string
- enum: [overlaid, stacked]
- binCount:
- type: integer
- GaugeViewProperties:
- type: object
- required:
- [
- type,
- queries,
- colors,
- shape,
- note,
- showNoteWhenEmpty,
- prefix,
- tickPrefix,
- suffix,
- tickSuffix,
- legend,
- decimalPlaces,
- ]
- properties:
- type:
- type: string
- enum: [gauge]
- queries:
- type: array
- items:
- $ref: "#/components/schemas/DashboardQuery"
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: "#/components/schemas/DashboardColor"
- shape:
- type: string
- enum: ["chronograf-v2"]
- note:
- type: string
- showNoteWhenEmpty:
- description: If true, will display note when empty
- type: boolean
- prefix:
- type: string
- tickPrefix:
- type: string
- suffix:
- type: string
- tickSuffix:
- type: string
- legend:
- $ref: "#/components/schemas/Legend"
- decimalPlaces:
- $ref: "#/components/schemas/DecimalPlaces"
- TableViewProperties:
- type: object
- required:
- - type
- - queries
- - colors
- - shape
- - note
- - showNoteWhenEmpty
- - tableOptions
- - fieldOptions
- - timeFormat
- - decimalPlaces
- properties:
- type:
- type: string
- enum: [table]
- queries:
- type: array
- items:
- $ref: "#/components/schemas/DashboardQuery"
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- $ref: "#/components/schemas/DashboardColor"
- shape:
- type: string
- enum: ["chronograf-v2"]
- note:
- type: string
- showNoteWhenEmpty:
- description: If true, will display note when empty
- type: boolean
- tableOptions:
- properties:
- verticalTimeAxis:
- description: >-
- verticalTimeAxis describes the orientation of the table by
- indicating whether the time axis will be displayed vertically
- type: boolean
- sortBy:
- $ref: "#/components/schemas/RenamableField"
- wrapping:
- description: Wrapping describes the text wrapping style to be used in table views
- type: string
- enum:
- - truncate
- - wrap
- - single-line
- fixFirstColumn:
- description: >-
- fixFirstColumn indicates whether the first column of the table
- should be locked
- type: boolean
- fieldOptions:
- description: >-
- fieldOptions represent the fields retrieved by the query with
- customization options
- type: array
- items:
- $ref: "#/components/schemas/RenamableField"
- timeFormat:
- description: >-
- timeFormat describes the display format for time values according to
- moment.js date formatting
- type: string
- decimalPlaces:
- $ref: "#/components/schemas/DecimalPlaces"
- MarkdownViewProperties:
- type: object
- required:
- - type
- - shape
- - note
- properties:
- type:
- type: string
- enum: [markdown]
- shape:
- type: string
- enum: ["chronograf-v2"]
- note:
- type: string
- CheckViewProperties:
- type: object
- required:
- - type
- - shape
- - checkID
- - queries
- - colors
- properties:
- type:
- type: string
- enum: [check]
- shape:
- type: string
- enum: ["chronograf-v2"]
- checkID:
- type: string
- check:
- $ref: "#/components/schemas/Check"
- queries:
- type: array
- items:
- $ref: "#/components/schemas/DashboardQuery"
- colors:
- description: Colors define color encoding of data into a visualization
- type: array
- items:
- type: string
- Axes:
- description: The viewport for a View's visualizations
- type: object
- required: ["x", "y"]
- properties:
- x:
- $ref: "#/components/schemas/Axis"
- "y": # Quoted to prevent YAML parser from interpreting y as shorthand for true.
- $ref: "#/components/schemas/Axis"
- Legend:
- description: Legend define encoding of data into a view's legend
- type: object
- properties:
- type:
- description: The style of the legend.
- type: string
- enum:
- - static
- orientation:
- description: >-
- orientation is the location of the legend with respect to the view
- graph
- type: string
- enum:
- - top
- - bottom
- - left
- - right
- DecimalPlaces:
- description: Indicates whether decimal places should be enforced, and how many digits it should show.
- type: object
- properties:
- isEnforced:
- description: Indicates whether decimal point setting should be enforced
- type: boolean
- digits:
- description: The number of digits after decimal to display
- type: integer
- format: int32
- ConstantVariableProperties:
- properties:
- type:
- type: string
- enum: [constant]
- values:
- type: array
- items:
- type: string
- MapVariableProperties:
- properties:
- type:
- type: string
- enum: [map]
- values:
- type: object
- additionalProperties:
- type: string
- QueryVariableProperties:
- properties:
- type:
- type: string
- enum: [query]
- values:
- type: object
- properties:
- query:
- type: string
- language:
- type: string
- Variable:
- type: object
- required:
- - name
- - orgID
- - arguments
- properties:
- links:
- type: object
- readOnly: true
- properties:
- self:
- type: string
- format: uri
- org:
- type: string
- format: uri
- labels:
- type: string
- format: uri
- id:
- readOnly: true
- type: string
- orgID:
- type: string
- name:
- type: string
- description:
- type: string
- selected:
- type: array
- items:
- type: string
- labels:
- $ref: "#/components/schemas/Labels"
- arguments:
- $ref: "#/components/schemas/VariableProperties"
- createdAt:
- type: string
- format: date-time
- updatedAt:
- type: string
- format: date-time
- Variables:
- type: object
- example:
- variables:
- - id: "1221432"
- name: ":ok:"
- selected:
- - hello
- arguments:
- type: constant
- values:
- - howdy
- - hello
- - hi
- - yo
- - oy
- - id: "1221432"
- name: ":ok:"
- selected:
- - c
- arguments:
- type: map
- values:
- a: fdjaklfdjkldsfjlkjdsa
- b: dfaksjfkljekfajekdljfas
- c: fdjksajfdkfeawfeea
- - id: "1221432"
- name: ":ok:"
- selected:
- - host
- arguments:
- type: query
- query: 'from(bucket: "foo") |> showMeasurements()'
- language: flux
- properties:
- variables:
- type: array
- items:
- $ref: "#/components/schemas/Variable"
- VariableProperties:
- type: object
- oneOf:
- - $ref: "#/components/schemas/QueryVariableProperties"
- - $ref: "#/components/schemas/ConstantVariableProperties"
- - $ref: "#/components/schemas/MapVariableProperties"
- ViewProperties:
- oneOf:
- - $ref: "#/components/schemas/LinePlusSingleStatProperties"
- - $ref: "#/components/schemas/XYViewProperties"
- - $ref: "#/components/schemas/SingleStatViewProperties"
- - $ref: "#/components/schemas/HistogramViewProperties"
- - $ref: "#/components/schemas/GaugeViewProperties"
- - $ref: "#/components/schemas/TableViewProperties"
- - $ref: "#/components/schemas/MarkdownViewProperties"
- - $ref: "#/components/schemas/CheckViewProperties"
- - $ref: "#/components/schemas/ScatterViewProperties"
- - $ref: "#/components/schemas/HeatmapViewProperties"
- View:
- required:
- - name
- - properties
- properties:
- links:
- type: object
- readOnly: true
- properties:
- self:
- type: string
- id:
- readOnly: true
- type: string
- name:
- type: string
- properties:
- $ref: "#/components/schemas/ViewProperties"
- Views:
- type: object
- properties:
- links:
- type: object
- properties:
- self:
- type: string
- views:
- type: array
- items:
- $ref: "#/components/schemas/View"
- CellUpdate:
- type: object
- properties:
- x:
- type: integer
- format: int32
- "y": # Quoted to prevent YAML parser from interpreting y as shorthand for true.
- type: integer
- format: int32
- w:
- type: integer
- format: int32
- h:
- type: integer
- format: int32
- CreateCell:
- type: object
- properties:
- name:
- type: string
- x:
- type: integer
- format: int32
- "y": # Quoted to prevent YAML parser from interpreting y as shorthand for true.
- type: integer
- format: int32
- w:
- type: integer
- format: int32
- h:
- type: integer
- format: int32
- usingView:
- type: string
- description: Makes a copy of the provided view.
- AnalyzeQueryResponse:
- type: object
- properties:
- errors:
- type: array
- items:
- type: object
- properties:
- line:
- type: integer
- column:
- type: integer
- character:
- type: integer
- message:
- type: string
- Cell:
- type: object
- properties:
- id:
- type: string
- links:
- type: object
- properties:
- self:
- type: string
- view:
- type: string
- x:
- type: integer
- format: int32
- "y": # Quoted to prevent YAML parser from interpreting y as shorthand for true.
- type: integer
- format: int32
- w:
- type: integer
- format: int32
- h:
- type: integer
- format: int32
- viewID:
- type: string
- description: The reference to a view from the views API.
- Cells:
- type: array
- items:
- $ref: "#/components/schemas/Cell"
- Secrets:
- additionalProperties:
- type: string
- example:
- apikey: abc123xyz
- SecretKeys:
- type: object
- properties:
- secrets:
- type: array
- items:
- type: string
- SecretKeysResponse:
- allOf:
- - $ref: "#/components/schemas/SecretKeys"
- - type: object
- properties:
- links:
- readOnly: true
- type: object
- properties:
- self:
- type: string
- org:
- type: string
- CreateDashboardRequest:
- properties:
- orgID:
- type: string
- description: The ID of the organization that owns the dashboard.
- name:
- type: string
- description: The user-facing name of the dashboard.
- description:
- type: string
- description: The user-facing description of the dashboard.
- required:
- - orgID
- - name
- Dashboard:
- type: object
- allOf:
- - $ref: "#/components/schemas/CreateDashboardRequest"
- - type: object
- properties:
- links:
- type: object
- example:
- self: "/api/v2/dashboards/1"
- cells: "/api/v2/dashboards/1/cells"
- owners: "/api/v2/dashboards/1/owners"
- members: "/api/v2/dashboards/1/members"
- labels: "/api/v2/dashboards/1/labels"
- org: "/api/v2/labels/1"
- properties:
- self:
- $ref: "#/components/schemas/Link"
- cells:
- $ref: "#/components/schemas/Link"
- members:
- $ref: "#/components/schemas/Link"
- owners:
- $ref: "#/components/schemas/Link"
- labels:
- $ref: "#/components/schemas/Link"
- org:
- $ref: "#/components/schemas/Link"
- id:
- readOnly: true
- type: string
- meta:
- type: object
- properties:
- createdAt:
- type: string
- format: date-time
- updatedAt:
- type: string
- format: date-time
- cells:
- $ref: "#/components/schemas/Cells"
- labels:
- $ref: "#/components/schemas/Labels"
- Dashboards:
- type: object
- properties:
- links:
- $ref: "#/components/schemas/Links"
- dashboards:
- type: array
- items:
- $ref: "#/components/schemas/Dashboard"
- Source:
- type: object
- properties:
- links:
- type: object
- properties:
- self:
- type: string
- query:
- type: string
- health:
- type: string
- buckets:
- type: string
- id:
- type: string
- orgID:
- type: string
- default:
- type: boolean
- name:
- type: string
- type:
- type: string
- enum: ["v1","v2","self"]
- url:
- type: string
- format: uri
- insecureSkipVerify:
- type: boolean
- telegraf:
- type: string
- token:
- type: string
- username:
- type: string
- password:
- type: string
- sharedSecret:
- type: string
- metaUrl:
- type: string
- format: uri
- defaultRP:
- type: string
- languages:
- type: array
- readOnly: true
- items:
- type: string
- enum:
- - flux
- - influxql
- Sources:
- type: object
- properties:
- links:
- type: object
- properties:
- self:
- type: string
- format: uri
- sources:
- type: array
- items:
- $ref: "#/components/schemas/Source"
- ScraperTargetRequest:
- type: object
- properties:
- name:
- type: string
- description: The name of the scraper target.
- type:
- type: string
- description: The type of the metrics to be parsed.
- enum: [prometheus]
- url:
- type: string
- description: The URL of the metrics endpoint.
- example: http://localhost:9090/metrics
- orgID:
- type: string
- description: The organization ID.
- bucketID:
- type: string
- description: The ID of the bucket to write to.
- ScraperTargetResponse:
- type: object
- allOf:
- - $ref: "#/components/schemas/ScraperTargetRequest"
- - type: object
- properties:
- id:
- type: string
- readOnly: true
- org:
- type: string
- description: The organization name.
- bucket:
- type: string
- description: The bucket name.
- links:
- type: object
- readOnly: true
- example:
- self: "/api/v2/scrapers/1"
- owners: "/api/v2/scrapers/1/owners"
- members: "/api/v2/scrapers/1/members"
- bucket: "/api/v2/buckets/1"
- organization: "/api/v2/orgs/1"
- properties:
- self:
- $ref: "#/components/schemas/Link"
- members:
- $ref: "#/components/schemas/Link"
- owners:
- $ref: "#/components/schemas/Link"
- bucket:
- $ref: "#/components/schemas/Link"
- organization:
- $ref: "#/components/schemas/Link"
- ScraperTargetResponses:
- type: object
- properties:
- configurations:
- type: array
- items:
- $ref: "#/components/schemas/ScraperTargetResponse"
- DocumentMeta:
- type: object
- properties:
- name:
- type: string
- type:
- type: string
- templateID:
- type: string
- description:
- type: string
- version:
- type: string
- createdAt:
- type: string
- format: date-time
- readOnly: true
- updatedAt:
- type: string
- format: date-time
- readOnly: true
- required:
- - name
- - version
- Document:
- type: object
- properties:
- id:
- type: string
- readOnly: true
- meta:
- $ref: "#/components/schemas/DocumentMeta"
- content:
- type: object
- labels:
- $ref: "#/components/schemas/Labels"
- links:
- type: object
- readOnly: true
- example:
- self: "/api/v2/documents/templates/1"
- properties:
- self:
- description: The document URL.
- $ref: "#/components/schemas/Link"
- required:
- - id
- - meta
- - content
- DocumentCreate:
- type: object
- properties:
- meta:
- $ref: "#/components/schemas/DocumentMeta"
- content:
- type: object
- org:
- type: string
- description: The organization Name. Specify either `orgID` or `org`.
- orgID:
- type: string
- description: The organization Name. Specify either `orgID` or `org`.
- labels:
- type: array
- description: An array of label IDs to be added as labels to the document.
- items:
- type: string
- required:
- - meta
- - content
- DocumentUpdate:
- type: object
- properties:
- meta:
- $ref: "#/components/schemas/DocumentMeta"
- content:
- type: object
- DocumentListEntry:
- type: object
- properties:
- id:
- type: string
- readOnly: true
- meta:
- $ref: "#/components/schemas/DocumentMeta"
- labels:
- $ref: "#/components/schemas/Labels"
- links:
- type: object
- readOnly: true
- example:
- self: "/api/v2/documents/templates/1"
- properties:
- self:
- description: The document URL.
- $ref: "#/components/schemas/Link"
- required:
- - id
- - meta
- Documents:
- type: object
- properties:
- documents:
- type: array
- items:
- $ref: "#/components/schemas/DocumentListEntry"
- TelegrafRequest:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- metadata:
- type: object
- properties:
- buckets:
- type: array
- items:
- type: string
- config:
- type: string
- orgID:
- type: string
- Telegraf:
- type: object
- allOf:
- - $ref: "#/components/schemas/TelegrafRequest"
- - type: object
- properties:
- id:
- type: string
- readOnly: true
- links:
- type: object
- readOnly: true
- example:
- self: "/api/v2/telegrafs/1"
- lables: "/api/v2/telegrafs/1/labels"
- owners: "/api/v2/telegrafs/1/owners"
- members: "/api/v2/telegrafs/1/members"
- properties:
- self:
- $ref: "#/components/schemas/Link"
- labels:
- $ref: "#/components/schemas/Link"
- members:
- $ref: "#/components/schemas/Link"
- owners:
- $ref: "#/components/schemas/Link"
- labels:
- readOnly: true
- $ref: "#/components/schemas/Labels"
- Telegrafs:
- type: object
- properties:
- configurations:
- type: array
- items:
- $ref: "#/components/schemas/Telegraf"
- TelegrafPlugin:
- type: object
- properties:
- type:
- type: string
- enum: [inputs, outputs, aggregators, processors]
- name:
- type: string
- description:
- type: string
- config:
- type: object
- additionalProperties:
- type: object
- IsOnboarding:
- type: object
- properties:
- allowed:
- description: True means that the influxdb instance has NOT had initial setup; false means that the database has been setup.
- type: boolean
- OnboardingRequest:
- type: object
- properties:
- username:
- type: string
- password:
- type: string
- org:
- type: string
- bucket:
- type: string
- retentionPeriodHrs:
- type: integer
- required:
- - username
- - password
- - org
- - bucket
- OnboardingResponse:
- type: object
- properties:
- user:
- $ref: "#/components/schemas/User"
- org:
- $ref: "#/components/schemas/Organization"
- bucket:
- $ref: "#/components/schemas/Bucket"
- auth:
- $ref: "#/components/schemas/Authorization"
- PasswordResetBody:
- properties:
- password:
- type: string
- required:
- - password
- AddResourceMemberRequestBody:
- type: object
- properties:
- id:
- type: string
- name:
- type: string
- required:
- - id
- Ready:
- type: object
- properties:
- status:
- type: string
- enum:
- - ready
- started:
- type: string
- format: date-time
- example: "2019-03-13T10:09:33.891196-04:00"
- up:
- type: string
- example: "14m45.911966424s"
- HealthCheck:
- type: object
- required:
- - name
- - status
- properties:
- name:
- type: string
- message:
- type: string
- checks:
- type: array
- items:
- $ref: "#/components/schemas/HealthCheck"
- status:
- type: string
- enum:
- - pass
- - fail
- version:
- type: string
- commit:
- type: string
- Labels:
- type: array
- items:
- $ref: "#/components/schemas/Label"
- Label:
- type: object
- properties:
- id:
- readOnly: true
- type: string
- orgID:
- readOnly: true
- type: string
- name:
- type: string
- properties:
- type: object
- additionalProperties:
- type: string
- description: Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value.
- example: {"color": "ffb3b3", "description": "this is a description"}
- LabelCreateRequest:
- type: object
- required: [orgID]
- properties:
- orgID:
- type: string
- name:
- type: string
- properties:
- type: object
- additionalProperties:
- type: string
- description: Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value.
- example: {"color": "ffb3b3", "description": "this is a description"}
- LabelUpdate:
- type: object
- properties:
- name:
- type: string
- properties:
- type: object
- description: Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value.
- example: {"color": "ffb3b3", "description": "this is a description"}
- LabelMapping:
- type: object
- properties:
- labelID:
- type: string
- LabelsResponse:
- type: object
- properties:
- labels:
- $ref: "#/components/schemas/Labels"
- links:
- $ref: "#/components/schemas/Links"
- LabelResponse:
- type: object
- properties:
- label:
- $ref: "#/components/schemas/Label"
- links:
- $ref: "#/components/schemas/Links"
- ASTResponse:
- description: Contains the AST for the supplied Flux query
- type: object
- properties:
- ast:
- $ref: "#/components/schemas/Package"
- WritePrecision:
- type: string
- enum:
- - ms
- - s
- - us
- - ns
- TaskCreateRequest:
- type: object
- properties:
- type:
- description: The type of task, this can be used for filtering tasks on list actions.
- type: string
- orgID:
- description: The ID of the organization that owns this Task.
- type: string
- org:
- description: The name of the organization that owns this Task.
- type: string
- status:
- $ref: "#/components/schemas/TaskStatusType"
- flux:
- description: The Flux script to run for this task.
- type: string
- description:
- description: An optional description of the task.
- type: string
- required: [flux]
- TaskUpdateRequest:
- type: object
- properties:
- status:
- $ref: "#/components/schemas/TaskStatusType"
- flux:
- description: The Flux script to run for this task.
- type: string
- name:
- description: Override the 'name' option in the flux script.
- type: string
- every:
- description: Override the 'every' option in the flux script.
- type: string
- cron:
- description: Override the 'cron' option in the flux script.
- type: string
- offset:
- description: Override the 'offset' option in the flux script.
- type: string
- description:
- description: An optional description of the task.
- type: string
- FluxResponse:
- description: Rendered flux that backs the check or notification.
- properties:
- flux:
- type: string
- CheckPatch:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- status:
- type: string
- enum:
- - active
- - inactive
- CheckDiscriminator:
- oneOf:
- - $ref: "#/components/schemas/DeadmanCheck"
- - $ref: "#/components/schemas/ThresholdCheck"
- discriminator:
- propertyName: type
- mapping:
- deadman: "#/components/schemas/DeadmanCheck"
- threshold: "#/components/schemas/ThresholdCheck"
- Check:
- allOf:
- - $ref: "#/components/schemas/CheckDiscriminator"
- PostCheck:
- allOf:
- - $ref: "#/components/schemas/CheckDiscriminator"
- Checks:
- properties:
- checks:
- type: array
- items:
- $ref: "#/components/schemas/Check"
- links:
- $ref: "#/components/schemas/Links"
- CheckBase:
- properties:
- id:
- readOnly: true
- type: string
- name:
- type: string
- orgID:
- description: The ID of the organization that owns this check.
- type: string
- ownerID:
- description: The ID of creator used to create this check.
- type: string
- readOnly: true
- createdAt:
- type: string
- format: date-time
- readOnly: true
- updatedAt:
- type: string
- format: date-time
- readOnly: true
- query:
- $ref: "#/components/schemas/DashboardQuery"
- status:
- $ref: "#/components/schemas/TaskStatusType"
- every:
- description: Check repetition interval.
- type: string
- offset:
- description: Duration to delay after the schedule, before executing check.
- type: string
- tags:
- description: List of tags to write to each status.
- type: array
- items:
- type: object
- properties:
- key:
- type: string
- value:
- type: string
- description:
- description: An optional description of the check.
- type: string
- statusMessageTemplate:
- description: The template used to generate and write a status message.
- type: string
- labels:
- $ref: "#/components/schemas/Labels"
- links:
- type: object
- readOnly: true
- example:
- self: "/api/v2/checks/1"
- labels: "/api/v2/checks/1/labels"
- members: "/api/v2/checks/1/members"
- owners: "/api/v2/checks/1/owners"
- properties:
- self:
- description: URL for this check
- $ref: "#/components/schemas/Link"
- labels:
- description: URL to retrieve labels for this check
- $ref: "#/components/schemas/Link"
- members:
- description: URL to retrieve members for this check
- $ref: "#/components/schemas/Link"
- owners:
- description: URL to retrieve owners for this check
- $ref: "#/components/schemas/Link"
- required: [name, type, orgID, query]
- ThresholdCheck:
- allOf:
- - $ref: "#/components/schemas/CheckBase"
- - type: object
- properties:
- type:
- type: string
- enum: [threshold]
- thresholds:
- type: array
- items:
- $ref: "#/components/schemas/Threshold"
- Threshold:
- oneOf:
- - $ref: "#/components/schemas/GreaterThreshold"
- - $ref: "#/components/schemas/LesserThreshold"
- - $ref: "#/components/schemas/RangeThreshold"
- discriminator:
- propertyName: type
- mapping:
- greater: "#/components/schemas/GreaterThreshold"
- lesser: "#/components/schemas/LesserThreshold"
- range: "#/components/schemas/RangeThreshold"
- DeadmanCheck:
- allOf:
- - $ref: "#/components/schemas/CheckBase"
- - type: object
- properties:
- type:
- type: string
- enum: [deadman]
- timeSince:
- description: String duration before deadman triggers.
- type: string
- staleTime:
- description: String duration for time that a series is considered stale and should not trigger deadman.
- type: string
- reportZero:
- description: If only zero values reported since time, trigger an alert
- type: boolean
- level:
- $ref: "#/components/schemas/CheckStatusLevel"
- ThresholdBase:
- properties:
- level:
- $ref: "#/components/schemas/CheckStatusLevel"
- allValues:
- description: If true, only alert if all values meet threshold.
- type: boolean
- GreaterThreshold:
- allOf:
- - $ref: "#/components/schemas/ThresholdBase"
- - type: object
- required: [type, value]
- properties:
- type:
- type: string
- enum: [greater]
- value:
- type: number
- format: float
- LesserThreshold:
- allOf:
- - $ref: "#/components/schemas/ThresholdBase"
- - type: object
- required: [type, value]
- properties:
- type:
- type: string
- enum: [lesser]
- value:
- type: number
- format: float
- RangeThreshold:
- allOf:
- - $ref: "#/components/schemas/ThresholdBase"
- - type: object
- required: [type, min, max, within]
- properties:
- type:
- type: string
- enum: [range]
- min:
- type: number
- format: float
- max:
- type: number
- format: float
- within:
- type: boolean
- CheckStatusLevel:
- description: The state to record if check matches a criteria.
- type: string
- enum: ["UNKNOWN", "OK", "INFO", "CRIT", "WARN"]
- RuleStatusLevel:
- description: The state to record if check matches a criteria.
- type: string
- enum: ["UNKNOWN", "OK", "INFO", "CRIT", "WARN", "ANY"]
- NotificationRuleUpdate:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- status:
- type: string
- enum:
- - active
- - inactive
- NotificationRuleDiscriminator:
- oneOf:
- - $ref: "#/components/schemas/SlackNotificationRule"
- - $ref: "#/components/schemas/SMTPNotificationRule"
- - $ref: "#/components/schemas/PagerDutyNotificationRule"
- - $ref: "#/components/schemas/HTTPNotificationRule"
- discriminator:
- propertyName: type
- mapping:
- slack: "#/components/schemas/SlackNotificationRule"
- smtp: "#/components/schemas/SMTPNotificationRule"
- pagerduty: "#/components/schemas/PagerDutyNotificationRule"
- http: "#/components/schemas/HTTPNotificationRule"
- NotificationRule:
- allOf:
- - $ref: "#/components/schemas/NotificationRuleDiscriminator"
- PostNotificationRule:
- allOf:
- - $ref: "#/components/schemas/NotificationRuleDiscriminator"
- NotificationRules:
- properties:
- notificationRules:
- type: array
- items:
- $ref: "#/components/schemas/NotificationRule"
- links:
- $ref: "#/components/schemas/Links"
- NotificationRuleBase:
- type: object
- required:
- - id
- - orgID
- - status
- - name
- - tagRules
- - statusRules
- - endpointID
- properties:
- id:
- readOnly: true
- type: string
- endpointID:
- type: string
- orgID:
- description: The ID of the organization that owns this notification rule.
- type: string
- ownerID:
- description: The ID of creator used to create this notification rule.
- type: string
- readOnly: true
- createdAt:
- type: string
- format: date-time
- readOnly: true
- updatedAt:
- type: string
- format: date-time
- readOnly: true
- status:
- $ref: "#/components/schemas/TaskStatusType"
- name:
- description: Human-readable name describing the notification rule.
- type: string
- sleepUntil:
- type: string
- every:
- description: The notification repetition interval.
- type: string
- offset:
- description: Duration to delay after the schedule, before executing check.
- type: string
- runbookLink:
- type: string
- limitEvery:
- description: Don't notify me more than times every seconds. If set, limit cannot be empty.
- type: integer
- limit:
- description: Don't notify me more than times every seconds. If set, limitEvery cannot be empty.
- type: integer
- tagRules:
- description: List of tag rules the notification rule attempts to match.
- type: array
- items:
- $ref: "#/components/schemas/TagRule"
- description:
- description: An optional description of the notification rule.
- type: string
- statusRules:
- description: List of status rules the notification rule attempts to match.
- type: array
- minItems: 1
- items:
- $ref: "#/components/schemas/StatusRule"
- labels:
- $ref: "#/components/schemas/Labels"
- links:
- type: object
- readOnly: true
- example:
- self: "/api/v2/notificationRules/1"
- labels: "/api/v2/notificationRules/1/labels"
- members: "/api/v2/notificationRules/1/members"
- owners: "/api/v2/notificationRules/1/owners"
- properties:
- self:
- description: URL for this endpoint.
- $ref: "#/components/schemas/Link"
- labels:
- description: URL to retrieve labels for this notification rule.
- $ref: "#/components/schemas/Link"
- members:
- description: URL to retrieve members for this notification rule.
- $ref: "#/components/schemas/Link"
- owners:
- description: URL to retrieve owners for this notification rule.
- $ref: "#/components/schemas/Link"
- TagRule:
- type: object
- properties:
- key:
- type: string
- value:
- type: string
- operator:
- type: string
- enum: ["equal", "notequal", "equalregex","notequalregex"]
- StatusRule:
- type: object
- properties:
- currentLevel:
- $ref: "#/components/schemas/RuleStatusLevel"
- previousLevel:
- $ref: "#/components/schemas/RuleStatusLevel"
- count:
- type: integer
- period:
- type: string
- HTTPNotificationRuleBase:
- type: object
- required: [type]
- properties:
- type:
- type: string
- enum: [http]
- url:
- type: string
- HTTPNotificationRule:
- allOf:
- - $ref: "#/components/schemas/NotificationRuleBase"
- - $ref: "#/components/schemas/HTTPNotificationRuleBase"
- SlackNotificationRuleBase:
- type: object
- required: [type, messageTemplate]
- properties:
- type:
- type: string
- enum: [slack]
- channel:
- type: string
- messageTemplate:
- type: string
- SlackNotificationRule:
- allOf:
- - $ref: "#/components/schemas/NotificationRuleBase"
- - $ref: "#/components/schemas/SlackNotificationRuleBase"
- SMTPNotificationRule:
- allOf:
- - $ref: "#/components/schemas/NotificationRuleBase"
- - $ref: "#/components/schemas/SMTPNotificationRuleBase"
- SMTPNotificationRuleBase:
- type: object
- required: [type, subjectTemplate, to]
- properties:
- type:
- type: string
- enum: [smtp]
- subjectTemplate:
- type: string
- bodyTemplate:
- type: string
- to:
- type: string
- PagerDutyNotificationRule:
- allOf:
- - $ref: "#/components/schemas/NotificationRuleBase"
- - $ref: "#/components/schemas/PagerDutyNotificationRuleBase"
- PagerDutyNotificationRuleBase:
- type: object
- required: [type, messageTemplate]
- properties:
- type:
- type: string
- enum: [pagerduty]
- messageTemplate:
- type: string
- NotificationEndpointUpdate:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- status:
- type: string
- enum:
- - active
- - inactive
- NotificationEndpointDiscriminator:
- oneOf:
- - $ref: "#/components/schemas/SlackNotificationEndpoint"
- - $ref: "#/components/schemas/PagerDutyNotificationEndpoint"
- - $ref: "#/components/schemas/HTTPNotificationEndpoint"
- discriminator:
- propertyName: type
- mapping:
- slack: "#/components/schemas/SlackNotificationEndpoint"
- pagerduty: "#/components/schemas/PagerDutyNotificationEndpoint"
- http: "#/components/schemas/HTTPNotificationEndpoint"
- NotificationEndpoint:
- allOf:
- - $ref: "#/components/schemas/NotificationEndpointDiscriminator"
- PostNotificationEndpoint:
- allOf:
- - $ref: "#/components/schemas/NotificationEndpointDiscriminator"
- NotificationEndpoints:
- properties:
- notificationEndpoints:
- type: array
- items:
- $ref: "#/components/schemas/NotificationEndpoint"
- links:
- $ref: "#/components/schemas/Links"
- NotificationEndpointBase:
- type: object
- required: [type, name]
- properties:
- id:
- type: string
- orgID:
- type: string
- userID:
- type: string
- createdAt:
- type: string
- format: date-time
- readOnly: true
- updatedAt:
- type: string
- format: date-time
- readOnly: true
- description:
- description: An optional description of the notification endpoint.
- type: string
- name:
- type: string
- status:
- description: The status of the endpoint.
- default: active
- type: string
- enum: ["active", "inactive"]
- labels:
- $ref: "#/components/schemas/Labels"
- links:
- type: object
- readOnly: true
- example:
- self: "/api/v2/notificationEndpoints/1"
- labels: "/api/v2/notificationEndpoints/1/labels"
- members: "/api/v2/notificationEndpoints/1/members"
- owners: "/api/v2/notificationEndpoints/1/owners"
- properties:
- self:
- description: URL for this endpoint.
- $ref: "#/components/schemas/Link"
- labels:
- description: URL to retrieve labels for this endpoint.
- $ref: "#/components/schemas/Link"
- members:
- description: URL to retrieve members for this endpoint.
- $ref: "#/components/schemas/Link"
- owners:
- description: URL to retrieve owners for this endpoint.
- $ref: "#/components/schemas/Link"
- type:
- $ref: "#/components/schemas/NotificationEndpointType"
- SlackNotificationEndpoint:
- type: object
- allOf:
- - $ref: "#/components/schemas/NotificationEndpointBase"
- - type: object
- required: [url]
- properties:
- url:
- description: Specifies the URL of the Slack endpoint. Specify either `URL` or `Token`.
- type: string
- token:
- description: Specifies the API token string. Specify either `URL` or `Token`.
- type: string
- PagerDutyNotificationEndpoint:
- type: object
- allOf:
- - $ref: "#/components/schemas/NotificationEndpointBase"
- - type: object
- required: [clientURL, routingKey]
- properties:
- clientURL:
- type: string
- routingKey:
- type: string
- HTTPNotificationEndpoint:
- type: object
- allOf:
- - $ref: "#/components/schemas/NotificationEndpointBase"
- - type: object
- required: [url, authMethod, method]
- properties:
- url:
- type: string
- username:
- type: string
- password:
- type: string
- token:
- type: string
- method:
- type: string
- enum: ["POST", "GET", "PUT"]
- authMethod:
- type: string
- enum: ["none", "basic", "bearer"]
- contentTemplate:
- type: string
- headers:
- type: object
- description: Customized headers.
- additionalProperties:
- type: string
- NotificationEndpointType:
- type: string
- enum: ["slack", "pagerduty", "http"]
- DBRP:
- required:
- - orgID
- - org
- - bucketID
- - database
- - retention_policy
- properties:
- id:
- type: string
- description: the mapping identifier
- readOnly: true
- orgID:
- type: string
- description: the organization ID that owns this mapping.
- org:
- type: string
- description: the organization that owns this mapping.
- bucketID:
- type: string
- description: the bucket ID used as target for the translation.
- database:
- type: string
- description: InfluxDB v1 database
- retention_policy:
- type: string
- description: InfluxDB v1 retention policy
- default:
- type: boolean
- description: Specify if this mapping represents the default retention policy for the database specificed.
- links:
- $ref: "#/components/schemas/Links"
- DBRPs:
- properties:
- notificationEndpoints:
- type: array
- items:
- $ref: "#/components/schemas/DBRP"
- links:
- $ref: "#/components/schemas/Links"
- DBRPUpdate:
- properties:
- database:
- type: string
- description: InfluxDB v1 database
- retention_policy:
- type: string
- description: InfluxDB v1 retention policy
- default:
- type: boolean
- links:
- $ref: "#/components/schemas/Links"
- securitySchemes:
- BasicAuth:
- type: http
- scheme: basic