From 9dce8da832485e8dfbb2cbb477fd8beab5101576 Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Wed, 17 Jun 2020 11:29:06 +0200 Subject: [PATCH] feat: Update swagger to latest version, Removed log system from Bucket, Dashboard, Organization, Task and Users API - [influxdb#18459](https://github.com/influxdata/influxdb/pull/18459) --- CHANGELOG.md | 3 + influxdb_client/__init__.py | 8 +- influxdb_client/client/__init__.py | 2 +- influxdb_client/client/write/__init__.py | 2 +- influxdb_client/domain/__init__.py | 6 +- influxdb_client/domain/bucket_links.py | 30 +- .../domain/{operation_logs.py => dbr_ps.py} | 48 +- influxdb_client/domain/dbrp.py | 313 +++ .../{operation_log.py => dbrp_update.py} | 124 +- .../domain/gauge_view_properties.py | 56 +- influxdb_client/domain/health_check.py | 58 +- .../domain/heatmap_view_properties.py | 28 +- .../line_plus_single_stat_properties.py | 55 +- influxdb_client/domain/operation_log_links.py | 114 -- influxdb_client/domain/organization_links.py | 34 +- influxdb_client/domain/query.py | 122 +- influxdb_client/domain/run_links.py | 28 +- .../domain/scatter_view_properties.py | 28 +- .../domain/single_stat_view_properties.py | 56 +- influxdb_client/domain/user_links.py | 32 +- influxdb_client/domain/xy_view_properties.py | 55 +- influxdb_client/service/__init__.py | 2 +- influxdb_client/service/buckets_service.py | 112 -- influxdb_client/service/dashboards_service.py | 118 +- influxdb_client/service/dbr_ps_service.py | 583 ++++++ .../service/operation_logs_service.py | 481 ----- .../service/organizations_service.py | 118 +- influxdb_client/service/setup_service.py | 104 + influxdb_client/service/tasks_service.py | 6 +- influxdb_client/service/users_service.py | 168 +- scripts/swagger.yml | 1690 +++++++++-------- tests/__init__.py | 2 +- tests/test_TasksApi.py | 1 - 33 files changed, 2450 insertions(+), 2137 deletions(-) rename influxdb_client/domain/{operation_logs.py => dbr_ps.py} (66%) create mode 100644 influxdb_client/domain/dbrp.py rename influxdb_client/domain/{operation_log.py => dbrp_update.py} (50%) delete mode 100644 influxdb_client/domain/operation_log_links.py create mode 100644 influxdb_client/service/dbr_ps_service.py delete mode 100644 influxdb_client/service/operation_logs_service.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 74caaa3e..3cc225ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ ### Features 1. [#92](https://github.com/influxdata/influxdb-client-python/issues/92): Optimize serializing Pandas DataFrame for writing +### API +1. [#110](https://github.com/influxdata/influxdb-client-python/pull/110): Removed log system from Bucket, Dashboard, Organization, Task and Users API - [influxdb#18459](https://github.com/influxdata/influxdb/pull/18459), Update swagger to latest version + ### Bug Fixes 1. [#105](https://github.com/influxdata/influxdb-client-python/pull/105): Fixed mapping dictionary without timestamp and tags into LineProtocol 1. [#108](https://github.com/influxdata/influxdb-client-python/pull/108): The WriteApi uses precision from Point instead a default precision diff --git a/influxdb_client/__init__.py b/influxdb_client/__init__.py index 05a6bff3..dceb0aa7 100644 --- a/influxdb_client/__init__.py +++ b/influxdb_client/__init__.py @@ -19,13 +19,13 @@ from influxdb_client.service.buckets_service import BucketsService from influxdb_client.service.cells_service import CellsService from influxdb_client.service.checks_service import ChecksService +from influxdb_client.service.dbr_ps_service import DBRPsService from influxdb_client.service.dashboards_service import DashboardsService from influxdb_client.service.health_service import HealthService from influxdb_client.service.influx_packages_service import InfluxPackagesService from influxdb_client.service.labels_service import LabelsService from influxdb_client.service.notification_endpoints_service import NotificationEndpointsService from influxdb_client.service.notification_rules_service import NotificationRulesService -from influxdb_client.service.operation_logs_service import OperationLogsService from influxdb_client.service.organizations_service import OrganizationsService from influxdb_client.service.query_service import QueryService from influxdb_client.service.ready_service import ReadyService @@ -88,6 +88,9 @@ from influxdb_client.domain.constant_variable_properties import ConstantVariableProperties from influxdb_client.domain.create_cell import CreateCell from influxdb_client.domain.create_dashboard_request import CreateDashboardRequest +from influxdb_client.domain.dbrp import DBRP +from influxdb_client.domain.dbrp_update import DBRPUpdate +from influxdb_client.domain.dbr_ps import DBRPs from influxdb_client.domain.dashboard import Dashboard from influxdb_client.domain.dashboard_color import DashboardColor from influxdb_client.domain.dashboard_query import DashboardQuery @@ -167,9 +170,6 @@ from influxdb_client.domain.object_expression import ObjectExpression from influxdb_client.domain.onboarding_request import OnboardingRequest from influxdb_client.domain.onboarding_response import OnboardingResponse -from influxdb_client.domain.operation_log import OperationLog -from influxdb_client.domain.operation_log_links import OperationLogLinks -from influxdb_client.domain.operation_logs import OperationLogs from influxdb_client.domain.option_statement import OptionStatement from influxdb_client.domain.organization import Organization from influxdb_client.domain.organization_links import OrganizationLinks diff --git a/influxdb_client/client/__init__.py b/influxdb_client/client/__init__.py index 02b84404..9777d6e3 100644 --- a/influxdb_client/client/__init__.py +++ b/influxdb_client/client/__init__.py @@ -7,13 +7,13 @@ from influxdb_client.service.buckets_service import BucketsService from influxdb_client.service.cells_service import CellsService from influxdb_client.service.checks_service import ChecksService +from influxdb_client.service.dbr_ps_service import DBRPsService from influxdb_client.service.dashboards_service import DashboardsService from influxdb_client.service.health_service import HealthService from influxdb_client.service.influx_packages_service import InfluxPackagesService from influxdb_client.service.labels_service import LabelsService from influxdb_client.service.notification_endpoints_service import NotificationEndpointsService from influxdb_client.service.notification_rules_service import NotificationRulesService -from influxdb_client.service.operation_logs_service import OperationLogsService from influxdb_client.service.organizations_service import OrganizationsService from influxdb_client.service.query_service import QueryService from influxdb_client.service.ready_service import ReadyService diff --git a/influxdb_client/client/write/__init__.py b/influxdb_client/client/write/__init__.py index 02b84404..9777d6e3 100644 --- a/influxdb_client/client/write/__init__.py +++ b/influxdb_client/client/write/__init__.py @@ -7,13 +7,13 @@ from influxdb_client.service.buckets_service import BucketsService from influxdb_client.service.cells_service import CellsService from influxdb_client.service.checks_service import ChecksService +from influxdb_client.service.dbr_ps_service import DBRPsService from influxdb_client.service.dashboards_service import DashboardsService from influxdb_client.service.health_service import HealthService from influxdb_client.service.influx_packages_service import InfluxPackagesService from influxdb_client.service.labels_service import LabelsService from influxdb_client.service.notification_endpoints_service import NotificationEndpointsService from influxdb_client.service.notification_rules_service import NotificationRulesService -from influxdb_client.service.operation_logs_service import OperationLogsService from influxdb_client.service.organizations_service import OrganizationsService from influxdb_client.service.query_service import QueryService from influxdb_client.service.ready_service import ReadyService diff --git a/influxdb_client/domain/__init__.py b/influxdb_client/domain/__init__.py index 4627b811..5545d0fb 100644 --- a/influxdb_client/domain/__init__.py +++ b/influxdb_client/domain/__init__.py @@ -55,6 +55,9 @@ from influxdb_client.domain.constant_variable_properties import ConstantVariableProperties from influxdb_client.domain.create_cell import CreateCell from influxdb_client.domain.create_dashboard_request import CreateDashboardRequest +from influxdb_client.domain.dbrp import DBRP +from influxdb_client.domain.dbrp_update import DBRPUpdate +from influxdb_client.domain.dbr_ps import DBRPs from influxdb_client.domain.dashboard import Dashboard from influxdb_client.domain.dashboard_color import DashboardColor from influxdb_client.domain.dashboard_query import DashboardQuery @@ -134,9 +137,6 @@ from influxdb_client.domain.object_expression import ObjectExpression from influxdb_client.domain.onboarding_request import OnboardingRequest from influxdb_client.domain.onboarding_response import OnboardingResponse -from influxdb_client.domain.operation_log import OperationLog -from influxdb_client.domain.operation_log_links import OperationLogLinks -from influxdb_client.domain.operation_logs import OperationLogs from influxdb_client.domain.option_statement import OptionStatement from influxdb_client.domain.organization import Organization from influxdb_client.domain.organization_links import OrganizationLinks diff --git a/influxdb_client/domain/bucket_links.py b/influxdb_client/domain/bucket_links.py index 4f2da220..2e3cd350 100644 --- a/influxdb_client/domain/bucket_links.py +++ b/influxdb_client/domain/bucket_links.py @@ -32,7 +32,6 @@ class BucketLinks(object): """ openapi_types = { 'labels': 'str', - 'logs': 'str', 'members': 'str', 'org': 'str', 'owners': 'str', @@ -42,7 +41,6 @@ class BucketLinks(object): attribute_map = { 'labels': 'labels', - 'logs': 'logs', 'members': 'members', 'org': 'org', 'owners': 'owners', @@ -50,11 +48,10 @@ class BucketLinks(object): 'write': 'write' } - def __init__(self, labels=None, logs=None, members=None, org=None, owners=None, _self=None, write=None): # noqa: E501 + def __init__(self, labels=None, members=None, org=None, owners=None, _self=None, write=None): # noqa: E501 """BucketLinks - a model defined in OpenAPI""" # noqa: E501 self._labels = None - self._logs = None self._members = None self._org = None self._owners = None @@ -64,8 +61,6 @@ def __init__(self, labels=None, logs=None, members=None, org=None, owners=None, if labels is not None: self.labels = labels - if logs is not None: - self.logs = logs if members is not None: self.members = members if org is not None: @@ -100,29 +95,6 @@ def labels(self, labels): self._labels = labels - @property - def logs(self): - """Gets the logs of this BucketLinks. # noqa: E501 - - URI of resource. # noqa: E501 - - :return: The logs of this BucketLinks. # noqa: E501 - :rtype: str - """ - return self._logs - - @logs.setter - def logs(self, logs): - """Sets the logs of this BucketLinks. - - URI of resource. # noqa: E501 - - :param logs: The logs of this BucketLinks. # noqa: E501 - :type: str - """ - - self._logs = logs - @property def members(self): """Gets the members of this BucketLinks. # noqa: E501 diff --git a/influxdb_client/domain/operation_logs.py b/influxdb_client/domain/dbr_ps.py similarity index 66% rename from influxdb_client/domain/operation_logs.py rename to influxdb_client/domain/dbr_ps.py index ed5f7149..4fdcc728 100644 --- a/influxdb_client/domain/operation_logs.py +++ b/influxdb_client/domain/dbr_ps.py @@ -16,7 +16,7 @@ import six -class OperationLogs(object): +class DBRPs(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -31,64 +31,64 @@ class OperationLogs(object): and the value is json key in definition. """ openapi_types = { - 'logs': 'list[OperationLog]', + 'notification_endpoints': 'list[DBRP]', 'links': 'Links' } attribute_map = { - 'logs': 'logs', + 'notification_endpoints': 'notificationEndpoints', 'links': 'links' } - def __init__(self, logs=None, links=None): # noqa: E501 - """OperationLogs - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, notification_endpoints=None, links=None): # noqa: E501 + """DBRPs - a model defined in OpenAPI""" # noqa: E501 - self._logs = None + self._notification_endpoints = None self._links = None self.discriminator = None - if logs is not None: - self.logs = logs + if notification_endpoints is not None: + self.notification_endpoints = notification_endpoints if links is not None: self.links = links @property - def logs(self): - """Gets the logs of this OperationLogs. # noqa: E501 + def notification_endpoints(self): + """Gets the notification_endpoints of this DBRPs. # noqa: E501 - :return: The logs of this OperationLogs. # noqa: E501 - :rtype: list[OperationLog] + :return: The notification_endpoints of this DBRPs. # noqa: E501 + :rtype: list[DBRP] """ - return self._logs + return self._notification_endpoints - @logs.setter - def logs(self, logs): - """Sets the logs of this OperationLogs. + @notification_endpoints.setter + def notification_endpoints(self, notification_endpoints): + """Sets the notification_endpoints of this DBRPs. - :param logs: The logs of this OperationLogs. # noqa: E501 - :type: list[OperationLog] + :param notification_endpoints: The notification_endpoints of this DBRPs. # noqa: E501 + :type: list[DBRP] """ - self._logs = logs + self._notification_endpoints = notification_endpoints @property def links(self): - """Gets the links of this OperationLogs. # noqa: E501 + """Gets the links of this DBRPs. # noqa: E501 - :return: The links of this OperationLogs. # noqa: E501 + :return: The links of this DBRPs. # noqa: E501 :rtype: Links """ return self._links @links.setter def links(self, links): - """Sets the links of this OperationLogs. + """Sets the links of this DBRPs. - :param links: The links of this OperationLogs. # noqa: E501 + :param links: The links of this DBRPs. # noqa: E501 :type: Links """ @@ -128,7 +128,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, OperationLogs): + if not isinstance(other, DBRPs): return False return self.__dict__ == other.__dict__ diff --git a/influxdb_client/domain/dbrp.py b/influxdb_client/domain/dbrp.py new file mode 100644 index 00000000..73516ddb --- /dev/null +++ b/influxdb_client/domain/dbrp.py @@ -0,0 +1,313 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class DBRP(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + 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 = { + 'id': 'str', + 'org_id': 'str', + 'org': 'str', + 'bucket_id': 'str', + 'database': 'str', + 'retention_policy': 'str', + 'default': 'bool', + 'links': 'Links' + } + + attribute_map = { + 'id': 'id', + 'org_id': 'orgID', + 'org': 'org', + 'bucket_id': 'bucketID', + 'database': 'database', + 'retention_policy': 'retention_policy', + 'default': 'default', + 'links': 'links' + } + + def __init__(self, id=None, org_id=None, org=None, bucket_id=None, database=None, retention_policy=None, default=None, links=None): # noqa: E501 + """DBRP - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self._org_id = None + self._org = None + self._bucket_id = None + self._database = None + self._retention_policy = None + self._default = None + self._links = None + self.discriminator = None + + if id is not None: + self.id = id + self.org_id = org_id + self.org = org + self.bucket_id = bucket_id + self.database = database + self.retention_policy = retention_policy + if default is not None: + self.default = default + if links is not None: + self.links = links + + @property + def id(self): + """Gets the id of this DBRP. # noqa: E501 + + the mapping identifier # noqa: E501 + + :return: The id of this DBRP. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this DBRP. + + the mapping identifier # noqa: E501 + + :param id: The id of this DBRP. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def org_id(self): + """Gets the org_id of this DBRP. # noqa: E501 + + the organization ID that owns this mapping. # noqa: E501 + + :return: The org_id of this DBRP. # noqa: E501 + :rtype: str + """ + return self._org_id + + @org_id.setter + def org_id(self, org_id): + """Sets the org_id of this DBRP. + + the organization ID that owns this mapping. # noqa: E501 + + :param org_id: The org_id of this DBRP. # noqa: E501 + :type: str + """ + if org_id is None: + raise ValueError("Invalid value for `org_id`, must not be `None`") # noqa: E501 + + self._org_id = org_id + + @property + def org(self): + """Gets the org of this DBRP. # noqa: E501 + + the organization that owns this mapping. # noqa: E501 + + :return: The org of this DBRP. # noqa: E501 + :rtype: str + """ + return self._org + + @org.setter + def org(self, org): + """Sets the org of this DBRP. + + the organization that owns this mapping. # noqa: E501 + + :param org: The org of this DBRP. # noqa: E501 + :type: str + """ + if org is None: + raise ValueError("Invalid value for `org`, must not be `None`") # noqa: E501 + + self._org = org + + @property + def bucket_id(self): + """Gets the bucket_id of this DBRP. # noqa: E501 + + the bucket ID used as target for the translation. # noqa: E501 + + :return: The bucket_id of this DBRP. # noqa: E501 + :rtype: str + """ + return self._bucket_id + + @bucket_id.setter + def bucket_id(self, bucket_id): + """Sets the bucket_id of this DBRP. + + the bucket ID used as target for the translation. # noqa: E501 + + :param bucket_id: The bucket_id of this DBRP. # noqa: E501 + :type: str + """ + if bucket_id is None: + raise ValueError("Invalid value for `bucket_id`, must not be `None`") # noqa: E501 + + self._bucket_id = bucket_id + + @property + def database(self): + """Gets the database of this DBRP. # noqa: E501 + + InfluxDB v1 database # noqa: E501 + + :return: The database of this DBRP. # noqa: E501 + :rtype: str + """ + return self._database + + @database.setter + def database(self, database): + """Sets the database of this DBRP. + + InfluxDB v1 database # noqa: E501 + + :param database: The database of this DBRP. # noqa: E501 + :type: str + """ + if database is None: + raise ValueError("Invalid value for `database`, must not be `None`") # noqa: E501 + + self._database = database + + @property + def retention_policy(self): + """Gets the retention_policy of this DBRP. # noqa: E501 + + InfluxDB v1 retention policy # noqa: E501 + + :return: The retention_policy of this DBRP. # noqa: E501 + :rtype: str + """ + return self._retention_policy + + @retention_policy.setter + def retention_policy(self, retention_policy): + """Sets the retention_policy of this DBRP. + + InfluxDB v1 retention policy # noqa: E501 + + :param retention_policy: The retention_policy of this DBRP. # noqa: E501 + :type: str + """ + if retention_policy is None: + raise ValueError("Invalid value for `retention_policy`, must not be `None`") # noqa: E501 + + self._retention_policy = retention_policy + + @property + def default(self): + """Gets the default of this DBRP. # noqa: E501 + + Specify if this mapping represents the default retention policy for the database specificed. # noqa: E501 + + :return: The default of this DBRP. # noqa: E501 + :rtype: bool + """ + return self._default + + @default.setter + def default(self, default): + """Sets the default of this DBRP. + + Specify if this mapping represents the default retention policy for the database specificed. # noqa: E501 + + :param default: The default of this DBRP. # noqa: E501 + :type: bool + """ + + self._default = default + + @property + def links(self): + """Gets the links of this DBRP. # noqa: E501 + + + :return: The links of this DBRP. # noqa: E501 + :rtype: Links + """ + return self._links + + @links.setter + def links(self, links): + """Sets the links of this DBRP. + + + :param links: The links of this DBRP. # noqa: E501 + :type: Links + """ + + self._links = links + + def to_dict(self): + """Returns 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): + """Returns 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): + """Returns true if both objects are equal""" + if not isinstance(other, DBRP): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/influxdb_client/domain/operation_log.py b/influxdb_client/domain/dbrp_update.py similarity index 50% rename from influxdb_client/domain/operation_log.py rename to influxdb_client/domain/dbrp_update.py index 064c54d4..5e69ead6 100644 --- a/influxdb_client/domain/operation_log.py +++ b/influxdb_client/domain/dbrp_update.py @@ -16,7 +16,7 @@ import six -class OperationLog(object): +class DBRPUpdate(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -31,123 +31,121 @@ class OperationLog(object): and the value is json key in definition. """ openapi_types = { - 'description': 'str', - 'time': 'datetime', - 'user_id': 'str', - 'links': 'OperationLogLinks' + 'database': 'str', + 'retention_policy': 'str', + 'default': 'bool', + 'links': 'Links' } attribute_map = { - 'description': 'description', - 'time': 'time', - 'user_id': 'userID', + 'database': 'database', + 'retention_policy': 'retention_policy', + 'default': 'default', 'links': 'links' } - def __init__(self, description=None, time=None, user_id=None, links=None): # noqa: E501 - """OperationLog - a model defined in OpenAPI""" # noqa: E501 + def __init__(self, database=None, retention_policy=None, default=None, links=None): # noqa: E501 + """DBRPUpdate - a model defined in OpenAPI""" # noqa: E501 - self._description = None - self._time = None - self._user_id = None + self._database = None + self._retention_policy = None + self._default = None self._links = None self.discriminator = None - if description is not None: - self.description = description - if time is not None: - self.time = time - if user_id is not None: - self.user_id = user_id + if database is not None: + self.database = database + if retention_policy is not None: + self.retention_policy = retention_policy + if default is not None: + self.default = default if links is not None: self.links = links @property - def description(self): - """Gets the description of this OperationLog. # noqa: E501 + def database(self): + """Gets the database of this DBRPUpdate. # noqa: E501 - A description of the event that occurred. # noqa: E501 + InfluxDB v1 database # noqa: E501 - :return: The description of this OperationLog. # noqa: E501 + :return: The database of this DBRPUpdate. # noqa: E501 :rtype: str """ - return self._description + return self._database - @description.setter - def description(self, description): - """Sets the description of this OperationLog. + @database.setter + def database(self, database): + """Sets the database of this DBRPUpdate. - A description of the event that occurred. # noqa: E501 + InfluxDB v1 database # noqa: E501 - :param description: The description of this OperationLog. # noqa: E501 + :param database: The database of this DBRPUpdate. # noqa: E501 :type: str """ - self._description = description + self._database = database @property - def time(self): - """Gets the time of this OperationLog. # noqa: E501 + def retention_policy(self): + """Gets the retention_policy of this DBRPUpdate. # noqa: E501 - Time event occurred, RFC3339Nano. # noqa: E501 + InfluxDB v1 retention policy # noqa: E501 - :return: The time of this OperationLog. # noqa: E501 - :rtype: datetime + :return: The retention_policy of this DBRPUpdate. # noqa: E501 + :rtype: str """ - return self._time + return self._retention_policy - @time.setter - def time(self, time): - """Sets the time of this OperationLog. + @retention_policy.setter + def retention_policy(self, retention_policy): + """Sets the retention_policy of this DBRPUpdate. - Time event occurred, RFC3339Nano. # noqa: E501 + InfluxDB v1 retention policy # noqa: E501 - :param time: The time of this OperationLog. # noqa: E501 - :type: datetime + :param retention_policy: The retention_policy of this DBRPUpdate. # noqa: E501 + :type: str """ - self._time = time + self._retention_policy = retention_policy @property - def user_id(self): - """Gets the user_id of this OperationLog. # noqa: E501 + def default(self): + """Gets the default of this DBRPUpdate. # noqa: E501 - ID of the user who operated the event. # noqa: E501 - :return: The user_id of this OperationLog. # noqa: E501 - :rtype: str + :return: The default of this DBRPUpdate. # noqa: E501 + :rtype: bool """ - return self._user_id + return self._default - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this OperationLog. + @default.setter + def default(self, default): + """Sets the default of this DBRPUpdate. - ID of the user who operated the event. # noqa: E501 - :param user_id: The user_id of this OperationLog. # noqa: E501 - :type: str + :param default: The default of this DBRPUpdate. # noqa: E501 + :type: bool """ - self._user_id = user_id + self._default = default @property def links(self): - """Gets the links of this OperationLog. # noqa: E501 + """Gets the links of this DBRPUpdate. # noqa: E501 - :return: The links of this OperationLog. # noqa: E501 - :rtype: OperationLogLinks + :return: The links of this DBRPUpdate. # noqa: E501 + :rtype: Links """ return self._links @links.setter def links(self, links): - """Sets the links of this OperationLog. + """Sets the links of this DBRPUpdate. - :param links: The links of this OperationLog. # noqa: E501 - :type: OperationLogLinks + :param links: The links of this DBRPUpdate. # noqa: E501 + :type: Links """ self._links = links @@ -186,7 +184,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, OperationLog): + if not isinstance(other, DBRPUpdate): return False return self.__dict__ == other.__dict__ diff --git a/influxdb_client/domain/gauge_view_properties.py b/influxdb_client/domain/gauge_view_properties.py index cc7caaf5..d7bff055 100644 --- a/influxdb_client/domain/gauge_view_properties.py +++ b/influxdb_client/domain/gauge_view_properties.py @@ -39,7 +39,9 @@ class GaugeViewProperties(ViewProperties): 'note': 'str', 'show_note_when_empty': 'bool', 'prefix': 'str', + 'tick_prefix': 'str', 'suffix': 'str', + 'tick_suffix': 'str', 'legend': 'Legend', 'decimal_places': 'DecimalPlaces' } @@ -52,12 +54,14 @@ class GaugeViewProperties(ViewProperties): 'note': 'note', 'show_note_when_empty': 'showNoteWhenEmpty', 'prefix': 'prefix', + 'tick_prefix': 'tickPrefix', 'suffix': 'suffix', + 'tick_suffix': 'tickSuffix', 'legend': 'legend', 'decimal_places': 'decimalPlaces' } - def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, prefix=None, suffix=None, legend=None, decimal_places=None): # noqa: E501 + def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, prefix=None, tick_prefix=None, suffix=None, tick_suffix=None, legend=None, decimal_places=None): # noqa: E501 """GaugeViewProperties - a model defined in OpenAPI""" # noqa: E501 ViewProperties.__init__(self) @@ -68,7 +72,9 @@ def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, self._note = None self._show_note_when_empty = None self._prefix = None + self._tick_prefix = None self._suffix = None + self._tick_suffix = None self._legend = None self._decimal_places = None self.discriminator = None @@ -80,7 +86,9 @@ def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, self.note = note self.show_note_when_empty = show_note_when_empty self.prefix = prefix + self.tick_prefix = tick_prefix self.suffix = suffix + self.tick_suffix = tick_suffix self.legend = legend self.decimal_places = decimal_places @@ -249,6 +257,29 @@ def prefix(self, prefix): self._prefix = prefix + @property + def tick_prefix(self): + """Gets the tick_prefix of this GaugeViewProperties. # noqa: E501 + + + :return: The tick_prefix of this GaugeViewProperties. # noqa: E501 + :rtype: str + """ + return self._tick_prefix + + @tick_prefix.setter + def tick_prefix(self, tick_prefix): + """Sets the tick_prefix of this GaugeViewProperties. + + + :param tick_prefix: The tick_prefix of this GaugeViewProperties. # noqa: E501 + :type: str + """ + if tick_prefix is None: + raise ValueError("Invalid value for `tick_prefix`, must not be `None`") # noqa: E501 + + self._tick_prefix = tick_prefix + @property def suffix(self): """Gets the suffix of this GaugeViewProperties. # noqa: E501 @@ -272,6 +303,29 @@ def suffix(self, suffix): self._suffix = suffix + @property + def tick_suffix(self): + """Gets the tick_suffix of this GaugeViewProperties. # noqa: E501 + + + :return: The tick_suffix of this GaugeViewProperties. # noqa: E501 + :rtype: str + """ + return self._tick_suffix + + @tick_suffix.setter + def tick_suffix(self, tick_suffix): + """Sets the tick_suffix of this GaugeViewProperties. + + + :param tick_suffix: The tick_suffix of this GaugeViewProperties. # noqa: E501 + :type: str + """ + if tick_suffix is None: + raise ValueError("Invalid value for `tick_suffix`, must not be `None`") # noqa: E501 + + self._tick_suffix = tick_suffix + @property def legend(self): """Gets the legend of this GaugeViewProperties. # noqa: E501 diff --git a/influxdb_client/domain/health_check.py b/influxdb_client/domain/health_check.py index ca560f03..affc6c09 100644 --- a/influxdb_client/domain/health_check.py +++ b/influxdb_client/domain/health_check.py @@ -34,23 +34,29 @@ class HealthCheck(object): 'name': 'str', 'message': 'str', 'checks': 'list[HealthCheck]', - 'status': 'str' + 'status': 'str', + 'version': 'str', + 'commit': 'str' } attribute_map = { 'name': 'name', 'message': 'message', 'checks': 'checks', - 'status': 'status' + 'status': 'status', + 'version': 'version', + 'commit': 'commit' } - def __init__(self, name=None, message=None, checks=None, status=None): # noqa: E501 + def __init__(self, name=None, message=None, checks=None, status=None, version=None, commit=None): # noqa: E501 """HealthCheck - a model defined in OpenAPI""" # noqa: E501 self._name = None self._message = None self._checks = None self._status = None + self._version = None + self._commit = None self.discriminator = None self.name = name @@ -59,6 +65,10 @@ def __init__(self, name=None, message=None, checks=None, status=None): # noqa: if checks is not None: self.checks = checks self.status = status + if version is not None: + self.version = version + if commit is not None: + self.commit = commit @property def name(self): @@ -148,6 +158,48 @@ def status(self, status): self._status = status + @property + def version(self): + """Gets the version of this HealthCheck. # noqa: E501 + + + :return: The version of this HealthCheck. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this HealthCheck. + + + :param version: The version of this HealthCheck. # noqa: E501 + :type: str + """ + + self._version = version + + @property + def commit(self): + """Gets the commit of this HealthCheck. # noqa: E501 + + + :return: The commit of this HealthCheck. # noqa: E501 + :rtype: str + """ + return self._commit + + @commit.setter + def commit(self, commit): + """Sets the commit of this HealthCheck. + + + :param commit: The commit of this HealthCheck. # noqa: E501 + :type: str + """ + + self._commit = commit + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/influxdb_client/domain/heatmap_view_properties.py b/influxdb_client/domain/heatmap_view_properties.py index 509515ad..fc6f5b88 100644 --- a/influxdb_client/domain/heatmap_view_properties.py +++ b/influxdb_client/domain/heatmap_view_properties.py @@ -32,6 +32,7 @@ class HeatmapViewProperties(ViewProperties): and the value is json key in definition. """ openapi_types = { + 'time_format': 'str', 'type': 'str', 'queries': 'list[DashboardQuery]', 'colors': 'list[str]', @@ -52,6 +53,7 @@ class HeatmapViewProperties(ViewProperties): } attribute_map = { + 'time_format': 'timeFormat', 'type': 'type', 'queries': 'queries', 'colors': 'colors', @@ -71,10 +73,11 @@ class HeatmapViewProperties(ViewProperties): 'bin_size': 'binSize' } - def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, x_column=None, y_column=None, x_domain=None, y_domain=None, x_axis_label=None, y_axis_label=None, x_prefix=None, x_suffix=None, y_prefix=None, y_suffix=None, bin_size=None): # noqa: E501 + def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, x_column=None, y_column=None, x_domain=None, y_domain=None, x_axis_label=None, y_axis_label=None, x_prefix=None, x_suffix=None, y_prefix=None, y_suffix=None, bin_size=None): # noqa: E501 """HeatmapViewProperties - a model defined in OpenAPI""" # noqa: E501 ViewProperties.__init__(self) + self._time_format = None self._type = None self._queries = None self._colors = None @@ -94,6 +97,8 @@ def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, self._bin_size = None self.discriminator = None + if time_format is not None: + self.time_format = time_format self.type = type self.queries = queries self.colors = colors @@ -112,6 +117,27 @@ def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, self.y_suffix = y_suffix self.bin_size = bin_size + @property + def time_format(self): + """Gets the time_format of this HeatmapViewProperties. # noqa: E501 + + + :return: The time_format of this HeatmapViewProperties. # noqa: E501 + :rtype: str + """ + return self._time_format + + @time_format.setter + def time_format(self, time_format): + """Sets the time_format of this HeatmapViewProperties. + + + :param time_format: The time_format of this HeatmapViewProperties. # noqa: E501 + :type: str + """ + + self._time_format = time_format + @property def type(self): """Gets the type of this HeatmapViewProperties. # noqa: E501 diff --git a/influxdb_client/domain/line_plus_single_stat_properties.py b/influxdb_client/domain/line_plus_single_stat_properties.py index 9ae930e1..bff1e9ab 100644 --- a/influxdb_client/domain/line_plus_single_stat_properties.py +++ b/influxdb_client/domain/line_plus_single_stat_properties.py @@ -31,6 +31,7 @@ class LinePlusSingleStatProperties(object): and the value is json key in definition. """ openapi_types = { + 'time_format': 'str', 'type': 'str', 'queries': 'list[DashboardQuery]', 'colors': 'list[DashboardColor]', @@ -42,12 +43,14 @@ class LinePlusSingleStatProperties(object): 'x_column': 'str', 'y_column': 'str', 'shade_below': 'bool', + 'position': 'str', 'prefix': 'str', 'suffix': 'str', 'decimal_places': 'DecimalPlaces' } attribute_map = { + 'time_format': 'timeFormat', 'type': 'type', 'queries': 'queries', 'colors': 'colors', @@ -59,14 +62,16 @@ class LinePlusSingleStatProperties(object): 'x_column': 'xColumn', 'y_column': 'yColumn', 'shade_below': 'shadeBelow', + 'position': 'position', 'prefix': 'prefix', 'suffix': 'suffix', 'decimal_places': 'decimalPlaces' } - def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, axes=None, legend=None, x_column=None, y_column=None, shade_below=None, prefix=None, suffix=None, decimal_places=None): # noqa: E501 + def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, axes=None, legend=None, x_column=None, y_column=None, shade_below=None, position=None, prefix=None, suffix=None, decimal_places=None): # noqa: E501 """LinePlusSingleStatProperties - a model defined in OpenAPI""" # noqa: E501 + self._time_format = None self._type = None self._queries = None self._colors = None @@ -78,11 +83,14 @@ def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, self._x_column = None self._y_column = None self._shade_below = None + self._position = None self._prefix = None self._suffix = None self._decimal_places = None self.discriminator = None + if time_format is not None: + self.time_format = time_format self.type = type self.queries = queries self.colors = colors @@ -97,10 +105,32 @@ def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, self.y_column = y_column if shade_below is not None: self.shade_below = shade_below + self.position = position self.prefix = prefix self.suffix = suffix self.decimal_places = decimal_places + @property + def time_format(self): + """Gets the time_format of this LinePlusSingleStatProperties. # noqa: E501 + + + :return: The time_format of this LinePlusSingleStatProperties. # noqa: E501 + :rtype: str + """ + return self._time_format + + @time_format.setter + def time_format(self, time_format): + """Sets the time_format of this LinePlusSingleStatProperties. + + + :param time_format: The time_format of this LinePlusSingleStatProperties. # noqa: E501 + :type: str + """ + + self._time_format = time_format + @property def type(self): """Gets the type of this LinePlusSingleStatProperties. # noqa: E501 @@ -352,6 +382,29 @@ def shade_below(self, shade_below): self._shade_below = shade_below + @property + def position(self): + """Gets the position of this LinePlusSingleStatProperties. # noqa: E501 + + + :return: The position of this LinePlusSingleStatProperties. # noqa: E501 + :rtype: str + """ + return self._position + + @position.setter + def position(self, position): + """Sets the position of this LinePlusSingleStatProperties. + + + :param position: The position of this LinePlusSingleStatProperties. # noqa: E501 + :type: str + """ + if position is None: + raise ValueError("Invalid value for `position`, must not be `None`") # noqa: E501 + + self._position = position + @property def prefix(self): """Gets the prefix of this LinePlusSingleStatProperties. # noqa: E501 diff --git a/influxdb_client/domain/operation_log_links.py b/influxdb_client/domain/operation_log_links.py deleted file mode 100644 index e6daa05c..00000000 --- a/influxdb_client/domain/operation_log_links.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding: utf-8 - -""" - Influx API Service - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - OpenAPI spec version: 0.1.0 - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - - -class OperationLogLinks(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - 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 = { - 'user': 'str' - } - - attribute_map = { - 'user': 'user' - } - - def __init__(self, user=None): # noqa: E501 - """OperationLogLinks - a model defined in OpenAPI""" # noqa: E501 - - self._user = None - self.discriminator = None - - if user is not None: - self.user = user - - @property - def user(self): - """Gets the user of this OperationLogLinks. # noqa: E501 - - URI of resource. # noqa: E501 - - :return: The user of this OperationLogLinks. # noqa: E501 - :rtype: str - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this OperationLogLinks. - - URI of resource. # noqa: E501 - - :param user: The user of this OperationLogLinks. # noqa: E501 - :type: str - """ - - self._user = user - - def to_dict(self): - """Returns 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): - """Returns 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): - """Returns true if both objects are equal""" - if not isinstance(other, OperationLogLinks): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/influxdb_client/domain/organization_links.py b/influxdb_client/domain/organization_links.py index 46d6de92..d7d298cd 100644 --- a/influxdb_client/domain/organization_links.py +++ b/influxdb_client/domain/organization_links.py @@ -38,8 +38,7 @@ class OrganizationLinks(object): 'secrets': 'str', 'buckets': 'str', 'tasks': 'str', - 'dashboards': 'str', - 'logs': 'str' + 'dashboards': 'str' } attribute_map = { @@ -50,11 +49,10 @@ class OrganizationLinks(object): 'secrets': 'secrets', 'buckets': 'buckets', 'tasks': 'tasks', - 'dashboards': 'dashboards', - 'logs': 'logs' + 'dashboards': 'dashboards' } - def __init__(self, _self=None, members=None, owners=None, labels=None, secrets=None, buckets=None, tasks=None, dashboards=None, logs=None): # noqa: E501 + def __init__(self, _self=None, members=None, owners=None, labels=None, secrets=None, buckets=None, tasks=None, dashboards=None): # noqa: E501 """OrganizationLinks - a model defined in OpenAPI""" # noqa: E501 self.__self = None @@ -65,7 +63,6 @@ def __init__(self, _self=None, members=None, owners=None, labels=None, secrets=N self._buckets = None self._tasks = None self._dashboards = None - self._logs = None self.discriminator = None if _self is not None: @@ -84,8 +81,6 @@ def __init__(self, _self=None, members=None, owners=None, labels=None, secrets=N self.tasks = tasks if dashboards is not None: self.dashboards = dashboards - if logs is not None: - self.logs = logs @property def _self(self): @@ -271,29 +266,6 @@ def dashboards(self, dashboards): self._dashboards = dashboards - @property - def logs(self): - """Gets the logs of this OrganizationLinks. # noqa: E501 - - URI of resource. # noqa: E501 - - :return: The logs of this OrganizationLinks. # noqa: E501 - :rtype: str - """ - return self._logs - - @logs.setter - def logs(self, logs): - """Sets the logs of this OrganizationLinks. - - URI of resource. # noqa: E501 - - :param logs: The logs of this OrganizationLinks. # noqa: E501 - :type: str - """ - - self._logs = logs - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/influxdb_client/domain/query.py b/influxdb_client/domain/query.py index 67833ca8..7222681a 100644 --- a/influxdb_client/domain/query.py +++ b/influxdb_client/domain/query.py @@ -34,32 +34,26 @@ class Query(object): 'extern': 'File', 'query': 'str', 'type': 'str', - 'db': 'str', - 'rp': 'str', - 'cluster': 'str', - 'dialect': 'Dialect' + 'dialect': 'Dialect', + 'now': 'datetime' } attribute_map = { 'extern': 'extern', 'query': 'query', 'type': 'type', - 'db': 'db', - 'rp': 'rp', - 'cluster': 'cluster', - 'dialect': 'dialect' + 'dialect': 'dialect', + 'now': 'now' } - def __init__(self, extern=None, query=None, type='flux', db=None, rp=None, cluster=None, dialect=None): # noqa: E501 + def __init__(self, extern=None, query=None, type=None, dialect=None, now=None): # noqa: E501 """Query - a model defined in OpenAPI""" # noqa: E501 self._extern = None self._query = None self._type = None - self._db = None - self._rp = None - self._cluster = None self._dialect = None + self._now = None self.discriminator = None if extern is not None: @@ -67,14 +61,10 @@ def __init__(self, extern=None, query=None, type='flux', db=None, rp=None, clust self.query = query if type is not None: self.type = type - if db is not None: - self.db = db - if rp is not None: - self.rp = rp - if cluster is not None: - self.cluster = cluster if dialect is not None: self.dialect = dialect + if now is not None: + self.now = now @property def extern(self): @@ -126,7 +116,7 @@ def query(self, query): def type(self): """Gets the type of this Query. # noqa: E501 - The type of query. # noqa: E501 + The type of query. Must be \"flux\". # noqa: E501 :return: The type of this Query. # noqa: E501 :rtype: str @@ -137,7 +127,7 @@ def type(self): def type(self, type): """Sets the type of this Query. - The type of query. # noqa: E501 + The type of query. Must be \"flux\". # noqa: E501 :param type: The type of this Query. # noqa: E501 :type: str @@ -145,75 +135,6 @@ def type(self, type): self._type = type - @property - def db(self): - """Gets the db of this Query. # noqa: E501 - - Required for `influxql` type queries. # noqa: E501 - - :return: The db of this Query. # noqa: E501 - :rtype: str - """ - return self._db - - @db.setter - def db(self, db): - """Sets the db of this Query. - - Required for `influxql` type queries. # noqa: E501 - - :param db: The db of this Query. # noqa: E501 - :type: str - """ - - self._db = db - - @property - def rp(self): - """Gets the rp of this Query. # noqa: E501 - - Required for `influxql` type queries. # noqa: E501 - - :return: The rp of this Query. # noqa: E501 - :rtype: str - """ - return self._rp - - @rp.setter - def rp(self, rp): - """Sets the rp of this Query. - - Required for `influxql` type queries. # noqa: E501 - - :param rp: The rp of this Query. # noqa: E501 - :type: str - """ - - self._rp = rp - - @property - def cluster(self): - """Gets the cluster of this Query. # noqa: E501 - - Required for `influxql` type queries. # noqa: E501 - - :return: The cluster of this Query. # noqa: E501 - :rtype: str - """ - return self._cluster - - @cluster.setter - def cluster(self, cluster): - """Sets the cluster of this Query. - - Required for `influxql` type queries. # noqa: E501 - - :param cluster: The cluster of this Query. # noqa: E501 - :type: str - """ - - self._cluster = cluster - @property def dialect(self): """Gets the dialect of this Query. # noqa: E501 @@ -235,6 +156,29 @@ def dialect(self, dialect): self._dialect = dialect + @property + def now(self): + """Gets the now of this Query. # noqa: E501 + + Specifies the time that should be reported as \"now\" in the query. Default is the server's now time. # noqa: E501 + + :return: The now of this Query. # noqa: E501 + :rtype: datetime + """ + return self._now + + @now.setter + def now(self, now): + """Sets the now of this Query. + + Specifies the time that should be reported as \"now\" in the query. Default is the server's now time. # noqa: E501 + + :param now: The now of this Query. # noqa: E501 + :type: datetime + """ + + self._now = now + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/influxdb_client/domain/run_links.py b/influxdb_client/domain/run_links.py index 0fc0ecb3..732c9a44 100644 --- a/influxdb_client/domain/run_links.py +++ b/influxdb_client/domain/run_links.py @@ -33,23 +33,20 @@ class RunLinks(object): openapi_types = { '_self': 'str', 'task': 'str', - 'logs': 'str', 'retry': 'str' } attribute_map = { '_self': 'self', 'task': 'task', - 'logs': 'logs', 'retry': 'retry' } - def __init__(self, _self=None, task=None, logs=None, retry=None): # noqa: E501 + def __init__(self, _self=None, task=None, retry=None): # noqa: E501 """RunLinks - a model defined in OpenAPI""" # noqa: E501 self.__self = None self._task = None - self._logs = None self._retry = None self.discriminator = None @@ -57,8 +54,6 @@ def __init__(self, _self=None, task=None, logs=None, retry=None): # noqa: E501 self._self = _self if task is not None: self.task = task - if logs is not None: - self.logs = logs if retry is not None: self.retry = retry @@ -104,27 +99,6 @@ def task(self, task): self._task = task - @property - def logs(self): - """Gets the logs of this RunLinks. # noqa: E501 - - - :return: The logs of this RunLinks. # noqa: E501 - :rtype: str - """ - return self._logs - - @logs.setter - def logs(self, logs): - """Sets the logs of this RunLinks. - - - :param logs: The logs of this RunLinks. # noqa: E501 - :type: str - """ - - self._logs = logs - @property def retry(self): """Gets the retry of this RunLinks. # noqa: E501 diff --git a/influxdb_client/domain/scatter_view_properties.py b/influxdb_client/domain/scatter_view_properties.py index 5c397b8e..6eeee3ee 100644 --- a/influxdb_client/domain/scatter_view_properties.py +++ b/influxdb_client/domain/scatter_view_properties.py @@ -32,6 +32,7 @@ class ScatterViewProperties(ViewProperties): and the value is json key in definition. """ openapi_types = { + 'time_format': 'str', 'type': 'str', 'queries': 'list[DashboardQuery]', 'colors': 'list[str]', @@ -53,6 +54,7 @@ class ScatterViewProperties(ViewProperties): } attribute_map = { + 'time_format': 'timeFormat', 'type': 'type', 'queries': 'queries', 'colors': 'colors', @@ -73,10 +75,11 @@ class ScatterViewProperties(ViewProperties): 'y_suffix': 'ySuffix' } - def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, x_column=None, y_column=None, fill_columns=None, symbol_columns=None, x_domain=None, y_domain=None, x_axis_label=None, y_axis_label=None, x_prefix=None, x_suffix=None, y_prefix=None, y_suffix=None): # noqa: E501 + def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, x_column=None, y_column=None, fill_columns=None, symbol_columns=None, x_domain=None, y_domain=None, x_axis_label=None, y_axis_label=None, x_prefix=None, x_suffix=None, y_prefix=None, y_suffix=None): # noqa: E501 """ScatterViewProperties - a model defined in OpenAPI""" # noqa: E501 ViewProperties.__init__(self) + self._time_format = None self._type = None self._queries = None self._colors = None @@ -97,6 +100,8 @@ def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, self._y_suffix = None self.discriminator = None + if time_format is not None: + self.time_format = time_format self.type = type self.queries = queries self.colors = colors @@ -116,6 +121,27 @@ def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, self.y_prefix = y_prefix self.y_suffix = y_suffix + @property + def time_format(self): + """Gets the time_format of this ScatterViewProperties. # noqa: E501 + + + :return: The time_format of this ScatterViewProperties. # noqa: E501 + :rtype: str + """ + return self._time_format + + @time_format.setter + def time_format(self, time_format): + """Sets the time_format of this ScatterViewProperties. + + + :param time_format: The time_format of this ScatterViewProperties. # noqa: E501 + :type: str + """ + + self._time_format = time_format + @property def type(self): """Gets the type of this ScatterViewProperties. # noqa: E501 diff --git a/influxdb_client/domain/single_stat_view_properties.py b/influxdb_client/domain/single_stat_view_properties.py index caf2a3e6..de4f4cbb 100644 --- a/influxdb_client/domain/single_stat_view_properties.py +++ b/influxdb_client/domain/single_stat_view_properties.py @@ -39,7 +39,9 @@ class SingleStatViewProperties(ViewProperties): 'note': 'str', 'show_note_when_empty': 'bool', 'prefix': 'str', + 'tick_prefix': 'str', 'suffix': 'str', + 'tick_suffix': 'str', 'legend': 'Legend', 'decimal_places': 'DecimalPlaces' } @@ -52,12 +54,14 @@ class SingleStatViewProperties(ViewProperties): 'note': 'note', 'show_note_when_empty': 'showNoteWhenEmpty', 'prefix': 'prefix', + 'tick_prefix': 'tickPrefix', 'suffix': 'suffix', + 'tick_suffix': 'tickSuffix', 'legend': 'legend', 'decimal_places': 'decimalPlaces' } - def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, prefix=None, suffix=None, legend=None, decimal_places=None): # noqa: E501 + def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, prefix=None, tick_prefix=None, suffix=None, tick_suffix=None, legend=None, decimal_places=None): # noqa: E501 """SingleStatViewProperties - a model defined in OpenAPI""" # noqa: E501 ViewProperties.__init__(self) @@ -68,7 +72,9 @@ def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, self._note = None self._show_note_when_empty = None self._prefix = None + self._tick_prefix = None self._suffix = None + self._tick_suffix = None self._legend = None self._decimal_places = None self.discriminator = None @@ -80,7 +86,9 @@ def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, self.note = note self.show_note_when_empty = show_note_when_empty self.prefix = prefix + self.tick_prefix = tick_prefix self.suffix = suffix + self.tick_suffix = tick_suffix self.legend = legend self.decimal_places = decimal_places @@ -249,6 +257,29 @@ def prefix(self, prefix): self._prefix = prefix + @property + def tick_prefix(self): + """Gets the tick_prefix of this SingleStatViewProperties. # noqa: E501 + + + :return: The tick_prefix of this SingleStatViewProperties. # noqa: E501 + :rtype: str + """ + return self._tick_prefix + + @tick_prefix.setter + def tick_prefix(self, tick_prefix): + """Sets the tick_prefix of this SingleStatViewProperties. + + + :param tick_prefix: The tick_prefix of this SingleStatViewProperties. # noqa: E501 + :type: str + """ + if tick_prefix is None: + raise ValueError("Invalid value for `tick_prefix`, must not be `None`") # noqa: E501 + + self._tick_prefix = tick_prefix + @property def suffix(self): """Gets the suffix of this SingleStatViewProperties. # noqa: E501 @@ -272,6 +303,29 @@ def suffix(self, suffix): self._suffix = suffix + @property + def tick_suffix(self): + """Gets the tick_suffix of this SingleStatViewProperties. # noqa: E501 + + + :return: The tick_suffix of this SingleStatViewProperties. # noqa: E501 + :rtype: str + """ + return self._tick_suffix + + @tick_suffix.setter + def tick_suffix(self, tick_suffix): + """Sets the tick_suffix of this SingleStatViewProperties. + + + :param tick_suffix: The tick_suffix of this SingleStatViewProperties. # noqa: E501 + :type: str + """ + if tick_suffix is None: + raise ValueError("Invalid value for `tick_suffix`, must not be `None`") # noqa: E501 + + self._tick_suffix = tick_suffix + @property def legend(self): """Gets the legend of this SingleStatViewProperties. # noqa: E501 diff --git a/influxdb_client/domain/user_links.py b/influxdb_client/domain/user_links.py index 9b04588b..fd82fb98 100644 --- a/influxdb_client/domain/user_links.py +++ b/influxdb_client/domain/user_links.py @@ -31,26 +31,21 @@ class UserLinks(object): and the value is json key in definition. """ openapi_types = { - '_self': 'str', - 'logs': 'str' + '_self': 'str' } attribute_map = { - '_self': 'self', - 'logs': 'logs' + '_self': 'self' } - def __init__(self, _self=None, logs=None): # noqa: E501 + def __init__(self, _self=None): # noqa: E501 """UserLinks - a model defined in OpenAPI""" # noqa: E501 self.__self = None - self._logs = None self.discriminator = None if _self is not None: self._self = _self - if logs is not None: - self.logs = logs @property def _self(self): @@ -73,27 +68,6 @@ def _self(self, _self): self.__self = _self - @property - def logs(self): - """Gets the logs of this UserLinks. # noqa: E501 - - - :return: The logs of this UserLinks. # noqa: E501 - :rtype: str - """ - return self._logs - - @logs.setter - def logs(self, logs): - """Sets the logs of this UserLinks. - - - :param logs: The logs of this UserLinks. # noqa: E501 - :type: str - """ - - self._logs = logs - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/influxdb_client/domain/xy_view_properties.py b/influxdb_client/domain/xy_view_properties.py index 82d86dfb..e725f6bd 100644 --- a/influxdb_client/domain/xy_view_properties.py +++ b/influxdb_client/domain/xy_view_properties.py @@ -32,6 +32,7 @@ class XYViewProperties(ViewProperties): and the value is json key in definition. """ openapi_types = { + 'time_format': 'str', 'type': 'str', 'queries': 'list[DashboardQuery]', 'colors': 'list[DashboardColor]', @@ -43,10 +44,12 @@ class XYViewProperties(ViewProperties): 'x_column': 'str', 'y_column': 'str', 'shade_below': 'bool', + 'position': 'str', 'geom': 'XYGeom' } attribute_map = { + 'time_format': 'timeFormat', 'type': 'type', 'queries': 'queries', 'colors': 'colors', @@ -58,13 +61,15 @@ class XYViewProperties(ViewProperties): 'x_column': 'xColumn', 'y_column': 'yColumn', 'shade_below': 'shadeBelow', + 'position': 'position', 'geom': 'geom' } - def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, axes=None, legend=None, x_column=None, y_column=None, shade_below=None, geom=None): # noqa: E501 + def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, axes=None, legend=None, x_column=None, y_column=None, shade_below=None, position=None, geom=None): # noqa: E501 """XYViewProperties - a model defined in OpenAPI""" # noqa: E501 ViewProperties.__init__(self) + self._time_format = None self._type = None self._queries = None self._colors = None @@ -76,9 +81,12 @@ def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, self._x_column = None self._y_column = None self._shade_below = None + self._position = None self._geom = None self.discriminator = None + if time_format is not None: + self.time_format = time_format self.type = type self.queries = queries self.colors = colors @@ -93,8 +101,30 @@ def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, self.y_column = y_column if shade_below is not None: self.shade_below = shade_below + self.position = position self.geom = geom + @property + def time_format(self): + """Gets the time_format of this XYViewProperties. # noqa: E501 + + + :return: The time_format of this XYViewProperties. # noqa: E501 + :rtype: str + """ + return self._time_format + + @time_format.setter + def time_format(self, time_format): + """Sets the time_format of this XYViewProperties. + + + :param time_format: The time_format of this XYViewProperties. # noqa: E501 + :type: str + """ + + self._time_format = time_format + @property def type(self): """Gets the type of this XYViewProperties. # noqa: E501 @@ -346,6 +376,29 @@ def shade_below(self, shade_below): self._shade_below = shade_below + @property + def position(self): + """Gets the position of this XYViewProperties. # noqa: E501 + + + :return: The position of this XYViewProperties. # noqa: E501 + :rtype: str + """ + return self._position + + @position.setter + def position(self, position): + """Sets the position of this XYViewProperties. + + + :param position: The position of this XYViewProperties. # noqa: E501 + :type: str + """ + if position is None: + raise ValueError("Invalid value for `position`, must not be `None`") # noqa: E501 + + self._position = position + @property def geom(self): """Gets the geom of this XYViewProperties. # noqa: E501 diff --git a/influxdb_client/service/__init__.py b/influxdb_client/service/__init__.py index 02b84404..9777d6e3 100644 --- a/influxdb_client/service/__init__.py +++ b/influxdb_client/service/__init__.py @@ -7,13 +7,13 @@ from influxdb_client.service.buckets_service import BucketsService from influxdb_client.service.cells_service import CellsService from influxdb_client.service.checks_service import ChecksService +from influxdb_client.service.dbr_ps_service import DBRPsService from influxdb_client.service.dashboards_service import DashboardsService from influxdb_client.service.health_service import HealthService from influxdb_client.service.influx_packages_service import InfluxPackagesService from influxdb_client.service.labels_service import LabelsService from influxdb_client.service.notification_endpoints_service import NotificationEndpointsService from influxdb_client.service.notification_rules_service import NotificationRulesService -from influxdb_client.service.operation_logs_service import OperationLogsService from influxdb_client.service.organizations_service import OrganizationsService from influxdb_client.service.query_service import QueryService from influxdb_client.service.ready_service import ReadyService diff --git a/influxdb_client/service/buckets_service.py b/influxdb_client/service/buckets_service.py index 6adb70e2..9dfd408a 100644 --- a/influxdb_client/service/buckets_service.py +++ b/influxdb_client/service/buckets_service.py @@ -760,118 +760,6 @@ def get_buckets_id_labels_with_http_info(self, bucket_id, **kwargs): # noqa: E5 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_buckets_id_logs(self, bucket_id, **kwargs): # noqa: E501 - """Retrieve operation logs for a bucket # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_buckets_id_logs(bucket_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :return: OperationLogs - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_buckets_id_logs_with_http_info(bucket_id, **kwargs) # noqa: E501 - else: - (data) = self.get_buckets_id_logs_with_http_info(bucket_id, **kwargs) # noqa: E501 - return data - - def get_buckets_id_logs_with_http_info(self, bucket_id, **kwargs): # noqa: E501 - """Retrieve operation logs for a bucket # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_buckets_id_logs_with_http_info(bucket_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :return: OperationLogs - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = ['bucket_id', 'zap_trace_span', 'offset', 'limit'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - 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 get_buckets_id_logs" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'bucket_id' is set - if ('bucket_id' not in local_var_params or - local_var_params['bucket_id'] is None): - raise ValueError("Missing the required parameter `bucket_id` when calling `get_buckets_id_logs`") # noqa: E501 - - if 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ValueError("Invalid value for parameter `offset` when calling `get_buckets_id_logs`, must be a value greater than or equal to `0`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_buckets_id_logs`, must be a value less than or equal to `100`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_buckets_id_logs`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'bucket_id' in local_var_params: - path_params['bucketID'] = local_var_params['bucket_id'] # noqa: E501 - - query_params = [] - if 'offset' in local_var_params: - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'limit' in local_var_params: - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/logs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OperationLogs', # 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) - def get_buckets_id_members(self, bucket_id, **kwargs): # noqa: E501 """List all users with member privileges for a bucket # noqa: E501 diff --git a/influxdb_client/service/dashboards_service.py b/influxdb_client/service/dashboards_service.py index 08f12a7a..e35fa9a0 100644 --- a/influxdb_client/service/dashboards_service.py +++ b/influxdb_client/service/dashboards_service.py @@ -676,6 +676,7 @@ def get_dashboards_id(self, dashboard_id, **kwargs): # noqa: E501 :param async_req bool :param str dashboard_id: The ID of the dashboard to update. (required) :param str zap_trace_span: OpenTracing span context + :param str include: Includes the cell view properties in the response if set to `properties` :return: Dashboard If the method is called asynchronously, returns the request thread. @@ -698,6 +699,7 @@ def get_dashboards_id_with_http_info(self, dashboard_id, **kwargs): # noqa: E50 :param async_req bool :param str dashboard_id: The ID of the dashboard to update. (required) :param str zap_trace_span: OpenTracing span context + :param str include: Includes the cell view properties in the response if set to `properties` :return: Dashboard If the method is called asynchronously, returns the request thread. @@ -705,7 +707,7 @@ def get_dashboards_id_with_http_info(self, dashboard_id, **kwargs): # noqa: E50 local_var_params = locals() - all_params = ['dashboard_id', 'zap_trace_span'] # noqa: E501 + all_params = ['dashboard_id', 'zap_trace_span', 'include'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -731,6 +733,8 @@ def get_dashboards_id_with_http_info(self, dashboard_id, **kwargs): # noqa: E50 path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 query_params = [] + if 'include' in local_var_params: + query_params.append(('include', local_var_params['include'])) # noqa: E501 header_params = {} if 'zap_trace_span' in local_var_params: @@ -967,118 +971,6 @@ def get_dashboards_id_labels_with_http_info(self, dashboard_id, **kwargs): # no _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_dashboards_id_logs(self, dashboard_id, **kwargs): # noqa: E501 - """Retrieve operation logs for a dashboard # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_dashboards_id_logs(dashboard_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :return: OperationLogs - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_dashboards_id_logs_with_http_info(dashboard_id, **kwargs) # noqa: E501 - else: - (data) = self.get_dashboards_id_logs_with_http_info(dashboard_id, **kwargs) # noqa: E501 - return data - - def get_dashboards_id_logs_with_http_info(self, dashboard_id, **kwargs): # noqa: E501 - """Retrieve operation logs for a dashboard # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_dashboards_id_logs_with_http_info(dashboard_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :return: OperationLogs - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = ['dashboard_id', 'zap_trace_span', 'offset', 'limit'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - 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 get_dashboards_id_logs" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'dashboard_id' is set - if ('dashboard_id' not in local_var_params or - local_var_params['dashboard_id'] is None): - raise ValueError("Missing the required parameter `dashboard_id` when calling `get_dashboards_id_logs`") # noqa: E501 - - if 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ValueError("Invalid value for parameter `offset` when calling `get_dashboards_id_logs`, must be a value greater than or equal to `0`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_dashboards_id_logs`, must be a value less than or equal to `100`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_dashboards_id_logs`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 - - query_params = [] - if 'offset' in local_var_params: - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'limit' in local_var_params: - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/logs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OperationLogs', # 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) - def get_dashboards_id_members(self, dashboard_id, **kwargs): # noqa: E501 """List all dashboard members # noqa: E501 diff --git a/influxdb_client/service/dbr_ps_service.py b/influxdb_client/service/dbr_ps_service.py new file mode 100644 index 00000000..386b7648 --- /dev/null +++ b/influxdb_client/service/dbr_ps_service.py @@ -0,0 +1,583 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from influxdb_client.api_client import ApiClient + + +class DBRPsService(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): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_dbrpid(self, org_id, dbrp_id, **kwargs): # noqa: E501 + """Delete a database retention policy # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_dbrpid(org_id, dbrp_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org_id: Specifies the organization ID of the mapping (required) + :param str dbrp_id: The database retention policy mapping (required) + :param str zap_trace_span: OpenTracing span context + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_dbrpid_with_http_info(org_id, dbrp_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_dbrpid_with_http_info(org_id, dbrp_id, **kwargs) # noqa: E501 + return data + + def delete_dbrpid_with_http_info(self, org_id, dbrp_id, **kwargs): # noqa: E501 + """Delete a database retention policy # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_dbrpid_with_http_info(org_id, dbrp_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org_id: Specifies the organization ID of the mapping (required) + :param str dbrp_id: The database retention policy mapping (required) + :param str zap_trace_span: OpenTracing span context + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['org_id', 'dbrp_id', 'zap_trace_span'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + 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 delete_dbrpid" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'org_id' is set + if ('org_id' not in local_var_params or + local_var_params['org_id'] is None): + raise ValueError("Missing the required parameter `org_id` when calling `delete_dbrpid`") # noqa: E501 + # verify the required parameter 'dbrp_id' is set + if ('dbrp_id' not in local_var_params or + local_var_params['dbrp_id'] is None): + raise ValueError("Missing the required parameter `dbrp_id` when calling `delete_dbrpid`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'dbrp_id' in local_var_params: + path_params['dbrpID'] = local_var_params['dbrp_id'] # noqa: E501 + + query_params = [] + if 'org_id' in local_var_params: + query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 + + header_params = {} + if 'zap_trace_span' in local_var_params: + header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/dbrps/{dbrpID}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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) + + def get_dbr_ps(self, org_id, **kwargs): # noqa: E501 + """List all database retention policy mappings # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_dbr_ps(org_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org_id: Specifies the organization ID to filter on (required) + :param str zap_trace_span: OpenTracing span context + :param str id: Specifies the mapping ID to filter on + :param str bucket_id: Specifies the bucket ID to filter on + :param bool default: Specifies filtering on default + :param str db: Specifies the database to filter on + :param str rp: Specifies the retention policy to filter on + :return: DBRPs + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_dbr_ps_with_http_info(org_id, **kwargs) # noqa: E501 + else: + (data) = self.get_dbr_ps_with_http_info(org_id, **kwargs) # noqa: E501 + return data + + def get_dbr_ps_with_http_info(self, org_id, **kwargs): # noqa: E501 + """List all database retention policy mappings # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_dbr_ps_with_http_info(org_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org_id: Specifies the organization ID to filter on (required) + :param str zap_trace_span: OpenTracing span context + :param str id: Specifies the mapping ID to filter on + :param str bucket_id: Specifies the bucket ID to filter on + :param bool default: Specifies filtering on default + :param str db: Specifies the database to filter on + :param str rp: Specifies the retention policy to filter on + :return: DBRPs + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['org_id', 'zap_trace_span', 'id', 'bucket_id', 'default', 'db', 'rp'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + 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 get_dbr_ps" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'org_id' is set + if ('org_id' not in local_var_params or + local_var_params['org_id'] is None): + raise ValueError("Missing the required parameter `org_id` when calling `get_dbr_ps`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'org_id' in local_var_params: + query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 + if 'id' in local_var_params: + query_params.append(('id', local_var_params['id'])) # noqa: E501 + if 'bucket_id' in local_var_params: + query_params.append(('bucketID', local_var_params['bucket_id'])) # noqa: E501 + if 'default' in local_var_params: + query_params.append(('default', local_var_params['default'])) # noqa: E501 + if 'db' in local_var_params: + query_params.append(('db', local_var_params['db'])) # noqa: E501 + if 'rp' in local_var_params: + query_params.append(('rp', local_var_params['rp'])) # noqa: E501 + + header_params = {} + if 'zap_trace_span' in local_var_params: + header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/dbrps', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DBRPs', # 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) + + def get_dbr_ps_id(self, org_id, dbrp_id, **kwargs): # noqa: E501 + """Retrieve a database retention policy mapping # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_dbr_ps_id(org_id, dbrp_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org_id: Specifies the organization ID of the mapping (required) + :param str dbrp_id: The database retention policy mapping ID (required) + :param str zap_trace_span: OpenTracing span context + :return: DBRP + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_dbr_ps_id_with_http_info(org_id, dbrp_id, **kwargs) # noqa: E501 + else: + (data) = self.get_dbr_ps_id_with_http_info(org_id, dbrp_id, **kwargs) # noqa: E501 + return data + + def get_dbr_ps_id_with_http_info(self, org_id, dbrp_id, **kwargs): # noqa: E501 + """Retrieve a database retention policy mapping # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_dbr_ps_id_with_http_info(org_id, dbrp_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org_id: Specifies the organization ID of the mapping (required) + :param str dbrp_id: The database retention policy mapping ID (required) + :param str zap_trace_span: OpenTracing span context + :return: DBRP + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['org_id', 'dbrp_id', 'zap_trace_span'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + 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 get_dbr_ps_id" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'org_id' is set + if ('org_id' not in local_var_params or + local_var_params['org_id'] is None): + raise ValueError("Missing the required parameter `org_id` when calling `get_dbr_ps_id`") # noqa: E501 + # verify the required parameter 'dbrp_id' is set + if ('dbrp_id' not in local_var_params or + local_var_params['dbrp_id'] is None): + raise ValueError("Missing the required parameter `dbrp_id` when calling `get_dbr_ps_id`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'dbrp_id' in local_var_params: + path_params['dbrpID'] = local_var_params['dbrp_id'] # noqa: E501 + + query_params = [] + if 'org_id' in local_var_params: + query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 + + header_params = {} + if 'zap_trace_span' in local_var_params: + header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/dbrps/{dbrpID}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DBRP', # 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) + + def patch_dbrpid(self, org_id, dbrp_id, dbrp_update, **kwargs): # noqa: E501 + """Update a database retention policy mapping # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_dbrpid(org_id, dbrp_id, dbrp_update, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org_id: Specifies the organization ID of the mapping (required) + :param str dbrp_id: The database retention policy mapping. (required) + :param DBRPUpdate dbrp_update: Database retention policy update to apply (required) + :param str zap_trace_span: OpenTracing span context + :return: DBRP + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.patch_dbrpid_with_http_info(org_id, dbrp_id, dbrp_update, **kwargs) # noqa: E501 + else: + (data) = self.patch_dbrpid_with_http_info(org_id, dbrp_id, dbrp_update, **kwargs) # noqa: E501 + return data + + def patch_dbrpid_with_http_info(self, org_id, dbrp_id, dbrp_update, **kwargs): # noqa: E501 + """Update a database retention policy mapping # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.patch_dbrpid_with_http_info(org_id, dbrp_id, dbrp_update, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org_id: Specifies the organization ID of the mapping (required) + :param str dbrp_id: The database retention policy mapping. (required) + :param DBRPUpdate dbrp_update: Database retention policy update to apply (required) + :param str zap_trace_span: OpenTracing span context + :return: DBRP + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['org_id', 'dbrp_id', 'dbrp_update', 'zap_trace_span'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + 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 patch_dbrpid" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'org_id' is set + if ('org_id' not in local_var_params or + local_var_params['org_id'] is None): + raise ValueError("Missing the required parameter `org_id` when calling `patch_dbrpid`") # noqa: E501 + # verify the required parameter 'dbrp_id' is set + if ('dbrp_id' not in local_var_params or + local_var_params['dbrp_id'] is None): + raise ValueError("Missing the required parameter `dbrp_id` when calling `patch_dbrpid`") # noqa: E501 + # verify the required parameter 'dbrp_update' is set + if ('dbrp_update' not in local_var_params or + local_var_params['dbrp_update'] is None): + raise ValueError("Missing the required parameter `dbrp_update` when calling `patch_dbrpid`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'dbrp_id' in local_var_params: + path_params['dbrpID'] = local_var_params['dbrp_id'] # noqa: E501 + + query_params = [] + if 'org_id' in local_var_params: + query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 + + header_params = {} + if 'zap_trace_span' in local_var_params: + header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'dbrp_update' in local_var_params: + body_params = local_var_params['dbrp_update'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/dbrps/{dbrpID}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DBRP', # 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) + + def post_dbrp(self, dbrp, **kwargs): # noqa: E501 + """Add a database retention policy mapping # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_dbrp(dbrp, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param DBRP dbrp: The database retention policy mapping to add (required) + :param str zap_trace_span: OpenTracing span context + :return: DBRP + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.post_dbrp_with_http_info(dbrp, **kwargs) # noqa: E501 + else: + (data) = self.post_dbrp_with_http_info(dbrp, **kwargs) # noqa: E501 + return data + + def post_dbrp_with_http_info(self, dbrp, **kwargs): # noqa: E501 + """Add a database retention policy mapping # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_dbrp_with_http_info(dbrp, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param DBRP dbrp: The database retention policy mapping to add (required) + :param str zap_trace_span: OpenTracing span context + :return: DBRP + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['dbrp', 'zap_trace_span'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + 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 post_dbrp" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'dbrp' is set + if ('dbrp' not in local_var_params or + local_var_params['dbrp'] is None): + raise ValueError("Missing the required parameter `dbrp` when calling `post_dbrp`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + if 'zap_trace_span' in local_var_params: + header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'dbrp' in local_var_params: + body_params = local_var_params['dbrp'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/dbrps', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DBRP', # 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) diff --git a/influxdb_client/service/operation_logs_service.py b/influxdb_client/service/operation_logs_service.py deleted file mode 100644 index 3a582ea9..00000000 --- a/influxdb_client/service/operation_logs_service.py +++ /dev/null @@ -1,481 +0,0 @@ -# coding: utf-8 - -""" - Influx API Service - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 - - OpenAPI spec version: 0.1.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from influxdb_client.api_client import ApiClient - - -class OperationLogsService(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): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def get_buckets_id_logs(self, bucket_id, **kwargs): # noqa: E501 - """Retrieve operation logs for a bucket # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_buckets_id_logs(bucket_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :return: OperationLogs - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_buckets_id_logs_with_http_info(bucket_id, **kwargs) # noqa: E501 - else: - (data) = self.get_buckets_id_logs_with_http_info(bucket_id, **kwargs) # noqa: E501 - return data - - def get_buckets_id_logs_with_http_info(self, bucket_id, **kwargs): # noqa: E501 - """Retrieve operation logs for a bucket # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_buckets_id_logs_with_http_info(bucket_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :return: OperationLogs - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = ['bucket_id', 'zap_trace_span', 'offset', 'limit'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - 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 get_buckets_id_logs" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'bucket_id' is set - if ('bucket_id' not in local_var_params or - local_var_params['bucket_id'] is None): - raise ValueError("Missing the required parameter `bucket_id` when calling `get_buckets_id_logs`") # noqa: E501 - - if 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ValueError("Invalid value for parameter `offset` when calling `get_buckets_id_logs`, must be a value greater than or equal to `0`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_buckets_id_logs`, must be a value less than or equal to `100`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_buckets_id_logs`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'bucket_id' in local_var_params: - path_params['bucketID'] = local_var_params['bucket_id'] # noqa: E501 - - query_params = [] - if 'offset' in local_var_params: - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'limit' in local_var_params: - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/logs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OperationLogs', # 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) - - def get_dashboards_id_logs(self, dashboard_id, **kwargs): # noqa: E501 - """Retrieve operation logs for a dashboard # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_dashboards_id_logs(dashboard_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :return: OperationLogs - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_dashboards_id_logs_with_http_info(dashboard_id, **kwargs) # noqa: E501 - else: - (data) = self.get_dashboards_id_logs_with_http_info(dashboard_id, **kwargs) # noqa: E501 - return data - - def get_dashboards_id_logs_with_http_info(self, dashboard_id, **kwargs): # noqa: E501 - """Retrieve operation logs for a dashboard # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_dashboards_id_logs_with_http_info(dashboard_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :return: OperationLogs - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = ['dashboard_id', 'zap_trace_span', 'offset', 'limit'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - 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 get_dashboards_id_logs" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'dashboard_id' is set - if ('dashboard_id' not in local_var_params or - local_var_params['dashboard_id'] is None): - raise ValueError("Missing the required parameter `dashboard_id` when calling `get_dashboards_id_logs`") # noqa: E501 - - if 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ValueError("Invalid value for parameter `offset` when calling `get_dashboards_id_logs`, must be a value greater than or equal to `0`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_dashboards_id_logs`, must be a value less than or equal to `100`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_dashboards_id_logs`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 - - query_params = [] - if 'offset' in local_var_params: - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'limit' in local_var_params: - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/logs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OperationLogs', # 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) - - def get_orgs_id_logs(self, org_id, **kwargs): # noqa: E501 - """Retrieve operation logs for an organization # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_orgs_id_logs(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :return: OperationLogs - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_orgs_id_logs_with_http_info(org_id, **kwargs) # noqa: E501 - else: - (data) = self.get_orgs_id_logs_with_http_info(org_id, **kwargs) # noqa: E501 - return data - - def get_orgs_id_logs_with_http_info(self, org_id, **kwargs): # noqa: E501 - """Retrieve operation logs for an organization # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_orgs_id_logs_with_http_info(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :return: OperationLogs - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = ['org_id', 'zap_trace_span', 'offset', 'limit'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - 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 get_orgs_id_logs" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'org_id' is set - if ('org_id' not in local_var_params or - local_var_params['org_id'] is None): - raise ValueError("Missing the required parameter `org_id` when calling `get_orgs_id_logs`") # noqa: E501 - - if 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ValueError("Invalid value for parameter `offset` when calling `get_orgs_id_logs`, must be a value greater than or equal to `0`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_orgs_id_logs`, must be a value less than or equal to `100`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_orgs_id_logs`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'org_id' in local_var_params: - path_params['orgID'] = local_var_params['org_id'] # noqa: E501 - - query_params = [] - if 'offset' in local_var_params: - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'limit' in local_var_params: - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}/logs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OperationLogs', # 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) - - def get_users_id_logs(self, user_id, **kwargs): # noqa: E501 - """Retrieve operation logs for a user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_users_id_logs(user_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The user ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :return: OperationLogs - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_users_id_logs_with_http_info(user_id, **kwargs) # noqa: E501 - else: - (data) = self.get_users_id_logs_with_http_info(user_id, **kwargs) # noqa: E501 - return data - - def get_users_id_logs_with_http_info(self, user_id, **kwargs): # noqa: E501 - """Retrieve operation logs for a user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_users_id_logs_with_http_info(user_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The user ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :return: OperationLogs - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = ['user_id', 'zap_trace_span', 'offset', 'limit'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - 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 get_users_id_logs" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in local_var_params or - local_var_params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `get_users_id_logs`") # noqa: E501 - - if 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ValueError("Invalid value for parameter `offset` when calling `get_users_id_logs`, must be a value greater than or equal to `0`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_users_id_logs`, must be a value less than or equal to `100`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_users_id_logs`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['userID'] = local_var_params['user_id'] # noqa: E501 - - query_params = [] - if 'offset' in local_var_params: - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'limit' in local_var_params: - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/v2/users/{userID}/logs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OperationLogs', # 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) diff --git a/influxdb_client/service/organizations_service.py b/influxdb_client/service/organizations_service.py index 1e0a8fbc..bf22b0d6 100644 --- a/influxdb_client/service/organizations_service.py +++ b/influxdb_client/service/organizations_service.py @@ -460,6 +460,7 @@ def get_orgs(self, **kwargs): # noqa: E501 :param str zap_trace_span: OpenTracing span context :param str org: Filter organizations to a specific organization name. :param str org_id: Filter organizations to a specific organization ID. + :param str user_id: Filter organizations to a specific user ID. :return: Organizations If the method is called asynchronously, returns the request thread. @@ -483,6 +484,7 @@ def get_orgs_with_http_info(self, **kwargs): # noqa: E501 :param str zap_trace_span: OpenTracing span context :param str org: Filter organizations to a specific organization name. :param str org_id: Filter organizations to a specific organization ID. + :param str user_id: Filter organizations to a specific user ID. :return: Organizations If the method is called asynchronously, returns the request thread. @@ -490,7 +492,7 @@ def get_orgs_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['zap_trace_span', 'org', 'org_id'] # noqa: E501 + all_params = ['zap_trace_span', 'org', 'org_id', 'user_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -514,6 +516,8 @@ def get_orgs_with_http_info(self, **kwargs): # noqa: E501 query_params.append(('org', local_var_params['org'])) # noqa: E501 if 'org_id' in local_var_params: query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 + if 'user_id' in local_var_params: + query_params.append(('userID', local_var_params['user_id'])) # noqa: E501 header_params = {} if 'zap_trace_span' in local_var_params: @@ -742,118 +746,6 @@ def get_orgs_id_labels_with_http_info(self, org_id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_orgs_id_logs(self, org_id, **kwargs): # noqa: E501 - """Retrieve operation logs for an organization # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_orgs_id_logs(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :return: OperationLogs - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_orgs_id_logs_with_http_info(org_id, **kwargs) # noqa: E501 - else: - (data) = self.get_orgs_id_logs_with_http_info(org_id, **kwargs) # noqa: E501 - return data - - def get_orgs_id_logs_with_http_info(self, org_id, **kwargs): # noqa: E501 - """Retrieve operation logs for an organization # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_orgs_id_logs_with_http_info(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :return: OperationLogs - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = ['org_id', 'zap_trace_span', 'offset', 'limit'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - 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 get_orgs_id_logs" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'org_id' is set - if ('org_id' not in local_var_params or - local_var_params['org_id'] is None): - raise ValueError("Missing the required parameter `org_id` when calling `get_orgs_id_logs`") # noqa: E501 - - if 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ValueError("Invalid value for parameter `offset` when calling `get_orgs_id_logs`, must be a value greater than or equal to `0`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_orgs_id_logs`, must be a value less than or equal to `100`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_orgs_id_logs`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'org_id' in local_var_params: - path_params['orgID'] = local_var_params['org_id'] # noqa: E501 - - query_params = [] - if 'offset' in local_var_params: - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'limit' in local_var_params: - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}/logs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OperationLogs', # 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) - def get_orgs_id_members(self, org_id, **kwargs): # noqa: E501 """List all members of an organization # noqa: E501 diff --git a/influxdb_client/service/setup_service.py b/influxdb_client/service/setup_service.py index b7115fc7..11a001d2 100644 --- a/influxdb_client/service/setup_service.py +++ b/influxdb_client/service/setup_service.py @@ -227,3 +227,107 @@ def post_setup_with_http_info(self, onboarding_request, **kwargs): # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + + def post_setup_user(self, onboarding_request, **kwargs): # noqa: E501 + """Set up a new user, org and bucket # noqa: E501 + + Post an onboarding request to set up a new user, org and bucket. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_setup_user(onboarding_request, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param OnboardingRequest onboarding_request: Source to create (required) + :param str zap_trace_span: OpenTracing span context + :return: OnboardingResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.post_setup_user_with_http_info(onboarding_request, **kwargs) # noqa: E501 + else: + (data) = self.post_setup_user_with_http_info(onboarding_request, **kwargs) # noqa: E501 + return data + + def post_setup_user_with_http_info(self, onboarding_request, **kwargs): # noqa: E501 + """Set up a new user, org and bucket # noqa: E501 + + Post an onboarding request to set up a new user, org and bucket. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_setup_user_with_http_info(onboarding_request, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param OnboardingRequest onboarding_request: Source to create (required) + :param str zap_trace_span: OpenTracing span context + :return: OnboardingResponse + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['onboarding_request', 'zap_trace_span'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + 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 post_setup_user" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'onboarding_request' is set + if ('onboarding_request' not in local_var_params or + local_var_params['onboarding_request'] is None): + raise ValueError("Missing the required parameter `onboarding_request` when calling `post_setup_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + if 'zap_trace_span' in local_var_params: + header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'onboarding_request' in local_var_params: + body_params = local_var_params['onboarding_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/setup/user', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OnboardingResponse', # 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) diff --git a/influxdb_client/service/tasks_service.py b/influxdb_client/service/tasks_service.py index 559bd0f6..cd5834e8 100644 --- a/influxdb_client/service/tasks_service.py +++ b/influxdb_client/service/tasks_service.py @@ -571,6 +571,7 @@ def get_tasks(self, **kwargs): # noqa: E501 :param str user: Filter tasks to a specific user ID. :param str org: Filter tasks to a specific organization name. :param str org_id: Filter tasks to a specific organization ID. + :param str status: Filter tasks by a status--\"inactive\" or \"active\". :param int limit: The number of tasks to return :return: Tasks If the method is called asynchronously, @@ -598,6 +599,7 @@ def get_tasks_with_http_info(self, **kwargs): # noqa: E501 :param str user: Filter tasks to a specific user ID. :param str org: Filter tasks to a specific organization name. :param str org_id: Filter tasks to a specific organization ID. + :param str status: Filter tasks by a status--\"inactive\" or \"active\". :param int limit: The number of tasks to return :return: Tasks If the method is called asynchronously, @@ -606,7 +608,7 @@ def get_tasks_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['zap_trace_span', 'name', 'after', 'user', 'org', 'org_id', 'limit'] # noqa: E501 + all_params = ['zap_trace_span', 'name', 'after', 'user', 'org', 'org_id', 'status', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -640,6 +642,8 @@ def get_tasks_with_http_info(self, **kwargs): # noqa: E501 query_params.append(('org', local_var_params['org'])) # noqa: E501 if 'org_id' in local_var_params: query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 + if 'status' in local_var_params: + query_params.append(('status', local_var_params['status'])) # noqa: E501 if 'limit' in local_var_params: query_params.append(('limit', local_var_params['limit'])) # noqa: E501 diff --git a/influxdb_client/service/users_service.py b/influxdb_client/service/users_service.py index 2f7111ad..f3927228 100644 --- a/influxdb_client/service/users_service.py +++ b/influxdb_client/service/users_service.py @@ -2856,118 +2856,6 @@ def get_users_id_with_http_info(self, user_id, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def get_users_id_logs(self, user_id, **kwargs): # noqa: E501 - """Retrieve operation logs for a user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_users_id_logs(user_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The user ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :return: OperationLogs - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_users_id_logs_with_http_info(user_id, **kwargs) # noqa: E501 - else: - (data) = self.get_users_id_logs_with_http_info(user_id, **kwargs) # noqa: E501 - return data - - def get_users_id_logs_with_http_info(self, user_id, **kwargs): # noqa: E501 - """Retrieve operation logs for a user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_users_id_logs_with_http_info(user_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The user ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: - :param int limit: - :return: OperationLogs - If the method is called asynchronously, - returns the request thread. - """ - - local_var_params = locals() - - all_params = ['user_id', 'zap_trace_span', 'offset', 'limit'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - 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 get_users_id_logs" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in local_var_params or - local_var_params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `get_users_id_logs`") # noqa: E501 - - if 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ValueError("Invalid value for parameter `offset` when calling `get_users_id_logs`, must be a value greater than or equal to `0`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_users_id_logs`, must be a value less than or equal to `100`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_users_id_logs`, must be a value greater than or equal to `1`") # noqa: E501 - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['userID'] = local_var_params['user_id'] # noqa: E501 - - query_params = [] - if 'offset' in local_var_params: - query_params.append(('offset', local_var_params['offset'])) # noqa: E501 - if 'limit' in local_var_params: - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/v2/users/{userID}/logs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OperationLogs', # 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) - def patch_users_id(self, user_id, user, **kwargs): # noqa: E501 """Update a user # noqa: E501 @@ -4500,15 +4388,16 @@ def post_users_with_http_info(self, user, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def put_me_password(self, password_reset_body, **kwargs): # noqa: E501 + def post_users_id_password(self, user_id, password_reset_body, **kwargs): # noqa: E501 """Update a password # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_me_password(password_reset_body, async_req=True) + >>> thread = api.post_users_id_password(user_id, password_reset_body, async_req=True) >>> result = thread.get() :param async_req bool + :param str user_id: The user ID. (required) :param PasswordResetBody password_reset_body: New password (required) :param str zap_trace_span: OpenTracing span context :return: None @@ -4517,20 +4406,21 @@ def put_me_password(self, password_reset_body, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.put_me_password_with_http_info(password_reset_body, **kwargs) # noqa: E501 + return self.post_users_id_password_with_http_info(user_id, password_reset_body, **kwargs) # noqa: E501 else: - (data) = self.put_me_password_with_http_info(password_reset_body, **kwargs) # noqa: E501 + (data) = self.post_users_id_password_with_http_info(user_id, password_reset_body, **kwargs) # noqa: E501 return data - def put_me_password_with_http_info(self, password_reset_body, **kwargs): # noqa: E501 + def post_users_id_password_with_http_info(self, user_id, password_reset_body, **kwargs): # noqa: E501 """Update a password # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_me_password_with_http_info(password_reset_body, async_req=True) + >>> thread = api.post_users_id_password_with_http_info(user_id, password_reset_body, async_req=True) >>> result = thread.get() :param async_req bool + :param str user_id: The user ID. (required) :param PasswordResetBody password_reset_body: New password (required) :param str zap_trace_span: OpenTracing span context :return: None @@ -4540,7 +4430,7 @@ def put_me_password_with_http_info(self, password_reset_body, **kwargs): # noqa local_var_params = locals() - all_params = ['password_reset_body', 'zap_trace_span'] # noqa: E501 + all_params = ['user_id', 'password_reset_body', 'zap_trace_span'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -4550,18 +4440,24 @@ def put_me_password_with_http_info(self, password_reset_body, **kwargs): # noqa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method put_me_password" % key + " to method post_users_id_password" % key ) local_var_params[key] = val del local_var_params['kwargs'] + # verify the required parameter 'user_id' is set + if ('user_id' not in local_var_params or + local_var_params['user_id'] is None): + raise ValueError("Missing the required parameter `user_id` when calling `post_users_id_password`") # noqa: E501 # verify the required parameter 'password_reset_body' is set if ('password_reset_body' not in local_var_params or local_var_params['password_reset_body'] is None): - raise ValueError("Missing the required parameter `password_reset_body` when calling `put_me_password`") # noqa: E501 + raise ValueError("Missing the required parameter `password_reset_body` when calling `post_users_id_password`") # noqa: E501 collection_formats = {} path_params = {} + if 'user_id' in local_var_params: + path_params['userID'] = local_var_params['user_id'] # noqa: E501 query_params = [] @@ -4587,7 +4483,7 @@ def put_me_password_with_http_info(self, password_reset_body, **kwargs): # noqa auth_settings = ['BasicAuth'] # noqa: E501 return self.api_client.call_api( - '/api/v2/me/password', 'PUT', + '/api/v2/users/{userID}/password', 'POST', path_params, query_params, header_params, @@ -4602,16 +4498,15 @@ def put_me_password_with_http_info(self, password_reset_body, **kwargs): # noqa _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def put_users_id_password(self, user_id, password_reset_body, **kwargs): # noqa: E501 + def put_me_password(self, password_reset_body, **kwargs): # noqa: E501 """Update a password # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_users_id_password(user_id, password_reset_body, async_req=True) + >>> thread = api.put_me_password(password_reset_body, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The user ID. (required) :param PasswordResetBody password_reset_body: New password (required) :param str zap_trace_span: OpenTracing span context :return: None @@ -4620,21 +4515,20 @@ def put_users_id_password(self, user_id, password_reset_body, **kwargs): # noqa """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.put_users_id_password_with_http_info(user_id, password_reset_body, **kwargs) # noqa: E501 + return self.put_me_password_with_http_info(password_reset_body, **kwargs) # noqa: E501 else: - (data) = self.put_users_id_password_with_http_info(user_id, password_reset_body, **kwargs) # noqa: E501 + (data) = self.put_me_password_with_http_info(password_reset_body, **kwargs) # noqa: E501 return data - def put_users_id_password_with_http_info(self, user_id, password_reset_body, **kwargs): # noqa: E501 + def put_me_password_with_http_info(self, password_reset_body, **kwargs): # noqa: E501 """Update a password # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_users_id_password_with_http_info(user_id, password_reset_body, async_req=True) + >>> thread = api.put_me_password_with_http_info(password_reset_body, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The user ID. (required) :param PasswordResetBody password_reset_body: New password (required) :param str zap_trace_span: OpenTracing span context :return: None @@ -4644,7 +4538,7 @@ def put_users_id_password_with_http_info(self, user_id, password_reset_body, **k local_var_params = locals() - all_params = ['user_id', 'password_reset_body', 'zap_trace_span'] # noqa: E501 + all_params = ['password_reset_body', 'zap_trace_span'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -4654,24 +4548,18 @@ def put_users_id_password_with_http_info(self, user_id, password_reset_body, **k if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method put_users_id_password" % key + " to method put_me_password" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in local_var_params or - local_var_params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `put_users_id_password`") # noqa: E501 # verify the required parameter 'password_reset_body' is set if ('password_reset_body' not in local_var_params or local_var_params['password_reset_body'] is None): - raise ValueError("Missing the required parameter `password_reset_body` when calling `put_users_id_password`") # noqa: E501 + raise ValueError("Missing the required parameter `password_reset_body` when calling `put_me_password`") # noqa: E501 collection_formats = {} path_params = {} - if 'user_id' in local_var_params: - path_params['userID'] = local_var_params['user_id'] # noqa: E501 query_params = [] @@ -4697,7 +4585,7 @@ def put_users_id_password_with_http_info(self, user_id, password_reset_body, **k auth_settings = ['BasicAuth'] # noqa: E501 return self.api_client.call_api( - '/api/v2/users/{userID}/password', 'PUT', + '/api/v2/me/password', 'PUT', path_params, query_params, header_params, diff --git a/scripts/swagger.yml b/scripts/swagger.yml index 8805e4d1..0438698c 100644 --- a/scripts/swagger.yml +++ b/scripts/swagger.yml @@ -12,17 +12,17 @@ paths: security: - BasicAuth: [] parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '204': + "204": description: Successfully authenticated - '401': + "401": description: Unauthorized access content: application/json: schema: $ref: "#/components/schemas/Error" - '403': + "403": description: user account is disabled content: application/json: @@ -39,11 +39,11 @@ paths: operationId: PostSignout summary: Expire the current session parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '204': + "204": description: Session successfully expired - '401': + "401": description: Unauthorized access content: application/json: @@ -60,7 +60,7 @@ paths: operationId: GetRoutes summary: Map of all top level routes available parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: default: description: All routes @@ -76,9 +76,9 @@ paths: 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' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': + "200": description: allowed true or false content: @@ -92,7 +92,7 @@ paths: 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' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Source to create required: true @@ -101,19 +101,54 @@ paths: schema: $ref: "#/components/schemas/OnboardingRequest" responses: - '201': + "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' + - $ref: "#/components/parameters/TraceSpan" - in: query name: org description: Specifies the name of the organization of the template. @@ -125,7 +160,7 @@ paths: schema: type: string responses: - '200': + "200": description: A list of template documents content: application/json: @@ -143,7 +178,7 @@ paths: - Templates summary: Create a template parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Template that will be created required: true @@ -152,7 +187,7 @@ paths: schema: $ref: "#/components/schemas/DocumentCreate" responses: - '201': + "201": description: Template created content: application/json: @@ -164,13 +199,13 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/documents/templates/{templateID}': + "/documents/templates/{templateID}": get: operationId: GetDocumentsTemplatesID tags: - Templates parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: templateID schema: @@ -178,7 +213,7 @@ paths: required: true description: The template ID. responses: - '200': + "200": description: The template requested content: application/json: @@ -195,7 +230,7 @@ paths: tags: - Templates parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: templateID schema: @@ -210,7 +245,7 @@ paths: schema: $ref: "#/components/schemas/DocumentUpdate" responses: - '200': + "200": description: The newly updated template content: application/json: @@ -228,7 +263,7 @@ paths: - Templates summary: Delete a template parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: templateID schema: @@ -236,7 +271,7 @@ paths: required: true description: The template ID. responses: - '204': + "204": description: Delete has been accepted default: description: Unexpected error @@ -244,14 +279,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/documents/templates/{templateID}/labels': + "/documents/templates/{templateID}/labels": get: operationId: GetDocumentsTemplatesIDLabels tags: - Templates summary: List all labels for a template parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: templateID schema: @@ -259,7 +294,7 @@ paths: required: true description: The template ID. responses: - '200': + "200": description: A list of all labels for a template content: application/json: @@ -277,7 +312,7 @@ paths: - Templates summary: Add a label to a template parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: templateID schema: @@ -292,7 +327,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The label added to the template content: application/json: @@ -304,14 +339,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/documents/templates/{templateID}/labels/{labelID}': + "/documents/templates/{templateID}/labels/{labelID}": delete: operationId: DeleteDocumentsTemplatesIDLabelsID tags: - Templates summary: Delete a label from a template parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: templateID schema: @@ -325,9 +360,9 @@ paths: required: true description: The label ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Template not found content: application/json: @@ -339,20 +374,235 @@ paths: 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' + - $ref: "#/components/parameters/TraceSpan" - in: query name: orgID description: The organization ID the Telegraf config belongs to. schema: type: string responses: - '200': + "200": description: A list of Telegraf configs content: application/json: @@ -370,7 +620,7 @@ paths: - Telegrafs summary: Create a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Telegraf config to create required: true @@ -379,7 +629,7 @@ paths: schema: $ref: "#/components/schemas/TelegrafRequest" responses: - '201': + "201": description: Telegraf config created content: application/json: @@ -391,14 +641,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}': + "/telegrafs/{telegrafID}": get: operationId: GetTelegrafsID tags: - Telegrafs summary: Retrieve a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -416,7 +666,7 @@ paths: - application/json - application/octet-stream responses: - '200': + "200": description: Telegraf config details content: application/toml: @@ -442,7 +692,7 @@ paths: - Telegrafs summary: Update a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -457,7 +707,7 @@ paths: schema: $ref: "#/components/schemas/TelegrafRequest" responses: - '200': + "200": description: An updated Telegraf config content: application/json: @@ -475,7 +725,7 @@ paths: - Telegrafs summary: Delete a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -483,7 +733,7 @@ paths: required: true description: The Telegraf config ID. responses: - '204': + "204": description: Delete has been accepted default: description: Unexpected error @@ -491,14 +741,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}/labels': + "/telegrafs/{telegrafID}/labels": get: operationId: GetTelegrafsIDLabels tags: - Telegrafs summary: List all labels for a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -506,7 +756,7 @@ paths: required: true description: The Telegraf config ID. responses: - '200': + "200": description: A list of all labels for a Telegraf config content: application/json: @@ -524,7 +774,7 @@ paths: - Telegrafs summary: Add a label to a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -539,7 +789,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The label added to the Telegraf config content: application/json: @@ -551,14 +801,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}/labels/{labelID}': + "/telegrafs/{telegrafID}/labels/{labelID}": delete: operationId: DeleteTelegrafsIDLabelsID tags: - Telegrafs summary: Delete a label from a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -572,9 +822,9 @@ paths: required: true description: The label ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Telegraf config not found content: application/json: @@ -586,7 +836,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}/members': + "/telegrafs/{telegrafID}/members": get: operationId: GetTelegrafsIDMembers tags: @@ -594,7 +844,7 @@ paths: - Telegrafs summary: List all users with member privileges for a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -602,7 +852,7 @@ paths: required: true description: The Telegraf config ID. responses: - '200': + "200": description: A list of Telegraf config members content: application/json: @@ -621,7 +871,7 @@ paths: - Telegrafs summary: Add a member to a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -636,7 +886,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Member added to Telegraf config content: application/json: @@ -648,7 +898,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}/members/{userID}': + "/telegrafs/{telegrafID}/members/{userID}": delete: operationId: DeleteTelegrafsIDMembersID tags: @@ -656,7 +906,7 @@ paths: - Telegrafs summary: Remove a member from a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -670,7 +920,7 @@ paths: required: true description: The Telegraf config ID. responses: - '204': + "204": description: Member removed default: description: Unexpected error @@ -678,7 +928,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}/owners': + "/telegrafs/{telegrafID}/owners": get: operationId: GetTelegrafsIDOwners tags: @@ -686,7 +936,7 @@ paths: - Telegrafs summary: List all owners of a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -694,7 +944,7 @@ paths: required: true description: The Telegraf config ID. responses: - '200': + "200": description: A list of Telegraf config owners content: application/json: @@ -713,7 +963,7 @@ paths: - Telegrafs summary: Add an owner to a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: telegrafID schema: @@ -728,7 +978,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Telegraf config owner added content: application/json: @@ -740,7 +990,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/telegrafs/{telegrafID}/owners/{userID}': + "/telegrafs/{telegrafID}/owners/{userID}": delete: operationId: DeleteTelegrafsIDOwnersID tags: @@ -748,7 +998,7 @@ paths: - Telegrafs summary: Remove an owner from a Telegraf config parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -762,7 +1012,7 @@ paths: required: true description: The Telegraf config ID. responses: - '204': + "204": description: Owner removed default: description: Unexpected error @@ -777,7 +1027,7 @@ paths: - ScraperTargets summary: Get all scraper targets parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: name description: Specifies the name of the scraper target. @@ -801,7 +1051,7 @@ paths: schema: type: string responses: - '200': + "200": description: All scraper targets content: application/json: @@ -813,7 +1063,7 @@ paths: tags: - ScraperTargets parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Scraper target to create required: true @@ -822,7 +1072,7 @@ paths: schema: $ref: "#/components/schemas/ScraperTargetRequest" responses: - '201': + "201": description: Scraper target created content: application/json: @@ -834,14 +1084,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}': + "/scrapers/{scraperTargetID}": get: operationId: GetScrapersID tags: - ScraperTargets summary: Get a scraper target by ID parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID required: true @@ -849,7 +1099,7 @@ paths: type: string description: The scraper target ID. responses: - '200': + "200": description: Scraper target updated content: application/json: @@ -867,7 +1117,7 @@ paths: - ScraperTargets summary: Delete a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID required: true @@ -875,7 +1125,7 @@ paths: type: string description: The scraper target ID. responses: - '204': + "204": description: Scraper target deleted default: description: Internal server error @@ -889,7 +1139,7 @@ paths: tags: - ScraperTargets parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID required: true @@ -904,7 +1154,7 @@ paths: schema: $ref: "#/components/schemas/ScraperTargetRequest" responses: - '200': + "200": description: Scraper target updated content: application/json: @@ -916,14 +1166,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}/labels': + "/scrapers/{scraperTargetID}/labels": get: operationId: GetScrapersIDLabels tags: - ScraperTargets summary: List all labels for a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -931,7 +1181,7 @@ paths: required: true description: The scraper target ID. responses: - '200': + "200": description: A list of all labels for a scraper target content: application/json: @@ -949,7 +1199,7 @@ paths: - ScraperTargets summary: Add a label to a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -964,7 +1214,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The newly added label content: application/json: @@ -976,14 +1226,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}/labels/{labelID}': + "/scrapers/{scraperTargetID}/labels/{labelID}": delete: operationId: DeleteScrapersIDLabelsID tags: - ScraperTargets summary: Delete a label from a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -997,9 +1247,9 @@ paths: required: true description: The label ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Scraper target not found content: application/json: @@ -1017,7 +1267,7 @@ paths: - ScraperTargets summary: Update a label on a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -1038,9 +1288,9 @@ paths: schema: $ref: "#/components/schemas/Label" responses: - '200': + "200": description: Updated successfully - '404': + "404": description: Scraper target not found content: application/json: @@ -1052,7 +1302,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}/members': + "/scrapers/{scraperTargetID}/members": get: operationId: GetScrapersIDMembers tags: @@ -1060,7 +1310,7 @@ paths: - ScraperTargets summary: List all users with member privileges for a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -1068,7 +1318,7 @@ paths: required: true description: The scraper target ID. responses: - '200': + "200": description: A list of scraper target members content: application/json: @@ -1087,7 +1337,7 @@ paths: - ScraperTargets summary: Add a member to a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -1102,7 +1352,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Member added to scraper targets content: application/json: @@ -1114,7 +1364,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}/members/{userID}': + "/scrapers/{scraperTargetID}/members/{userID}": delete: operationId: DeleteScrapersIDMembersID tags: @@ -1122,7 +1372,7 @@ paths: - ScraperTargets summary: Remove a member from a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -1136,7 +1386,7 @@ paths: required: true description: The scraper target ID. responses: - '204': + "204": description: Member removed default: description: Unexpected error @@ -1144,7 +1394,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}/owners': + "/scrapers/{scraperTargetID}/owners": get: operationId: GetScrapersIDOwners tags: @@ -1152,7 +1402,7 @@ paths: - ScraperTargets summary: List all owners of a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -1160,7 +1410,7 @@ paths: required: true description: The scraper target ID. responses: - '200': + "200": description: A list of scraper target owners content: application/json: @@ -1179,7 +1429,7 @@ paths: - ScraperTargets summary: Add an owner to a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: scraperTargetID schema: @@ -1194,7 +1444,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Scraper target owner added content: application/json: @@ -1206,7 +1456,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/scrapers/{scraperTargetID}/owners/{userID}': + "/scrapers/{scraperTargetID}/owners/{userID}": delete: operationId: DeleteScrapersIDOwnersID tags: @@ -1214,7 +1464,7 @@ paths: - ScraperTargets summary: Remove an owner from a scraper target parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -1228,7 +1478,7 @@ paths: required: true description: The scraper target ID. responses: - '204': + "204": description: Owner removed default: description: Unexpected error @@ -1243,7 +1493,7 @@ paths: - Variables summary: Get all variables parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: org description: The organization name. @@ -1255,13 +1505,13 @@ paths: schema: type: string responses: - '200': + "200": description: All variables for an organization content: application/json: schema: $ref: "#/components/schemas/Variables" - '400': + "400": description: Invalid request content: application/json: @@ -1279,7 +1529,7 @@ paths: tags: - Variables parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Variable to create required: true @@ -1288,7 +1538,7 @@ paths: schema: $ref: "#/components/schemas/Variable" responses: - '201': + "201": description: Variable created content: application/json: @@ -1300,14 +1550,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/variables/{variableID}': + "/variables/{variableID}": get: operationId: GetVariablesID tags: - Variables summary: Get a variable parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID required: true @@ -1315,13 +1565,13 @@ paths: type: string description: The variable ID. responses: - '200': + "200": description: Variable found content: application/json: schema: $ref: "#/components/schemas/Variable" - '404': + "404": description: Variable not found content: application/json: @@ -1339,7 +1589,7 @@ paths: - Variables summary: Delete a variable parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID required: true @@ -1347,7 +1597,7 @@ paths: type: string description: The variable ID. responses: - '204': + "204": description: Variable deleted default: description: Internal server error @@ -1361,7 +1611,7 @@ paths: tags: - Variables parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID required: true @@ -1376,7 +1626,7 @@ paths: schema: $ref: "#/components/schemas/Variable" responses: - '200': + "200": description: Variable updated content: application/json: @@ -1394,7 +1644,7 @@ paths: tags: - Variables parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID required: true @@ -1409,7 +1659,7 @@ paths: schema: $ref: "#/components/schemas/Variable" responses: - '200': + "200": description: Variable updated content: application/json: @@ -1421,14 +1671,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/variables/{variableID}/labels': + "/variables/{variableID}/labels": get: operationId: GetVariablesIDLabels tags: - Variables summary: List all labels for a variable parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID schema: @@ -1436,7 +1686,7 @@ paths: required: true description: The variable ID. responses: - '200': + "200": description: A list of all labels for a variable content: application/json: @@ -1454,7 +1704,7 @@ paths: - Variables summary: Add a label to a variable parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID schema: @@ -1469,7 +1719,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The newly added label content: application/json: @@ -1481,14 +1731,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/variables/{variableID}/labels/{labelID}': + "/variables/{variableID}/labels/{labelID}": delete: operationId: DeleteVariablesIDLabelsID tags: - Variables summary: Delete a label from a variable parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: variableID schema: @@ -1502,9 +1752,9 @@ paths: required: true description: The label ID to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Variable not found content: application/json: @@ -1530,7 +1780,7 @@ paths: schema: type: string parameters: - - $ref: '#/components/parameters/TraceSpan' + - $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. @@ -1592,33 +1842,33 @@ paths: schema: $ref: "#/components/schemas/WritePrecision" responses: - '204': + "204": description: Write data is correctly formatted and accepted for writing to the bucket. - '400': + "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': + "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': + "403": description: No token was sent and they are required. content: application/json: schema: $ref: "#/components/schemas/Error" - '413': + "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': + "429": description: Token is temporarily over quota. The Retry-After header describes when to try the write again. headers: Retry-After: @@ -1626,7 +1876,7 @@ paths: schema: type: integer format: int32 - '503': + "503": description: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again. headers: Retry-After: @@ -1651,7 +1901,7 @@ paths: schema: $ref: "#/components/schemas/DeletePredicateRequest" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: org description: Specifies the organization to delete data from. @@ -1676,21 +1926,21 @@ paths: type: string description: Only points from this bucket ID are deleted. responses: - '204': + "204": description: delete has been accepted - '400': + "400": description: invalid request. content: application/json: schema: $ref: "#/components/schemas/Error" - '404': + "404": description: the bucket or organization is not found. content: application/json: schema: $ref: "#/components/schemas/Error" - '403': + "403": description: no token was sent or does not have sufficient permissions. content: application/json: @@ -1711,9 +1961,9 @@ paths: - Ready summary: Get the readiness of an instance at startup parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': + "200": description: The instance is ready content: application/json: @@ -1734,15 +1984,15 @@ paths: - Health summary: Get the health of an instance parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': + "200": description: The instance is healthy content: application/json: schema: $ref: "#/components/schemas/HealthCheck" - '503': + "503": description: The instance is unhealthy content: application/json: @@ -1761,7 +2011,7 @@ paths: - Sources summary: Creates a source parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Source to create required: true @@ -1770,7 +2020,7 @@ paths: schema: $ref: "#/components/schemas/Source" responses: - '201': + "201": description: Created Source content: application/json: @@ -1788,14 +2038,14 @@ paths: - Sources summary: Get all sources parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: org description: The organization name. schema: type: string responses: - '200': + "200": description: All sources content: application/json: @@ -1814,7 +2064,7 @@ paths: - Sources summary: Delete a source parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: sourceID schema: @@ -1822,9 +2072,9 @@ paths: required: true description: The source ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: View not found content: application/json: @@ -1842,7 +2092,7 @@ paths: - Sources summary: Update a Source parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: sourceID schema: @@ -1857,13 +2107,13 @@ paths: schema: $ref: "#/components/schemas/Source" responses: - '200': + "200": description: Created Source content: application/json: schema: $ref: "#/components/schemas/Source" - '404': + "404": description: Source not found content: application/json: @@ -1881,7 +2131,7 @@ paths: - Sources summary: Get a source parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: sourceID schema: @@ -1889,13 +2139,13 @@ paths: required: true description: The source ID. responses: - '200': + "200": description: A source content: application/json: schema: $ref: "#/components/schemas/Source" - '404': + "404": description: Source not found content: application/json: @@ -1914,7 +2164,7 @@ paths: - Sources summary: Get the health of a source parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: sourceID schema: @@ -1922,13 +2172,13 @@ paths: required: true description: The source ID. responses: - '200': + "200": description: The source is healthy content: application/json: schema: $ref: "#/components/schemas/HealthCheck" - '503': + "503": description: The source is not healthy content: application/json: @@ -1948,7 +2198,7 @@ paths: - Buckets summary: Get buckets in a source parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: sourceID schema: @@ -1961,13 +2211,13 @@ paths: schema: type: string responses: - '200': + "200": description: A source content: application/json: schema: $ref: "#/components/schemas/Buckets" - '404': + "404": description: Source not found content: application/json: @@ -1993,7 +2243,7 @@ paths: schema: $ref: "#/components/schemas/LabelCreateRequest" responses: - '201': + "201": description: Added label content: application/json: @@ -2011,14 +2261,14 @@ paths: - Labels summary: Get all labels parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: orgID description: The organization ID. schema: type: string responses: - '200': + "200": description: All labels content: application/json: @@ -2037,7 +2287,7 @@ paths: - Labels summary: Get a label parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: labelID schema: @@ -2045,7 +2295,7 @@ paths: required: true description: The ID of the label to update. responses: - '200': + "200": description: A label content: application/json: @@ -2070,7 +2320,7 @@ paths: schema: $ref: "#/components/schemas/LabelUpdate" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: labelID schema: @@ -2078,13 +2328,13 @@ paths: required: true description: The ID of the label to update. responses: - '200': + "200": description: Updated label content: application/json: schema: $ref: "#/components/schemas/LabelResponse" - '404': + "404": description: Label not found content: application/json: @@ -2102,7 +2352,7 @@ paths: - Labels summary: Delete a label parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: labelID schema: @@ -2110,9 +2360,9 @@ paths: required: true description: The ID of the label to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Label not found content: application/json: @@ -2131,7 +2381,7 @@ paths: - Dashboards summary: Create a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Dashboard to create required: true @@ -2140,7 +2390,7 @@ paths: schema: $ref: "#/components/schemas/CreateDashboardRequest" responses: - '201': + "201": description: Added dashboard content: application/json: @@ -2158,7 +2408,7 @@ paths: - Dashboards summary: Get all dashboards parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: owner description: The owner ID. @@ -2191,7 +2441,7 @@ paths: schema: type: string responses: - '200': + "200": description: All dashboards content: application/json: @@ -2203,28 +2453,36 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}': + "/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. + - $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': + "200": description: Get a single dashboard content: application/json: schema: $ref: "#/components/schemas/Dashboard" - '404': + "404": description: Dashboard not found content: application/json: @@ -2249,7 +2507,7 @@ paths: schema: $ref: "#/components/schemas/Dashboard" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2257,13 +2515,13 @@ paths: required: true description: The ID of the dashboard to update. responses: - '200': + "200": description: Updated dashboard content: application/json: schema: $ref: "#/components/schemas/Dashboard" - '404': + "404": description: Dashboard not found content: application/json: @@ -2281,7 +2539,7 @@ paths: - Dashboards summary: Delete a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2289,9 +2547,9 @@ paths: required: true description: The ID of the dashboard to update. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Dashboard not found content: application/json: @@ -2303,7 +2561,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/cells': + "/dashboards/{dashboardID}/cells": put: operationId: PutDashboardsIDCells tags: @@ -2318,7 +2576,7 @@ paths: schema: $ref: "#/components/schemas/Cells" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2326,13 +2584,13 @@ paths: required: true description: The ID of the dashboard to update. responses: - '200': + "201": description: Replaced dashboard cells content: application/json: schema: $ref: "#/components/schemas/Dashboard" - '404': + "404": description: Dashboard not found content: application/json: @@ -2358,7 +2616,7 @@ paths: schema: $ref: "#/components/schemas/CreateCell" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2366,13 +2624,13 @@ paths: required: true description: The ID of the dashboard to update. responses: - '201': + "201": description: Cell successfully added content: application/json: schema: $ref: "#/components/schemas/Cell" - '404': + "404": description: Dashboard not found content: application/json: @@ -2384,7 +2642,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/cells/{cellID}': + "/dashboards/{dashboardID}/cells/{cellID}": patch: operationId: PatchDashboardsIDCellsID tags: @@ -2399,7 +2657,7 @@ paths: schema: $ref: "#/components/schemas/CellUpdate" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2413,13 +2671,13 @@ paths: required: true description: The ID of the cell to update. responses: - '200': + "200": description: Updated dashboard cell content: application/json: schema: $ref: "#/components/schemas/Cell" - '404': + "404": description: Cell or dashboard not found content: application/json: @@ -2438,7 +2696,7 @@ paths: - Dashboards summary: Delete a dashboard cell parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2452,9 +2710,9 @@ paths: required: true description: The ID of the cell to delete. responses: - '204': + "204": description: Cell successfully deleted - '404': + "404": description: Cell or dashboard not found content: application/json: @@ -2466,7 +2724,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/cells/{cellID}/view': + "/dashboards/{dashboardID}/cells/{cellID}/view": get: operationId: GetDashboardsIDCellsIDView tags: @@ -2475,7 +2733,7 @@ paths: - Views summary: Retrieve the view for a cell parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2489,13 +2747,13 @@ paths: required: true description: The cell ID. responses: - '200': + "200": description: A dashboard cells view content: application/json: schema: $ref: "#/components/schemas/View" - '404': + "404": description: Cell or dashboard not found content: application/json: @@ -2521,7 +2779,7 @@ paths: schema: $ref: "#/components/schemas/View" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2535,13 +2793,13 @@ paths: required: true description: The ID of the cell to update. responses: - '200': + "200": description: Updated cell view content: application/json: schema: $ref: "#/components/schemas/View" - '404': + "404": description: Cell or dashboard not found content: application/json: @@ -2553,14 +2811,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/labels': + "/dashboards/{dashboardID}/labels": get: operationId: GetDashboardsIDLabels tags: - Dashboards summary: list all labels for a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2568,7 +2826,7 @@ paths: required: true description: The dashboard ID. responses: - '200': + "200": description: A list of all labels for a dashboard content: application/json: @@ -2586,7 +2844,7 @@ paths: - Dashboards summary: Add a label to a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2601,7 +2859,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The label added to the dashboard content: application/json: @@ -2613,14 +2871,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/labels/{labelID}': + "/dashboards/{dashboardID}/labels/{labelID}": delete: operationId: DeleteDashboardsIDLabelsID tags: - Dashboards summary: Delete a label from a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2634,9 +2892,9 @@ paths: required: true description: The ID of the label to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Dashboard not found content: application/json: @@ -2648,7 +2906,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/members': + "/dashboards/{dashboardID}/members": get: operationId: GetDashboardsIDMembers tags: @@ -2656,7 +2914,7 @@ paths: - Dashboards summary: List all dashboard members parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2664,7 +2922,7 @@ paths: required: true description: The dashboard ID. responses: - '200': + "200": description: A list of users who have member privileges for a dashboard content: application/json: @@ -2683,7 +2941,7 @@ paths: - Dashboards summary: Add a member to a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2698,7 +2956,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Added to dashboard members content: application/json: @@ -2710,7 +2968,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/members/{userID}': + "/dashboards/{dashboardID}/members/{userID}": delete: operationId: DeleteDashboardsIDMembersID tags: @@ -2718,7 +2976,7 @@ paths: - Dashboards summary: Remove a member from a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -2732,7 +2990,7 @@ paths: required: true description: The dashboard ID. responses: - '204': + "204": description: Member removed default: description: Unexpected error @@ -2740,7 +2998,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/owners': + "/dashboards/{dashboardID}/owners": get: operationId: GetDashboardsIDOwners tags: @@ -2748,7 +3006,7 @@ paths: - Dashboards summary: List all dashboard owners parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2756,7 +3014,7 @@ paths: required: true description: The dashboard ID. responses: - '200': + "200": description: A list of users who have owner privileges for a dashboard content: application/json: @@ -2775,7 +3033,7 @@ paths: - Dashboards summary: Add an owner to a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: dashboardID schema: @@ -2790,7 +3048,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Added to dashboard owners content: application/json: @@ -2802,7 +3060,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/owners/{userID}': + "/dashboards/{dashboardID}/owners/{userID}": delete: operationId: DeleteDashboardsIDOwnersID tags: @@ -2810,7 +3068,7 @@ paths: - Dashboards summary: Remove an owner from a dashboard parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -2824,7 +3082,7 @@ paths: required: true description: The dashboard ID. responses: - '204': + "204": description: Owner removed default: description: Unexpected error @@ -2832,36 +3090,6 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/dashboards/{dashboardID}/logs': - get: - operationId: GetDashboardsIDLogs - tags: - - Dashboards - - OperationLogs - summary: Retrieve operation logs for a dashboard - parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' - - in: path - name: dashboardID - required: true - description: The dashboard ID. - schema: - type: string - responses: - '200': - description: Operation logs for the dashboard - content: - application/json: - schema: - $ref: "#/components/schemas/OperationLogs" - default: - description: Unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" /query/ast: post: operationId: PostQueryAst @@ -2869,7 +3097,7 @@ paths: tags: - Query parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: header name: Content-Type schema: @@ -2883,7 +3111,7 @@ paths: schema: $ref: "#/components/schemas/LanguageRequest" responses: - '200': + "200": description: Abstract syntax tree of flux query. content: application/json: @@ -2901,9 +3129,9 @@ paths: tags: - Query parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': + "200": description: Suggestions for next functions in call chain content: application/json: @@ -2915,13 +3143,13 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/query/suggestions/{name}': + "/query/suggestions/{name}": get: operationId: GetQuerySuggestionsName tags: - Query parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: name schema: @@ -2929,7 +3157,7 @@ paths: required: true description: The name of the branching suggestion. responses: - '200': + "200": description: Suggestions for next functions in call chain content: application/json: @@ -2948,7 +3176,7 @@ paths: - Authorizations summary: List all authorizations parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: userID schema: @@ -2970,7 +3198,7 @@ paths: type: string description: Only show authorizations that belong to a organization name. responses: - '200': + "200": description: A list of authorizations content: application/json: @@ -2988,7 +3216,7 @@ paths: - Authorizations summary: Create an authorization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Authorization to create required: true @@ -2997,13 +3225,13 @@ paths: schema: $ref: "#/components/schemas/Authorization" responses: - '201': + "201": description: Authorization created content: application/json: schema: $ref: "#/components/schemas/Authorization" - '400': + "400": description: Invalid request content: application/json: @@ -3022,7 +3250,7 @@ paths: - Authorizations summary: Retrieve an authorization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: authID schema: @@ -3030,7 +3258,7 @@ paths: required: true description: The ID of the authorization to get. responses: - '200': + "200": description: Authorization details content: application/json: @@ -3055,7 +3283,7 @@ paths: schema: $ref: "#/components/schemas/AuthorizationUpdateRequest" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: authID schema: @@ -3063,7 +3291,7 @@ paths: required: true description: The ID of the authorization to update. responses: - '200': + "200": description: The active or inactie authorization content: application/json: @@ -3081,7 +3309,7 @@ paths: - Authorizations summary: Delete a authorization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: authID schema: @@ -3089,7 +3317,7 @@ paths: required: true description: The ID of the authorization to delete. responses: - '204': + "204": description: Authorization deleted default: description: Unexpected error @@ -3104,7 +3332,7 @@ paths: - Query summary: Analyze an InfluxQL or Flux query parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: header name: Content-Type schema: @@ -3118,7 +3346,7 @@ paths: schema: $ref: "#/components/schemas/Query" responses: - '200': + "200": description: Query analyze results. Errors will be empty if the query is valid. content: application/json: @@ -3146,7 +3374,7 @@ paths: - Query summary: Query InfluxDB parameters: - - $ref: '#/components/parameters/TraceSpan' + - $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. @@ -3184,7 +3412,7 @@ paths: schema: type: string responses: - '200': + "200": description: Query results headers: Content-Encoding: @@ -3209,7 +3437,7 @@ paths: schema: type: string format: binary - '429': + "429": description: Token is temporarily over quota. The Retry-After header describes when to try the read again. headers: Retry-After: @@ -3230,7 +3458,7 @@ paths: - Buckets summary: List all buckets parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - $ref: "#/components/parameters/Offset" - $ref: "#/components/parameters/Limit" - in: query @@ -3249,7 +3477,7 @@ paths: schema: type: string responses: - '200': + "200": description: A list of buckets content: application/json: @@ -3267,7 +3495,7 @@ paths: - Buckets summary: Create a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Bucket to create required: true @@ -3276,26 +3504,32 @@ paths: schema: $ref: "#/components/schemas/PostBucketRequest" responses: - '201': + "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}': + "/buckets/{bucketID}": get: operationId: GetBucketsID tags: - Buckets summary: Retrieve a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3303,7 +3537,7 @@ paths: required: true description: The bucket ID. responses: - '200': + "200": description: Bucket details content: application/json: @@ -3328,7 +3562,7 @@ paths: schema: $ref: "#/components/schemas/Bucket" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3336,7 +3570,7 @@ paths: required: true description: The bucket ID. responses: - '200': + "200": description: An updated bucket content: application/json: @@ -3354,7 +3588,7 @@ paths: - Buckets summary: Delete a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3362,9 +3596,9 @@ paths: required: true description: The ID of the bucket to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Bucket not found content: application/json: @@ -3376,14 +3610,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/labels': + "/buckets/{bucketID}/labels": get: operationId: GetBucketsIDLabels tags: - Buckets summary: List all labels for a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3391,7 +3625,7 @@ paths: required: true description: The bucket ID. responses: - '200': + "200": description: A list of all labels for a bucket content: application/json: @@ -3409,7 +3643,7 @@ paths: - Buckets summary: Add a label to a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3424,7 +3658,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The newly added label content: application/json: @@ -3436,14 +3670,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/labels/{labelID}': + "/buckets/{bucketID}/labels/{labelID}": delete: operationId: DeleteBucketsIDLabelsID tags: - Buckets summary: delete a label from a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3457,9 +3691,9 @@ paths: required: true description: The ID of the label to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Bucket not found content: application/json: @@ -3471,7 +3705,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/members': + "/buckets/{bucketID}/members": get: operationId: GetBucketsIDMembers tags: @@ -3479,7 +3713,7 @@ paths: - Buckets summary: List all users with member privileges for a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3487,7 +3721,7 @@ paths: required: true description: The bucket ID. responses: - '200': + "200": description: A list of bucket members content: application/json: @@ -3506,7 +3740,7 @@ paths: - Buckets summary: Add a member to a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3521,7 +3755,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Member added to bucket content: application/json: @@ -3533,7 +3767,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/members/{userID}': + "/buckets/{bucketID}/members/{userID}": delete: operationId: DeleteBucketsIDMembersID tags: @@ -3541,7 +3775,7 @@ paths: - Buckets summary: Remove a member from a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -3555,7 +3789,7 @@ paths: required: true description: The bucket ID. responses: - '204': + "204": description: Member removed default: description: Unexpected error @@ -3563,7 +3797,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/owners': + "/buckets/{bucketID}/owners": get: operationId: GetBucketsIDOwners tags: @@ -3571,7 +3805,7 @@ paths: - Buckets summary: List all owners of a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3579,7 +3813,7 @@ paths: required: true description: The bucket ID. responses: - '200': + "200": description: A list of bucket owners content: application/json: @@ -3598,7 +3832,7 @@ paths: - Buckets summary: Add an owner to a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: bucketID schema: @@ -3613,7 +3847,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Bucket owner added content: application/json: @@ -3625,7 +3859,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/owners/{userID}': + "/buckets/{bucketID}/owners/{userID}": delete: operationId: DeleteBucketsIDOwnersID tags: @@ -3633,7 +3867,7 @@ paths: - Buckets summary: Remove an owner from a bucket parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -3647,7 +3881,7 @@ paths: required: true description: The bucket ID. responses: - '204': + "204": description: Owner removed default: description: Unexpected error @@ -3655,36 +3889,6 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/buckets/{bucketID}/logs': - get: - operationId: GetBucketsIDLogs - tags: - - Buckets - - OperationLogs - summary: Retrieve operation logs for a bucket - parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' - - in: path - name: bucketID - required: true - description: The bucket ID. - schema: - type: string - responses: - '200': - description: Operation logs for the bucket - content: - application/json: - schema: - $ref: "#/components/schemas/OperationLogs" - default: - description: Unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" /orgs: get: operationId: GetOrgs @@ -3692,7 +3896,7 @@ paths: - Organizations summary: List all organizations parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: org schema: @@ -3703,8 +3907,13 @@ paths: 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': + "200": description: A list of organizations content: application/json: @@ -3722,7 +3931,7 @@ paths: - Organizations summary: Create an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Organization to create required: true @@ -3731,7 +3940,7 @@ paths: schema: $ref: "#/components/schemas/Organization" responses: - '201': + "201": description: Organization created content: application/json: @@ -3743,14 +3952,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}': + "/orgs/{orgID}": get: operationId: GetOrgsID tags: - Organizations summary: Retrieve an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3758,7 +3967,7 @@ paths: required: true description: The ID of the organization to get. responses: - '200': + "200": description: Organization details content: application/json: @@ -3783,7 +3992,7 @@ paths: schema: $ref: "#/components/schemas/Organization" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3791,7 +4000,7 @@ paths: required: true description: The ID of the organization to get. responses: - '200': + "200": description: Organization updated content: application/json: @@ -3809,7 +4018,7 @@ paths: - Organizations summary: Delete an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3817,9 +4026,9 @@ paths: required: true description: The ID of the organization to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Organization not found content: application/json: @@ -3831,14 +4040,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/labels': + "/orgs/{orgID}/labels": get: operationId: GetOrgsIDLabels tags: - Organizations summary: List all labels for a organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3846,7 +4055,7 @@ paths: required: true description: The organization ID. responses: - '200': + "200": description: A list of all labels for an organization content: application/json: @@ -3864,7 +4073,7 @@ paths: - Organizations summary: Add a label to an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3879,7 +4088,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: Returns the created label content: application/json: @@ -3891,14 +4100,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/labels/{labelID}': + "/orgs/{orgID}/labels/{labelID}": delete: operationId: DeleteOrgsIDLabelsID tags: - Organizations summary: Delete a label from an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3912,9 +4121,9 @@ paths: required: true description: The label ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Organization not found content: application/json: @@ -3926,7 +4135,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/secrets': + "/orgs/{orgID}/secrets": get: operationId: GetOrgsIDSecrets tags: @@ -3934,7 +4143,7 @@ paths: - Organizations summary: List all secret keys for an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3942,7 +4151,7 @@ paths: required: true description: The organization ID. responses: - '200': + "200": description: A list of all secret keys content: application/json: @@ -3961,7 +4170,7 @@ paths: - Organizations summary: Update secrets in an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -3976,7 +4185,7 @@ paths: schema: $ref: "#/components/schemas/Secrets" responses: - '204': + "204": description: Keys successfully patched default: description: Unexpected error @@ -3984,7 +4193,7 @@ paths: 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 + "/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: @@ -3992,7 +4201,7 @@ paths: - Organizations summary: Delete secrets from an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -4007,7 +4216,7 @@ paths: schema: $ref: "#/components/schemas/SecretKeys" responses: - '204': + "204": description: Keys successfully patched default: description: Unexpected error @@ -4015,7 +4224,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/members': + "/orgs/{orgID}/members": get: operationId: GetOrgsIDMembers tags: @@ -4023,7 +4232,7 @@ paths: - Organizations summary: List all members of an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -4031,13 +4240,13 @@ paths: required: true description: The organization ID. responses: - '200': + "200": description: A list of organization members content: application/json: schema: $ref: "#/components/schemas/ResourceMembers" - '404': + "404": description: Organization not found content: application/json: @@ -4056,7 +4265,7 @@ paths: - Organizations summary: Add a member to an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -4071,7 +4280,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Added to organization created content: application/json: @@ -4083,7 +4292,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/members/{userID}': + "/orgs/{orgID}/members/{userID}": delete: operationId: DeleteOrgsIDMembersID tags: @@ -4091,7 +4300,7 @@ paths: - Organizations summary: Remove a member from an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -4105,7 +4314,7 @@ paths: required: true description: The organization ID. responses: - '204': + "204": description: Member removed default: description: Unexpected error @@ -4113,7 +4322,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/owners': + "/orgs/{orgID}/owners": get: operationId: GetOrgsIDOwners tags: @@ -4121,7 +4330,7 @@ paths: - Organizations summary: List all owners of an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -4129,13 +4338,13 @@ paths: required: true description: The organization ID. responses: - '200': + "200": description: A list of organization owners content: application/json: schema: $ref: "#/components/schemas/ResourceOwners" - '404': + "404": description: Organization not found content: application/json: @@ -4154,7 +4363,7 @@ paths: - Organizations summary: Add an owner to an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: orgID schema: @@ -4169,7 +4378,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Organization owner added content: application/json: @@ -4181,7 +4390,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/owners/{userID}': + "/orgs/{orgID}/owners/{userID}": delete: operationId: DeleteOrgsIDOwnersID tags: @@ -4189,7 +4398,7 @@ paths: - Organizations summary: Remove an owner from an organization parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -4203,7 +4412,7 @@ paths: required: true description: The organization ID. responses: - '204': + "204": description: Owner removed default: description: Unexpected error @@ -4211,36 +4420,6 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/orgs/{orgID}/logs': - get: - operationId: GetOrgsIDLogs - tags: - - Organizations - - OperationLogs - summary: Retrieve operation logs for an organization - parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' - - in: path - name: orgID - required: true - description: The organization ID. - schema: - type: string - responses: - '200': - description: Operation logs for the organization - content: - application/json: - schema: - $ref: "#/components/schemas/OperationLogs" - default: - description: Unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" /packages: post: operationId: CreatePkg @@ -4255,7 +4434,7 @@ paths: schema: $ref: "#/components/schemas/PkgCreate" responses: - '200': + "200": description: Influx package created content: application/json: @@ -4283,7 +4462,7 @@ paths: schema: $ref: "#/components/schemas/PkgApply" responses: - '200': + "200": description: > Influx package dry-run successful, no new resources created. The provided diff and summary will not have IDs for resources @@ -4292,7 +4471,7 @@ paths: application/json: schema: $ref: "#/components/schemas/PkgSummary" - '201': + "201": description: > Influx package applied successfully. Newly created resources created available in summary. The diff compares the state of the world before @@ -4315,7 +4494,7 @@ paths: - Tasks summary: List all tasks parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: query name: name description: Returns task with a specific name. @@ -4341,6 +4520,14 @@ paths: 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: @@ -4350,7 +4537,7 @@ paths: default: 100 description: The number of tasks to return responses: - '200': + "200": description: A list of tasks content: application/json: @@ -4368,7 +4555,7 @@ paths: - Tasks summary: Create a new task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: Task to create required: true @@ -4377,7 +4564,7 @@ paths: schema: $ref: "#/components/schemas/TaskCreateRequest" responses: - '201': + "201": description: Task created content: application/json: @@ -4389,14 +4576,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}': + "/tasks/{taskID}": get: operationId: GetTasksID tags: - Tasks summary: Retrieve a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4404,7 +4591,7 @@ paths: required: true description: The task ID. responses: - '200': + "200": description: Task details content: application/json: @@ -4430,7 +4617,7 @@ paths: schema: $ref: "#/components/schemas/TaskUpdateRequest" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4438,7 +4625,7 @@ paths: required: true description: The task ID. responses: - '200': + "200": description: Task updated content: application/json: @@ -4457,7 +4644,7 @@ paths: summary: Delete a task description: Deletes a task and all associated records parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4465,7 +4652,7 @@ paths: required: true description: The ID of the task to delete. responses: - '204': + "204": description: Task deleted default: description: Unexpected error @@ -4473,14 +4660,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/runs': + "/tasks/{taskID}/runs": get: operationId: GetTasksIDRuns tags: - Tasks summary: List runs for a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4513,7 +4700,7 @@ paths: format: date-time description: Filter runs to those scheduled before this time, RFC3339 responses: - '200': + "200": description: A list of task runs content: application/json: @@ -4531,7 +4718,7 @@ paths: - Tasks summary: Manually start a task run, overriding the current schedule parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4543,7 +4730,7 @@ paths: schema: $ref: "#/components/schemas/RunManually" responses: - '201': + "201": description: Run scheduled to start content: application/json: @@ -4555,14 +4742,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/runs/{runID}': + "/tasks/{taskID}/runs/{runID}": get: operationId: GetTasksIDRunsID tags: - Tasks summary: Retrieve a single run for a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4576,7 +4763,7 @@ paths: required: true description: The run ID. responses: - '200': + "200": description: The run record content: application/json: @@ -4594,7 +4781,7 @@ paths: - Tasks summary: Cancel a running task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4608,7 +4795,7 @@ paths: required: true description: The run ID. responses: - '204': + "204": description: Delete has been accepted default: description: Unexpected error @@ -4616,14 +4803,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/runs/{runID}/retry': + "/tasks/{taskID}/runs/{runID}/retry": post: operationId: PostTasksIDRunsIDRetry tags: - Tasks summary: Retry a task run parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4637,7 +4824,7 @@ paths: required: true description: The run ID. responses: - '200': + "200": description: Run that has been queued content: application/json: @@ -4649,14 +4836,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/logs': + "/tasks/{taskID}/logs": get: operationId: GetTasksIDLogs tags: - Tasks summary: Retrieve all logs for a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4664,7 +4851,7 @@ paths: required: true description: The task ID. responses: - '200': + "200": description: All logs for a task content: application/json: @@ -4676,14 +4863,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/runs/{runID}/logs': + "/tasks/{taskID}/runs/{runID}/logs": get: operationId: GetTasksIDRunsIDLogs tags: - Tasks summary: Retrieve all logs for a run parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4697,7 +4884,7 @@ paths: required: true description: ID of run to get logs for. responses: - '200': + "200": description: All logs for a run content: application/json: @@ -4709,14 +4896,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/labels': + "/tasks/{taskID}/labels": get: operationId: GetTasksIDLabels tags: - Tasks summary: List all labels for a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4724,7 +4911,7 @@ paths: required: true description: The task ID. responses: - '200': + "200": description: A list of all labels for a task content: application/json: @@ -4742,7 +4929,7 @@ paths: - Tasks summary: Add a label to a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4757,7 +4944,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '200': + "201": description: A list of all labels for a task content: application/json: @@ -4769,14 +4956,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/labels/{labelID}': + "/tasks/{taskID}/labels/{labelID}": delete: operationId: DeleteTasksIDLabelsID tags: - Tasks summary: Delete a label from a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4790,9 +4977,9 @@ paths: required: true description: The label ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Task not found content: application/json: @@ -4811,9 +4998,9 @@ paths: - Users summary: Return the current authenticated user parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': + "200": description: Currently authenticated user content: application/json: @@ -4834,7 +5021,7 @@ paths: security: - BasicAuth: [] parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: New password required: true @@ -4843,7 +5030,7 @@ paths: schema: $ref: "#/components/schemas/PasswordResetBody" responses: - '204': + "204": description: Password successfully updated default: description: Unsuccessful authentication @@ -4851,7 +5038,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/members': + "/tasks/{taskID}/members": get: operationId: GetTasksIDMembers tags: @@ -4859,7 +5046,7 @@ paths: - Tasks summary: List all task members parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4867,7 +5054,7 @@ paths: required: true description: The task ID. responses: - '200': + "200": description: A list of users who have member privileges for a task content: application/json: @@ -4886,7 +5073,7 @@ paths: - Tasks summary: Add a member to a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4901,7 +5088,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Added to task members content: application/json: @@ -4913,7 +5100,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/members/{userID}': + "/tasks/{taskID}/members/{userID}": delete: operationId: DeleteTasksIDMembersID tags: @@ -4921,7 +5108,7 @@ paths: - Tasks summary: Remove a member from a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -4935,7 +5122,7 @@ paths: required: true description: The task ID. responses: - '204': + "204": description: Member removed default: description: Unexpected error @@ -4943,7 +5130,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/owners': + "/tasks/{taskID}/owners": get: operationId: GetTasksIDOwners tags: @@ -4951,7 +5138,7 @@ paths: - Tasks summary: List all owners of a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4959,7 +5146,7 @@ paths: required: true description: The task ID. responses: - '200': + "200": description: A list of users who have owner privileges for a task content: application/json: @@ -4978,7 +5165,7 @@ paths: - Tasks summary: Add an owner to a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: taskID schema: @@ -4993,7 +5180,7 @@ paths: schema: $ref: "#/components/schemas/AddResourceMemberRequestBody" responses: - '201': + "201": description: Added to task owners content: application/json: @@ -5005,7 +5192,7 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/tasks/{taskID}/owners/{userID}': + "/tasks/{taskID}/owners/{userID}": delete: operationId: DeleteTasksIDOwnersID tags: @@ -5013,7 +5200,7 @@ paths: - Tasks summary: Remove an owner from a task parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -5027,7 +5214,7 @@ paths: required: true description: The task ID. responses: - '204': + "204": description: Owner removed default: description: Unexpected error @@ -5042,9 +5229,9 @@ paths: - Users summary: List all users parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" responses: - '200': + "200": description: A list of users content: application/json: @@ -5062,7 +5249,7 @@ paths: - Users summary: Create a user parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" requestBody: description: User to create required: true @@ -5071,7 +5258,7 @@ paths: schema: $ref: "#/components/schemas/User" responses: - '201': + "201": description: User created content: application/json: @@ -5083,14 +5270,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/users/{userID}': + "/users/{userID}": get: operationId: GetUsersID tags: - Users summary: Retrieve a user parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -5098,7 +5285,7 @@ paths: required: true description: The user ID. responses: - '200': + "200": description: User details content: application/json: @@ -5123,7 +5310,7 @@ paths: schema: $ref: "#/components/schemas/User" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -5131,7 +5318,7 @@ paths: required: true description: The ID of the user to update. responses: - '200': + "200": description: User updated content: application/json: @@ -5149,7 +5336,7 @@ paths: - Users summary: Delete a user parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -5157,7 +5344,7 @@ paths: required: true description: The ID of the user to delete. responses: - '204': + "204": description: User deleted default: description: Unexpected error @@ -5165,16 +5352,16 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/users/{userID}/password': - put: - operationId: PutUsersIDPassword + "/users/{userID}/password": + post: + operationId: PostUsersIDPassword tags: - Users summary: Update a password security: - BasicAuth: [] parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: userID schema: @@ -5189,7 +5376,7 @@ paths: schema: $ref: "#/components/schemas/PasswordResetBody" responses: - '204': + "204": description: Password successfully updated default: description: Unsuccessful authentication @@ -5197,36 +5384,6 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/users/{userID}/logs': - get: - operationId: GetUsersIDLogs - tags: - - Users - - OperationLogs - summary: Retrieve operation logs for a user - parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' - - in: path - name: userID - required: true - description: The user ID. - schema: - type: string - responses: - '200': - description: Operation logs for the user - content: - application/json: - schema: - $ref: "#/components/schemas/OperationLogs" - default: - description: Unexpected error - content: - application/json: - schema: - $ref: "#/components/schemas/Error" /checks: get: operationId: GetChecks @@ -5234,9 +5391,9 @@ paths: - Checks summary: Get all checks parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" - in: query name: orgID required: true @@ -5244,7 +5401,7 @@ paths: schema: type: string responses: - '200': + "200": description: A list of checks content: application/json: @@ -5269,7 +5426,7 @@ paths: schema: $ref: "#/components/schemas/PostCheck" responses: - '201': + "201": description: Check created content: application/json: @@ -5281,14 +5438,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/checks/{checkID}': + "/checks/{checkID}": get: operationId: GetChecksID tags: - Checks summary: Get a check parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5296,7 +5453,7 @@ paths: required: true description: The check ID. responses: - '200': + "200": description: The check requested content: application/json: @@ -5321,7 +5478,7 @@ paths: schema: $ref: "#/components/schemas/Check" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5329,13 +5486,13 @@ paths: required: true description: The check ID. responses: - '200': + "200": description: An updated check content: application/json: schema: $ref: "#/components/schemas/Check" - '404': + "404": description: The check was not found content: application/json: @@ -5360,7 +5517,7 @@ paths: schema: $ref: "#/components/schemas/CheckPatch" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5368,13 +5525,13 @@ paths: required: true description: The check ID. responses: - '200': + "200": description: An updated check content: application/json: schema: $ref: "#/components/schemas/Check" - '404': + "404": description: The check was not found content: application/json: @@ -5392,7 +5549,7 @@ paths: - Checks summary: Delete a check parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5400,9 +5557,9 @@ paths: required: true description: The check ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: The check was not found content: application/json: @@ -5414,14 +5571,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/checks/{checkID}/labels': + "/checks/{checkID}/labels": get: operationId: GetChecksIDLabels tags: - Checks summary: List all labels for a check parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5429,7 +5586,7 @@ paths: required: true description: The check ID. responses: - '200': + "200": description: A list of all labels for a check content: application/json: @@ -5447,7 +5604,7 @@ paths: - Checks summary: Add a label to a check parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5462,7 +5619,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The label was added to the check content: application/json: @@ -5474,14 +5631,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/checks/{checkID}/labels/{labelID}': + "/checks/{checkID}/labels/{labelID}": delete: operationId: DeleteChecksIDLabelsID tags: - Checks summary: Delete label from a check parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5495,9 +5652,9 @@ paths: required: true description: The ID of the label to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Check or label not found content: application/json: @@ -5516,9 +5673,9 @@ paths: - NotificationRules summary: Get all notification rules parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" - in: query name: orgID required: true @@ -5538,7 +5695,7 @@ paths: pattern: ^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$ example: env:prod responses: - '200': + "200": description: A list of notification rules content: application/json: @@ -5563,7 +5720,7 @@ paths: schema: $ref: "#/components/schemas/PostNotificationRule" responses: - '201': + "201": description: Notification rule created content: application/json: @@ -5575,14 +5732,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/checks/{checkID}/query': + "/checks/{checkID}/query": get: operationId: GetChecksIDQuery tags: - Checks summary: Get a check query parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: checkID schema: @@ -5590,19 +5747,19 @@ paths: required: true description: The check ID. responses: - '200': + "200": description: The check query requested content: application/json: schema: $ref: "#/components/schemas/FluxResponse" - '400': + "400": description: Invalid request content: application/json: schema: $ref: "#/components/schemas/Error" - '404': + "404": description: Check not found content: application/json: @@ -5614,14 +5771,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationRules/{ruleID}': + "/notificationRules/{ruleID}": get: operationId: GetNotificationRulesID tags: - NotificationRules summary: Get a notification rule parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5629,7 +5786,7 @@ paths: required: true description: The notification rule ID. responses: - '200': + "200": description: The notification rule requested content: application/json: @@ -5654,7 +5811,7 @@ paths: schema: $ref: "#/components/schemas/NotificationRule" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5662,13 +5819,13 @@ paths: required: true description: The notification rule ID. responses: - '200': + "200": description: An updated notification rule content: application/json: schema: $ref: "#/components/schemas/NotificationRule" - '404': + "404": description: The notification rule was not found content: application/json: @@ -5693,7 +5850,7 @@ paths: schema: $ref: "#/components/schemas/NotificationRuleUpdate" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5701,13 +5858,13 @@ paths: required: true description: The notification rule ID. responses: - '200': + "200": description: An updated notification rule content: application/json: schema: $ref: "#/components/schemas/NotificationRule" - '404': + "404": description: The notification rule was not found content: application/json: @@ -5725,7 +5882,7 @@ paths: - NotificationRules summary: Delete a notification rule parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5733,9 +5890,9 @@ paths: required: true description: The notification rule ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: The check was not found content: application/json: @@ -5747,14 +5904,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationRules/{ruleID}/labels': + "/notificationRules/{ruleID}/labels": get: operationId: GetNotificationRulesIDLabels tags: - NotificationRules summary: List all labels for a notification rule parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5762,7 +5919,7 @@ paths: required: true description: The notification rule ID. responses: - '200': + "200": description: A list of all labels for a notification rule content: application/json: @@ -5780,7 +5937,7 @@ paths: - NotificationRules summary: Add a label to a notification rule parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5795,7 +5952,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The label was added to the notification rule content: application/json: @@ -5807,14 +5964,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationRules/{ruleID}/labels/{labelID}': + "/notificationRules/{ruleID}/labels/{labelID}": delete: operationId: DeleteNotificationRulesIDLabelsID tags: - NotificationRules summary: Delete label from a notification rule parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5828,9 +5985,9 @@ paths: required: true description: The ID of the label to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Rule or label not found content: application/json: @@ -5842,14 +5999,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationRules/{ruleID}/query': + "/notificationRules/{ruleID}/query": get: operationId: GetNotificationRulesIDQuery tags: - Rules summary: Get a notification rule query parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: ruleID schema: @@ -5857,19 +6014,19 @@ paths: required: true description: The notification rule ID. responses: - '200': + "200": description: The notification rule query requested content: application/json: schema: $ref: "#/components/schemas/FluxResponse" - '400': + "400": description: Invalid request content: application/json: schema: $ref: "#/components/schemas/Error" - '404': + "404": description: Notification rule not found content: application/json: @@ -5888,9 +6045,9 @@ paths: - NotificationEndpoints summary: Get all notification endpoints parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/Offset' - - $ref: '#/components/parameters/Limit' + - $ref: "#/components/parameters/TraceSpan" + - $ref: "#/components/parameters/Offset" + - $ref: "#/components/parameters/Limit" - in: query name: orgID required: true @@ -5898,7 +6055,7 @@ paths: schema: type: string responses: - '200': + "200": description: A list of notification endpoints content: application/json: @@ -5923,7 +6080,7 @@ paths: schema: $ref: "#/components/schemas/PostNotificationEndpoint" responses: - '201': + "201": description: Notification endpoint created content: application/json: @@ -5935,14 +6092,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationEndpoints/{endpointID}': + "/notificationEndpoints/{endpointID}": get: operationId: GetNotificationEndpointsID tags: - NotificationEndpoints summary: Get a notification endpoint parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -5950,7 +6107,7 @@ paths: required: true description: The notification endpoint ID. responses: - '200': + "200": description: The notification endpoint requested content: application/json: @@ -5975,7 +6132,7 @@ paths: schema: $ref: "#/components/schemas/NotificationEndpoint" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -5983,13 +6140,13 @@ paths: required: true description: The notification endpoint ID. responses: - '200': + "200": description: An updated notification endpoint content: application/json: schema: $ref: "#/components/schemas/NotificationEndpoint" - '404': + "404": description: The notification endpoint was not found content: application/json: @@ -6014,7 +6171,7 @@ paths: schema: $ref: "#/components/schemas/NotificationEndpointUpdate" parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6022,13 +6179,13 @@ paths: required: true description: The notification endpoint ID. responses: - '200': + "200": description: An updated notification endpoint content: application/json: schema: $ref: "#/components/schemas/NotificationEndpoint" - '404': + "404": description: The notification endpoint was not found content: application/json: @@ -6046,7 +6203,7 @@ paths: - NotificationEndpoints summary: Delete a notification endpoint parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6054,9 +6211,9 @@ paths: required: true description: The notification endpoint ID. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: The endpoint was not found content: application/json: @@ -6068,14 +6225,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationEndpoints/{endpointID}/labels': + "/notificationEndpoints/{endpointID}/labels": get: operationId: GetNotificationEndpointsIDLabels tags: - NotificationEndpoints summary: List all labels for a notification endpoint parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6083,7 +6240,7 @@ paths: required: true description: The notification endpoint ID. responses: - '200': + "200": description: A list of all labels for a notification endpoint content: application/json: @@ -6101,7 +6258,7 @@ paths: - NotificationEndpoints summary: Add a label to a notification endpoint parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6116,7 +6273,7 @@ paths: schema: $ref: "#/components/schemas/LabelMapping" responses: - '201': + "201": description: The label was added to the notification endpoint content: application/json: @@ -6128,14 +6285,14 @@ paths: application/json: schema: $ref: "#/components/schemas/Error" - '/notificationEndpoints/{endpointID}/labels/{labelID}': + "/notificationEndpoints/{endpointID}/labels/{labelID}": delete: operationId: DeleteNotificationEndpointsIDLabelsID tags: - NotificationEndpoints summary: Delete a label from a notification endpoint parameters: - - $ref: '#/components/parameters/TraceSpan' + - $ref: "#/components/parameters/TraceSpan" - in: path name: endpointID schema: @@ -6149,9 +6306,9 @@ paths: required: true description: The ID of the label to delete. responses: - '204': + "204": description: Delete has been accepted - '404': + "404": description: Endpoint or label not found content: application/json: @@ -6199,8 +6356,8 @@ components: name: Zap-Trace-Span description: OpenTracing span context example: - trace_id: '1' - span_id: '1' + trace_id: "1" + span_id: "1" baggage: key: value required: false @@ -6217,7 +6374,7 @@ components: description: Flux query script to be analyzed type: string Query: - description: Query influx with specific return formatting. + description: Query influx using the Flux language type: object required: - query @@ -6228,23 +6385,16 @@ components: description: Query script to execute. type: string type: - description: The type of query. + description: The type of query. Must be "flux". type: string - default: flux enum: - flux - - influxql - db: - description: Required for `influxql` type queries. - type: string - rp: - description: Required for `influxql` type queries. - type: string - cluster: - description: Required for `influxql` type queries. - type: string 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 @@ -6747,6 +6897,7 @@ components: - notificationRules - notificationEndpoints - checks + - dbrp id: type: string nullable: true @@ -6875,7 +7026,6 @@ components: readOnly: true example: labels: "/api/v2/buckets/1/labels" - logs: "/api/v2/buckets/1/logs" members: "/api/v2/buckets/1/members" org: "/api/v2/orgs/2" owners: "/api/v2/buckets/1/owners" @@ -6885,9 +7035,6 @@ components: labels: description: URL to retrieve labels for this bucket $ref: "#/components/schemas/Link" - logs: - description: URL to retrieve operation logs for this bucket - $ref: "#/components/schemas/Link" members: description: URL to retrieve members that can read this bucket $ref: "#/components/schemas/Link" @@ -6995,35 +7142,6 @@ components: description: A description of the event that occurred. type: string example: Halt and catch fire - OperationLog: - type: object - readOnly: true - properties: - description: - type: string - description: A description of the event that occurred. - example: Bucket Created - time: - type: string - description: Time event occurred, RFC3339Nano. - format: date-time - userID: - type: string - description: ID of the user who operated the event. - links: - type: object - properties: - user: - $ref: "#/components/schemas/Link" - OperationLogs: - type: object - properties: - logs: - type: array - items: - $ref: "#/components/schemas/OperationLog" - links: - $ref: "#/components/schemas/Links" Organization: properties: links: @@ -7038,7 +7156,6 @@ components: buckets: "/api/v2/buckets?org=myorg" tasks: "/api/v2/tasks?org=myorg" dashboards: "/api/v2/dashboards?org=myorg" - logs: "/api/v2/orgs/1/logs" properties: self: $ref: "#/components/schemas/Link" @@ -7056,8 +7173,6 @@ components: $ref: "#/components/schemas/Link" dashboards: $ref: "#/components/schemas/Link" - logs: - $ref: "#/components/schemas/Link" id: readOnly: true type: string @@ -7394,7 +7509,6 @@ components: self: "/api/v2/tasks/1/runs/1" task: "/api/v2/tasks/1" retry: "/api/v2/tasks/1/runs/1/retry" - logs: "/api/v2/tasks/1/runs/1/logs" properties: self: type: string @@ -7402,9 +7516,6 @@ components: task: type: string format: uri - logs: - type: string - format: uri retry: type: string format: uri @@ -7536,14 +7647,10 @@ components: readOnly: true example: self: "/api/v2/users/1" - logs: "/api/v2/users/1/logs" properties: self: type: string format: uri - logs: - type: string - format: uri required: [name] Users: type: object @@ -7798,7 +7905,7 @@ components: description: Args are the arguments to the function type: array items: - $ref: '#/components/schemas/Field' + $ref: "#/components/schemas/Field" BuilderConfig: type: object properties: @@ -7809,11 +7916,11 @@ components: tags: type: array items: - $ref: '#/components/schemas/BuilderTagsType' + $ref: "#/components/schemas/BuilderTagsType" functions: type: array items: - $ref: '#/components/schemas/BuilderFunctionsType' + $ref: "#/components/schemas/BuilderFunctionsType" aggregateWindow: type: object properties: @@ -7840,14 +7947,14 @@ components: type: string description: The text of the Flux query. editMode: - $ref: '#/components/schemas/QueryEditMode' + $ref: "#/components/schemas/QueryEditMode" name: type: string builderConfig: - $ref: '#/components/schemas/BuilderConfig' + $ref: "#/components/schemas/BuilderConfig" QueryEditMode: type: string - enum: ['builder', 'advanced'] + enum: ["builder", "advanced"] Axis: type: object description: The description of a particular axis for a visualization. @@ -7873,13 +7980,13 @@ components: base: description: Base represents the radix for formatting axis values. type: string - enum: ['', '2', '10'] + enum: ["", "2", "10"] scale: - $ref: '#/components/schemas/AxisScale' + $ref: "#/components/schemas/AxisScale" AxisScale: description: 'Scale is the axis formatting scale. Supported: "log", "linear"' type: string - enum: ['log', 'linear'] + enum: ["log", "linear"] DashboardColor: type: object description: Defines an encoding of data value into color space. @@ -7936,7 +8043,10 @@ components: - legend - note - showNoteWhenEmpty + - position properties: + timeFormat: + type: string type: type: string enum: [xy] @@ -7951,24 +8061,27 @@ components: $ref: "#/components/schemas/DashboardColor" shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: description: If true, will display note when empty type: boolean axes: - $ref: '#/components/schemas/Axes' + $ref: "#/components/schemas/Axes" legend: - $ref: '#/components/schemas/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' + $ref: "#/components/schemas/XYGeom" XYGeom: type: string enum: [line, step, stacked, bar, monotoneX] @@ -7986,7 +8099,10 @@ components: - prefix - suffix - decimalPlaces + - position properties: + timeFormat: + type: string type: type: string enum: [line-plus-single-stat] @@ -8001,28 +8117,31 @@ components: $ref: "#/components/schemas/DashboardColor" shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: description: If true, will display note when empty type: boolean axes: - $ref: '#/components/schemas/Axes' + $ref: "#/components/schemas/Axes" legend: - $ref: '#/components/schemas/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' + $ref: "#/components/schemas/DecimalPlaces" ScatterViewProperties: type: object required: @@ -8045,6 +8164,8 @@ components: - xSuffix - ySuffix properties: + timeFormat: + type: string type: type: string enum: [scatter] @@ -8059,7 +8180,7 @@ components: type: string shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: @@ -8120,6 +8241,8 @@ components: - ySuffix - binSize properties: + timeFormat: + type: string type: type: string enum: [heatmap] @@ -8134,7 +8257,7 @@ components: type: string shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: @@ -8178,7 +8301,9 @@ components: - note - showNoteWhenEmpty - prefix + - tickPrefix - suffix + - tickSuffix - legend - decimalPlaces properties: @@ -8196,7 +8321,7 @@ components: $ref: "#/components/schemas/DashboardColor" shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: @@ -8204,10 +8329,14 @@ components: type: boolean prefix: type: string + tickPrefix: + type: string suffix: type: string + tickSuffix: + type: string legend: - $ref: '#/components/schemas/Legend' + $ref: "#/components/schemas/Legend" decimalPlaces: $ref: "#/components/schemas/DecimalPlaces" HistogramViewProperties: @@ -8240,7 +8369,7 @@ components: $ref: "#/components/schemas/DashboardColor" shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: @@ -8267,16 +8396,20 @@ components: GaugeViewProperties: type: object required: - - type - - queries - - colors - - shape - - note - - showNoteWhenEmpty - - prefix - - suffix - - legend - - decimalPlaces + [ + type, + queries, + colors, + shape, + note, + showNoteWhenEmpty, + prefix, + tickPrefix, + suffix, + tickSuffix, + legend, + decimalPlaces, + ] properties: type: type: string @@ -8292,7 +8425,7 @@ components: $ref: "#/components/schemas/DashboardColor" shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: @@ -8300,10 +8433,14 @@ components: type: boolean prefix: type: string + tickPrefix: + type: string suffix: type: string + tickSuffix: + type: string legend: - $ref: '#/components/schemas/Legend' + $ref: "#/components/schemas/Legend" decimalPlaces: $ref: "#/components/schemas/DecimalPlaces" TableViewProperties: @@ -8334,7 +8471,7 @@ components: $ref: "#/components/schemas/DashboardColor" shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string showNoteWhenEmpty: @@ -8367,14 +8504,14 @@ components: customization options type: array items: - $ref: '#/components/schemas/RenamableField' + $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' + $ref: "#/components/schemas/DecimalPlaces" MarkdownViewProperties: type: object required: @@ -8387,7 +8524,7 @@ components: enum: [markdown] shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] note: type: string CheckViewProperties: @@ -8404,11 +8541,11 @@ components: enum: [check] shape: type: string - enum: ['chronograf-v2'] + enum: ["chronograf-v2"] checkID: type: string check: - $ref: '#/components/schemas/Check' + $ref: "#/components/schemas/Check" queries: type: array items: @@ -8421,12 +8558,12 @@ components: Axes: description: The viewport for a View's visualizations type: object - required: ['x', 'y'] + required: ["x", "y"] properties: x: - $ref: '#/components/schemas/Axis' + $ref: "#/components/schemas/Axis" "y": # Quoted to prevent YAML parser from interpreting y as shorthand for true. - $ref: '#/components/schemas/Axis' + $ref: "#/components/schemas/Axis" Legend: description: Legend define encoding of data into a view's legend type: object @@ -8534,7 +8671,7 @@ components: type: object example: variables: - - id: '1221432' + - id: "1221432" name: ":ok:" selected: - hello @@ -8546,7 +8683,7 @@ components: - hi - yo - oy - - id: '1221432' + - id: "1221432" name: ":ok:" selected: - c @@ -8556,7 +8693,7 @@ components: a: fdjaklfdjkldsfjlkjdsa b: dfaksjfkljekfajekdljfas c: fdjksajfdkfeawfeea - - id: '1221432' + - id: "1221432" name: ":ok:" selected: - host @@ -8604,7 +8741,7 @@ components: name: type: string properties: - $ref: '#/components/schemas/ViewProperties' + $ref: "#/components/schemas/ViewProperties" Views: type: object properties: @@ -8751,7 +8888,6 @@ components: cells: "/api/v2/dashboards/1/cells" owners: "/api/v2/dashboards/1/owners" members: "/api/v2/dashboards/1/members" - logs: "/api/v2/dashboards/1/logs" labels: "/api/v2/dashboards/1/labels" org: "/api/v2/labels/1" properties: @@ -8763,8 +8899,6 @@ components: $ref: "#/components/schemas/Link" owners: $ref: "#/components/schemas/Link" - logs: - $ref: "#/components/schemas/Link" labels: $ref: "#/components/schemas/Link" org: @@ -9179,6 +9313,10 @@ components: enum: - pass - fail + version: + type: string + commit: + type: string Labels: type: array items: @@ -9847,10 +9985,10 @@ components: type: string method: type: string - enum: ['POST', 'GET', 'PUT'] + enum: ["POST", "GET", "PUT"] authMethod: type: string - enum: ['none', 'basic', 'bearer'] + enum: ["none", "basic", "bearer"] contentTemplate: type: string headers: @@ -9860,7 +9998,59 @@ components: type: string NotificationEndpointType: type: string - enum: ['slack', 'pagerduty', 'http'] + 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 diff --git a/tests/__init__.py b/tests/__init__.py index 02b84404..9777d6e3 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -7,13 +7,13 @@ from influxdb_client.service.buckets_service import BucketsService from influxdb_client.service.cells_service import CellsService from influxdb_client.service.checks_service import ChecksService +from influxdb_client.service.dbr_ps_service import DBRPsService from influxdb_client.service.dashboards_service import DashboardsService from influxdb_client.service.health_service import HealthService from influxdb_client.service.influx_packages_service import InfluxPackagesService from influxdb_client.service.labels_service import LabelsService from influxdb_client.service.notification_endpoints_service import NotificationEndpointsService from influxdb_client.service.notification_rules_service import NotificationRulesService -from influxdb_client.service.operation_logs_service import OperationLogsService from influxdb_client.service.organizations_service import OrganizationsService from influxdb_client.service.query_service import QueryService from influxdb_client.service.ready_service import ReadyService diff --git a/tests/test_TasksApi.py b/tests/test_TasksApi.py index 5bd236f0..e5f049f2 100644 --- a/tests/test_TasksApi.py +++ b/tests/test_TasksApi.py @@ -284,7 +284,6 @@ def test_runs(self): self.assertIsNone(run.requested_at) self.assertIsNotNone(run.links) - self.assertEqual(run.links.logs, "/api/v2/tasks/" + task.id + "/runs/" + run.id + "/logs") self.assertEqual(run.links.retry, "/api/v2/tasks/" + task.id + "/runs/" + run.id + "/retry") self.assertEqual(run.links._self, "/api/v2/tasks/" + task.id + "/runs/" + run.id) self.assertEqual(run.links.task, "/api/v2/tasks/" + task.id)