From 6e01923a812a6b16ff91d7f6b34fd9101968d5cf Mon Sep 17 00:00:00 2001 From: Jason Stirnaman Date: Tue, 23 May 2023 13:52:45 -0500 Subject: [PATCH] chore(api-ref): update API ref scripts for v3: (#4949) * chore(api-ref): update API ref scripts for v3: - Replace cloud-iox with cloud-serverless and cloud-dedicated in getswagger.sh - Add cloud-dedicated API ref (handcrafted) with query, write, and ping paths. - Remove separate v1-compat docs for Serverless and Dedicated. The v1 paths are included in contracts/ref. - Add Bearer Auth scheme. - Remove separate v1 docs buttons from api/_index.md * Update api-docs/cloud-dedicated/ref.yml Co-authored-by: Scott Anderson * Update api-docs/cloud-dedicated/ref.yml --------- Co-authored-by: Scott Anderson --- api-docs/cloud-dedicated/content/info.yml | 11 + api-docs/cloud-dedicated/content/servers.yml | 8 + .../cloud-dedicated/content/tag-groups.yml | 13 + api-docs/cloud-dedicated/ref.yml | 2060 +++++++++++++++++ .../content/v1compat/info.yml | 11 - api-docs/cloud-serverless/ref.yml | 32 +- api-docs/cloud-serverless/swaggerV1Compat.yml | 432 ---- api-docs/cloud/ref.yml | 24 - api-docs/generate-api-docs.sh | 31 +- api-docs/getswagger.sh | 26 +- api-docs/openapi/plugins/docs-content.js | 2 +- .../cloud-dedicated/reference/api/_index.md | 22 + .../cloud-serverless/reference/api/_index.md | 15 +- 13 files changed, 2174 insertions(+), 513 deletions(-) create mode 100644 api-docs/cloud-dedicated/content/info.yml create mode 100644 api-docs/cloud-dedicated/content/servers.yml create mode 100644 api-docs/cloud-dedicated/content/tag-groups.yml create mode 100644 api-docs/cloud-dedicated/ref.yml delete mode 100644 api-docs/cloud-serverless/content/v1compat/info.yml delete mode 100644 api-docs/cloud-serverless/swaggerV1Compat.yml create mode 100644 content/influxdb/cloud-dedicated/reference/api/_index.md diff --git a/api-docs/cloud-dedicated/content/info.yml b/api-docs/cloud-dedicated/content/info.yml new file mode 100644 index 000000000..525790e77 --- /dev/null +++ b/api-docs/cloud-dedicated/content/info.yml @@ -0,0 +1,11 @@ +title: InfluxDB Cloud Dedicated API Service +description: | + The InfluxDB HTTP API provides a programmatic interface for all interactions with InfluxDB. + Access the InfluxDB API using the `/api/v2/` endpoint. + + This documentation is generated from the + [InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/ref/cloud.yml). +version: Cloud 2.x +license: + name: MIT + url: 'https://opensource.org/licenses/MIT' \ No newline at end of file diff --git a/api-docs/cloud-dedicated/content/servers.yml b/api-docs/cloud-dedicated/content/servers.yml new file mode 100644 index 000000000..4bc2e19d3 --- /dev/null +++ b/api-docs/cloud-dedicated/content/servers.yml @@ -0,0 +1,8 @@ +- url: https://{baseurl} + description: InfluxDB Cloud Dedicated API URL + variables: + baseurl: + enum: + - 'cluster-id.influxdb.io' + default: 'cluster-id.influxdb.io' + description: InfluxDB Cloud Dedicated URL diff --git a/api-docs/cloud-dedicated/content/tag-groups.yml b/api-docs/cloud-dedicated/content/tag-groups.yml new file mode 100644 index 000000000..6b870e7ca --- /dev/null +++ b/api-docs/cloud-dedicated/content/tag-groups.yml @@ -0,0 +1,13 @@ +- name: Using the InfluxDB HTTP API + tags: + - Quick start + - Authentication + - Headers + - Pagination + - Response codes + - System information endpoints +- name: All endpoints + tags: + - Ping + - Query + - Write diff --git a/api-docs/cloud-dedicated/ref.yml b/api-docs/cloud-dedicated/ref.yml new file mode 100644 index 000000000..088775b09 --- /dev/null +++ b/api-docs/cloud-dedicated/ref.yml @@ -0,0 +1,2060 @@ +components: + parameters: + TraceSpan: + description: OpenTracing span context + example: + baggage: + key: value + span_id: "1" + trace_id: "1" + in: header + name: Zap-Trace-Span + required: false + schema: + type: string + responses: + AuthorizationError: + content: + application/json: + examples: + tokenNotAuthorized: + summary: Token is not authorized to access a resource + value: + code: unauthorized + message: unauthorized access + schema: + properties: + code: + description: | + The HTTP status code description. Default is `unauthorized`. + enum: + - unauthorized + readOnly: true + type: string + message: + description: A human-readable message that may contain detail about the error. + readOnly: true + type: string + description: | + Unauthorized. The error may indicate one of the following: + + * The `Authorization: Token` header is missing or malformed. + * The API token value is missing from the header. + * The token doesn't have sufficient permissions to write to or query the database. + BadRequestError: + content: + application/json: + examples: + orgProvidedNotFound: + summary: The org or orgID passed doesn't own the token passed in the header + value: + code: invalid + message: "failed to decode request body: organization not found" + schema: + $ref: "#/components/schemas/Error" + description: | + Bad request. + The response body contains details about the error. + GeneralServerError: + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Non 2XX error response from server. + InternalServerError: + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: | + Internal server error. + The server encountered an unexpected situation. + ResourceNotFoundError: + content: + application/json: + examples: + bucket-not-found: + summary: database name not found + value: + code: not found + message: database "air_sensor" not found + org-not-found: + summary: Organization name not found + value: + code: not found + message: organization name "my-org" not found + orgID-not-found: + summary: Organization ID not found + value: + code: not found + message: organization not found + schema: + $ref: "#/components/schemas/Error" + description: | + Not found. + A requested resource was not found. + The response body contains the requested resource type and the name value + (if you passed it)--for example: + + - `"organization name \"my-org\" not found"` + - `"organization not found"`: indicates you passed an ID that did not match + an organization. + ServerError: + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Non 2XX error response from server. + schemas: + AddResourceMemberRequestBody: + properties: + id: + description: | + The ID of the user to add to the resource. + type: string + name: + description: | + The name of the user to add to the resource. + type: string + required: + - id + type: object + AnalyzeQueryResponse: + properties: + errors: + items: + properties: + character: + type: integer + column: + type: integer + line: + type: integer + message: + type: string + type: object + type: array + type: object + BadStatement: + description: A placeholder for statements for which no correct statement nodes can be created + properties: + text: + description: Raw source text + type: string + type: + $ref: "#/components/schemas/NodeType" + type: object + BooleanLiteral: + description: Represents boolean values + properties: + type: + $ref: "#/components/schemas/NodeType" + value: + type: boolean + type: object + ConstantVariableProperties: + properties: + type: + enum: + - constant + type: string + values: + items: + type: string + type: array + DBRP: + properties: + bucketID: + description: | + A database ID. + Identifies the database used as the target for the translation. + type: string + database: + description: | + A database name. + Identifies the InfluxDB v1 database. + type: string + default: + description: | + If set to `true`, this DBRP mapping is the default retention policy + for the database (specified by the `database` property's value). + type: boolean + id: + description: | + The resource ID that InfluxDB uses to uniquely identify the database retention policy (DBRP) mapping. + readOnly: true + type: string + links: + $ref: "#/components/schemas/Links" + orgID: + description: | + An organization ID. + Identifies the [organization](/influxdb/cloud-dedicated/reference/glossary/#organization) that owns the mapping. + type: string + retention_policy: + description: | + A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. + Identifies the InfluxDB v1 retention policy mapping. + type: string + virtual: + description: Indicates an autogenerated, virtual mapping based on the database name. Currently only available in OSS. + type: boolean + required: + - id + - orgID + - bucketID + - database + - retention_policy + - default + type: object + DBRPCreate: + properties: + bucketID: + description: | + A database ID. + Identifies the database used as the target for the translation. + type: string + database: + description: | + A database name. + Identifies the InfluxDB v1 database. + type: string + default: + description: | + Set to `true` to use this DBRP mapping as the default retention policy + for the database (specified by the `database` property's value). + type: boolean + org: + description: | + An organization name. + Identifies the [organization](/influxdb/cloud-dedicated/reference/glossary/#organization) that owns the mapping. + type: string + orgID: + description: | + An organization ID. + Identifies the [organization](/influxdb/cloud-dedicated/reference/glossary/#organization) that owns the mapping. + type: string + retention_policy: + description: | + A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. + Identifies the InfluxDB v1 retention policy mapping. + type: string + required: + - bucketID + - database + - retention_policy + type: object + DBRPGet: + properties: + content: + $ref: "#/components/schemas/DBRP" + required: true + type: object + DBRPUpdate: + properties: + default: + description: | + Set to `true` to use this DBRP mapping as the default retention policy + for the database (specified by the `database` property's value). + To remove the default mapping, set to `false`. + type: boolean + retention_policy: + description: | + A [retention policy](/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. + Identifies the InfluxDB v1 retention policy mapping. + type: string + DBRPs: + properties: + content: + items: + $ref: "#/components/schemas/DBRP" + type: array + DateTimeLiteral: + description: Represents an instant in time with nanosecond precision in [RFC3339Nano date/time format](/influxdb/cloud-dedicated/reference/glossary/#rfc3339nano-timestamp). + properties: + type: + $ref: "#/components/schemas/NodeType" + value: + format: date-time + type: string + type: object + DecimalPlaces: + description: Indicates whether decimal places should be enforced, and how many digits it should show. + properties: + digits: + description: The number of digits after decimal to display + format: int32 + type: integer + isEnforced: + description: Indicates whether decimal point setting should be enforced + type: boolean + type: object + DeletePredicateRequest: + description: The delete predicate request. + properties: + predicate: + description: | + An expression in [delete predicate syntax](/influxdb/cloud-dedicated/reference/syntax/delete-predicate/). + example: tag1="value1" and (tag2="value2" and tag3!="value3") + type: string + start: + description: | + A timestamp ([RFC3339 date/time format](/influxdb/cloud-dedicated/reference/glossary/#rfc3339-timestamp)). + The earliest time to delete from. + format: date-time + type: string + stop: + description: | + A timestamp ([RFC3339 date/time format](/influxdb/cloud-dedicated/reference/glossary/#rfc3339-timestamp)). + The latest time to delete from. + format: date-time + type: string + required: + - start + - stop + type: object + Dialect: + description: | + Options for tabular data output. + Default output is [annotated CSV](/influxdb/cloud-dedicated/reference/syntax/annotated-csv/#csv-response-format) with headers. + + For more information about tabular data **dialect**, + see [W3 metadata vocabulary for tabular data](https://www.w3.org/TR/2015/REC-tabular-metadata-20151217/#dialect-descriptions). + properties: + annotations: + description: | + Annotation rows to include in the results. + An _annotation_ is metadata associated with an object (column) in the data model. + + #### Related guides + + - See [Annotated CSV annotations](/influxdb/cloud-dedicated/reference/syntax/annotated-csv/#annotations) for examples and more information. + + For more information about **annotations** in tabular data, + see [W3 metadata vocabulary for tabular data](https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns). + items: + enum: + - group + - datatype + - default + type: string + type: array + uniqueItems: true + commentPrefix: + default: "#" + description: The character prefixed to comment strings. Default is a number sign (`#`). + maxLength: 1 + minLength: 0 + type: string + dateTimeFormat: + default: RFC3339 + description: | + The format for timestamps in results. + Default is [`RFC3339` date/time format](/influxdb/cloud-dedicated/reference/glossary/#rfc3339-timestamp). + To include nanoseconds in timestamps, use `RFC3339Nano`. + + #### Example formatted date/time values + + | Format | Value | + |:------------|:----------------------------| + | `RFC3339` | `"2006-01-02T15:04:05Z07:00"` | + | `RFC3339Nano` | `"2006-01-02T15:04:05.999999999Z07:00"` | + enum: + - RFC3339 + - RFC3339Nano + type: string + delimiter: + default: "," + description: The separator used between cells. Default is a comma (`,`). + maxLength: 1 + minLength: 1 + type: string + header: + default: true + description: If true, the results contain a header row. + type: boolean + type: object + Duration: + description: A pair consisting of length of time and the unit of time measured. It is the atomic unit from which all duration literals are composed. + properties: + magnitude: + type: integer + type: + $ref: "#/components/schemas/NodeType" + unit: + type: string + type: object + DurationLiteral: + description: Represents the elapsed time between two instants as an int64 nanosecond count with syntax of golang's time.Duration + properties: + type: + $ref: "#/components/schemas/NodeType" + values: + description: Duration values + items: + $ref: "#/components/schemas/Duration" + type: array + type: object + Error: + properties: + code: + $ref: "#/components/schemas/ErrorCode" + description: code is the machine-readable error code. + enum: + - internal error + - not implemented + - not found + - conflict + - invalid + - unprocessable entity + - empty value + - unavailable + - forbidden + - too many requests + - unauthorized + - method not allowed + - request too large + - unsupported media type + readOnly: true + type: string + err: + description: Stack of errors that occurred during processing of the request. Useful for debugging. + readOnly: true + type: string + message: + description: Human-readable message. + readOnly: true + type: string + op: + description: Describes the logical code operation when the error occurred. Useful for debugging. + readOnly: true + type: string + required: + - code + ErrorCode: + description: code is the machine-readable error code. + enum: + - internal error + - not implemented + - not found + - conflict + - invalid + - unprocessable entity + - empty value + - unavailable + - forbidden + - too many requests + - unauthorized + - method not allowed + - request too large + - unsupported media type + readOnly: true + type: string + Field: + properties: + alias: + description: Alias overrides the field name in the returned response. Applies only if type is `func` + type: string + args: + description: Args are the arguments to the function + items: + $ref: "#/components/schemas/Field" + type: array + type: + description: "`type` describes the field type. `func` is a function. `field` is a field reference." + enum: + - func + - field + - integer + - number + - regex + - wildcard + type: string + value: + description: value is the value of the field. Meaning of the value is implied by the `type` key + type: string + type: object + File: + description: Represents a source from a single file + type: object + Flags: + additionalProperties: true + type: object + FloatLiteral: + description: Represents floating point numbers according to the double representations defined by the IEEE-754-1985 + properties: + type: + $ref: "#/components/schemas/NodeType" + value: + type: number + type: object + InfluxqlCsvResponse: + description: CSV Response to InfluxQL Query + example: | + name,tags,time,test_field,test_tag test_measurement,,1603740794286107366,1,tag_value test_measurement,,1603740870053205649,2,tag_value test_measurement,,1603741221085428881,3,tag_value + type: string + InfluxqlJsonResponse: + description: JSON Response to InfluxQL Query + properties: + results: + items: + properties: + error: + type: string + series: + items: + properties: + columns: + items: + type: string + type: array + name: + type: string + partial: + type: boolean + tags: + additionalProperties: + type: string + type: object + values: + items: + items: {} + type: array + type: array + type: object + type: array + statement_id: + type: integer + type: object + type: array + type: object + IntegerLiteral: + description: Represents integer numbers + properties: + type: + $ref: "#/components/schemas/NodeType" + value: + type: string + type: object + IsOnboarding: + properties: + allowed: + description: | + If `true`, the InfluxDB instance hasn't had initial setup; + `false` otherwise. + type: boolean + type: object + Label: + properties: + id: + readOnly: true + type: string + name: + type: string + orgID: + readOnly: true + type: string + properties: + additionalProperties: + type: string + description: | + Key-value pairs associated with this label. + To remove a property, send an update with an empty value (`""`) for the key. + example: + color: ffb3b3 + description: this is a description + type: object + type: object + LabelCreateRequest: + properties: + name: + type: string + orgID: + type: string + properties: + additionalProperties: + type: string + description: | + Key-value pairs associated with this label. + + To remove a property, send an update with an empty value (`""`) for the key. + example: + color: ffb3b3 + description: this is a description + type: object + required: + - orgID + - name + type: object + LabelMapping: + description: A _label mapping_ contains a `label` ID to attach to a resource. + properties: + labelID: + description: | + A label ID. + Specifies the label to attach. + type: string + required: + - labelID + type: object + LabelResponse: + properties: + label: + $ref: "#/components/schemas/Label" + links: + $ref: "#/components/schemas/Links" + type: object + LabelUpdate: + properties: + name: + type: string + properties: + additionalProperties: + description: | + Key-value pairs associated with this label. + + To remove a property, send an update with an empty value (`""`) for the key. + type: string + example: + color: ffb3b3 + description: this is a description + type: object + type: object + Labels: + items: + $ref: "#/components/schemas/Label" + type: array + LabelsResponse: + properties: + labels: + $ref: "#/components/schemas/Labels" + links: + $ref: "#/components/schemas/Links" + type: object + LanguageRequest: + description: Flux query to be analyzed. + properties: + query: + description: | + The Flux query script to be analyzed. + type: string + required: + - query + type: object + LatLonColumn: + description: Object type for key and column definitions + properties: + column: + description: Column to look up Lat/Lon + type: string + key: + description: Key to determine whether the column is tag/field + type: string + required: + - key + - column + type: object + Limit: + description: These are org limits similar to those configured in/by quartz. + properties: + bucket: + properties: + maxBuckets: + type: integer + maxRetentionDuration: + description: Max database retention duration in nanoseconds. 0 is unlimited. + type: integer + required: + - maxBuckets + - maxRetentionDuration + type: object + check: + properties: + maxChecks: + type: integer + required: + - maxChecks + type: object + dashboard: + properties: + maxDashboards: + type: integer + required: + - maxDashboards + type: object + features: + properties: + allowDelete: + description: allow delete predicate endpoint + type: boolean + type: object + notificationEndpoint: + properties: + blockedNotificationEndpoints: + description: comma separated list of notification endpoints + example: http,pagerduty + type: string + required: + - blockNotificationEndpoints + type: object + notificationRule: + properties: + blockedNotificationRules: + description: comma separated list of notification rules + example: http,pagerduty + type: string + maxNotifications: + type: integer + required: + - maxNotifications + - blockNotificationRules + type: object + orgID: + type: string + rate: + properties: + cardinality: + description: Allowed organization total cardinality. 0 is unlimited. + type: integer + concurrentDeleteRequests: + description: Allowed organization concurrent outstanding delete requests. + type: integer + concurrentReadRequests: + description: Allowed concurrent queries. 0 is unlimited. + type: integer + concurrentWriteRequests: + description: Allowed concurrent writes. 0 is unlimited. + type: integer + deleteRequestsPerSecond: + description: Allowed organization delete request rate. + type: integer + queryTime: + description: Query Time in nanoseconds + type: integer + readKBs: + description: Query limit in kb/sec. 0 is unlimited. + type: integer + writeKBs: + description: Write limit in kb/sec. 0 is unlimited. + type: integer + required: + - readKBs + - queryTime + - concurrentReadRequests + - writeKBs + - concurrentWriteRequests + - cardinality + type: object + stack: + properties: + enabled: + type: boolean + required: + - enabled + type: object + task: + properties: + maxTasks: + type: integer + required: + - maxTasks + type: object + timeout: + properties: + queryUnconditionalTimeoutSeconds: + type: integer + queryidleWriteTimeoutSeconds: + type: integer + required: + - queryUnconditionalTimeoutSeconds + - queryidleWriteTimeoutSeconds + type: object + required: + - rate + - bucket + - task + - dashboard + - check + - notificationRule + - notificationEndpoint + type: object + LineProtocolError: + properties: + code: + description: Code is the machine-readable error code. + enum: + - internal error + - not found + - conflict + - invalid + - empty value + - unavailable + readOnly: true + type: string + err: + description: Stack of errors that occurred during processing of the request. Useful for debugging. + readOnly: true + type: string + line: + description: First line in the request body that contains malformed data. + format: int32 + readOnly: true + type: integer + message: + description: Human-readable message. + readOnly: true + type: string + op: + description: Describes the logical code operation when the error occurred. Useful for debugging. + readOnly: true + type: string + required: + - code + LineProtocolLengthError: + properties: + code: + description: Code is the machine-readable error code. + enum: + - invalid + readOnly: true + type: string + message: + description: Human-readable message. + readOnly: true + type: string + required: + - code + - message + Link: + description: URI of resource. + format: uri + readOnly: true + type: string + Links: + description: | + URI pointers for additional paged results. + properties: + next: + $ref: "#/components/schemas/Link" + prev: + $ref: "#/components/schemas/Link" + self: + $ref: "#/components/schemas/Link" + required: + - self + type: object + LogEvent: + properties: + message: + description: A description of the event that occurred. + example: Halt and catch fire + readOnly: true + type: string + runID: + description: The ID of the task run that generated the event. + readOnly: true + type: string + time: + description: The time ([RFC3339Nano date/time format](/influxdb/cloud-dedicated/reference/glossary/#rfc3339nano-timestamp)) that the event occurred. + example: 2006-01-02T15:04:05.999999999Z07:00 + format: date-time + readOnly: true + type: string + type: object + Logs: + properties: + events: + items: + $ref: "#/components/schemas/LogEvent" + readOnly: true + type: array + type: object + NodeType: + description: Type of AST node + type: string + OnboardingRequest: + properties: + bucket: + type: string + limit: + $ref: "#/components/schemas/Limit" + org: + type: string + password: + type: string + retentionPeriodHrs: + deprecated: true + type: integer + retentionPeriodSeconds: + type: integer + username: + type: string + required: + - username + - org + - bucket + type: object + Organization: + properties: + createdAt: + format: date-time + readOnly: true + type: string + defaultStorageType: + description: Discloses whether the organization uses TSM or IOx. + enum: + - tsm + - iox + type: string + description: + type: string + id: + readOnly: true + type: string + links: + example: + buckets: /api/v2/buckets?org=myorg + dashboards: /api/v2/dashboards?org=myorg + labels: /api/v2/orgs/1/labels + members: /api/v2/orgs/1/members + owners: /api/v2/orgs/1/owners + secrets: /api/v2/orgs/1/secrets + self: /api/v2/orgs/1 + tasks: /api/v2/tasks?org=myorg + properties: + buckets: + $ref: "#/components/schemas/Link" + dashboards: + $ref: "#/components/schemas/Link" + labels: + $ref: "#/components/schemas/Link" + members: + $ref: "#/components/schemas/Link" + owners: + $ref: "#/components/schemas/Link" + secrets: + $ref: "#/components/schemas/Link" + self: + $ref: "#/components/schemas/Link" + tasks: + $ref: "#/components/schemas/Link" + readOnly: true + type: object + name: + type: string + status: + default: active + description: If inactive, the organization is inactive. + enum: + - active + - inactive + type: string + updatedAt: + format: date-time + readOnly: true + type: string + required: + - name + Organizations: + properties: + links: + $ref: "#/components/schemas/Links" + orgs: + items: + $ref: "#/components/schemas/Organization" + type: array + type: object + Package: + description: Represents a complete package source tree. + properties: + files: + description: Package files + items: + $ref: "#/components/schemas/File" + type: array + package: + description: Package name + type: string + path: + description: Package import path + type: string + type: + $ref: "#/components/schemas/NodeType" + type: object + PackageClause: + description: Defines a package identifier + type: object + Params: + properties: + params: + additionalProperties: + enum: + - any + - bool + - duration + - float + - int + - string + - time + - uint + type: string + description: | + The `params` keys and value type defined in the script. + type: object + type: object + PasswordResetBody: + properties: + password: + type: string + required: + - password + PatchBucketRequest: + description: | + An object that contains updated database properties to apply. + properties: + description: + description: | + A description of the bucket. + type: string + name: + description: | + The name of the bucket. + type: string + retentionRules: + $ref: "#/components/schemas/PatchRetentionRules" + type: object + PatchOrganizationRequest: + description: | + An object that contains updated organization properties to apply. + properties: + description: + description: | + The description of the organization. + type: string + name: + description: | + The name of the organization. + type: string + type: object + PatchRetentionRule: + properties: + everySeconds: + default: 2592000 + description: | + The number of seconds to keep data. + Default duration is `2592000` (30 days). + `0` represents infinite retention. + example: 86400 + format: int64 + minimum: 0 + type: integer + shardGroupDurationSeconds: + description: | + The [shard group duration](/influxdb/cloud-dedicated/reference/glossary/#shard). + The number of seconds that each shard group covers. + + #### InfluxDB Cloud + + - Doesn't use `shardGroupDurationsSeconds`. + + #### Related guides + + - InfluxDB [shards and shard groups](/influxdb/cloud-dedicated/reference/internals/shards/) + format: int64 + type: integer + type: + default: expire + enum: + - expire + type: string + required: + - everySeconds + type: object + PatchRetentionRules: + description: Updates to rules to expire or retain data. No rules means no updates. + items: + $ref: "#/components/schemas/PatchRetentionRule" + type: array + PipeLiteral: + description: Represents a specialized literal value, indicating the left hand value of a pipe expression + properties: + type: + $ref: "#/components/schemas/NodeType" + type: object + Ready: + properties: + started: + example: "2019-03-13T10:09:33.891196-04:00" + format: date-time + type: string + status: + enum: + - ready + type: string + up: + example: 14m45.911966424s + type: string + type: object + RegexpLiteral: + description: Expressions begin and end with `/` and are regular expressions with syntax accepted by RE2 + properties: + type: + $ref: "#/components/schemas/NodeType" + value: + type: string + type: object + RetentionRule: + properties: + everySeconds: + default: 2592000 + description: | + The duration in seconds for how long data will be kept in the database. + The default duration is 2592000 (30 days). + 0 represents infinite retention. + example: 86400 + format: int64 + minimum: 0 + type: integer + shardGroupDurationSeconds: + description: | + The shard group duration. + The duration or interval (in seconds) that each shard group covers. + + #### InfluxDB Cloud + + - Does not use `shardGroupDurationsSeconds`. + + format: int64 + type: integer + type: + default: expire + enum: + - expire + type: string + required: + - everySeconds + type: object + RetentionRules: + description: | + Retention rules to expire or retain data. + The InfluxDB `/api/v2` API uses `RetentionRules` to configure the [retention period](/influxdb/cloud-dedicated/reference/glossary/#retention-period). + + #### InfluxDB Cloud + + - `retentionRules` is required. + items: + $ref: "#/components/schemas/RetentionRule" + type: array + SecretKeys: + properties: + secrets: + items: + type: string + type: array + type: object + SecretKeysResponse: + allOf: + - $ref: "#/components/schemas/SecretKeys" + - properties: + links: + properties: + org: + type: string + self: + type: string + readOnly: true + type: object + type: object + Secrets: + additionalProperties: + type: string + example: + apikey: abc123xyz + StringLiteral: + description: Expressions begin and end with double quote marks + properties: + type: + $ref: "#/components/schemas/NodeType" + value: + type: string + type: object + Token: + properties: + token: + type: string + type: object + UnsignedIntegerLiteral: + description: Represents integer numbers + properties: + type: + $ref: "#/components/schemas/NodeType" + value: + type: string + type: object + WritePrecision: + enum: + - ms + - s + - us + - ns + type: string + securitySchemes: + BasicAuthentication: + description: | + ### Basic authentication scheme + + Use the `Authorization` header with the `Basic` scheme to authenticate v1 API `/write` and `/query` requests. + When authenticating requests, InfluxDB Cloud Dedicated checks that the `password` part of the decoded credential is an authorized [database token](/influxdb/cloud-dedicated/admin/tokens/). + InfluxDB Cloud Dedicated ignores the `username` part of the decoded credential. + + ### Syntax + + ```http + Authorization: Basic + ``` + + Replace the following: + + - **`[USERNAME]`**: an optional string value (ignored by InfluxDB Cloud Dedicated). + - **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/). + - Encode the `[USERNAME]:DATABASE_TOKEN` credential using base64 encoding, and then append the encoded string to the `Authorization: Basic` header. + + ### Example + + The following example shows how to use cURL with the `Basic` authentication scheme and a [database token](/influxdb/cloud-dedicated/admin/tokens/): + + ```sh + ####################################### + # Use Basic authentication with a database token + # to query the InfluxDB v1 API + ####################################### + # Use the --user option with `--user username:DATABASE_TOKEN` syntax + ####################################### + + curl --get "http://cluster-id.influxdb.io/query" \ + --user "":"DATABASE_TOKEN" \ + --data-urlencode "db=DATABASE_NAME" \ + --data-urlencode "q=SELECT * FROM MEASUREMENT" + ``` + + Replace the following: + + - **`DATABASE_NAME`**: your InfluxDB Cloud Dedicated database + - **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the database + scheme: basic + type: http + QuerystringAuthentication: + type: apiKey + in: query + name: u=&p= + description: | + Use the Querystring authentication + scheme with InfluxDB 1.x API parameters to provide credentials through the query string. + + ### Query string authentication + + In the URL, pass the `p` query parameter to authenticate `/write` and `/query` requests. + When authenticating requests, InfluxDB Cloud Dedicated checks that `p` (_password_) is an authorized database token and ignores the `u` (_username_) parameter. + + ### Syntax + + ```http + https://cluster-id.influxdb.io/query/?[u=any]&p=DATABASE_TOKEN + https://cluster-id.influxdb.io/write/?[u=any]&p=DATABASE_TOKEN + ``` + + ### Example + + The following example shows how to use cURL with query string authentication and a [database token](/influxdb/cloud-dedicated/admin/tokens/). + + ```sh + ####################################### + # Use an InfluxDB 1.x compatible username and password + # to query the InfluxDB v1 API + ####################################### + # Use authentication query parameters: + # ?p=DATABASE_TOKEN + ####################################### + + curl --get "https://cluster-id.influxdb.io/query" \ + --data-urlencode "p=DATABASE_TOKEN" \ + --data-urlencode "db=DATABASE_NAME" \ + --data-urlencode "q=SELECT * FROM MEASUREMENT" + ``` + + Replace the following: + + - **`DATABASE_NAME`**: your InfluxDB Cloud Dedicated database + - **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the database + BearerAuthentication: + type: http + scheme: bearer + bearerFormat: JWT + description: | + Use the OAuth Bearer authentication + scheme to authenticate to the InfluxDB API. + + + In your API requests, send an `Authorization` header. + For the header value, provide the word `Bearer` followed by a space and a database token. + + + ### Syntax + + ```http + Authorization: Bearer INFLUX_TOKEN + ``` + + ### Example + + ```sh + ######################################################## + # Use the Bearer token authentication scheme with /api/v2/write + # to write data. + ######################################################## + + curl --post "https://cluster-id.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \ + --header "Authorization: Bearer DATABASE_TOKEN" \ + --data-binary 'home,room=kitchen temp=72 1463683075' + ``` + + For examples and more information, see the following: + - [Authenticate API requests](/influxdb/cloud-dedicated/primers/api/v2/#authenticate-api-requests) + - [Manage tokens](/influxdb/cloud-dedicated/admin/tokens/) + TokenAuthentication: + description: | + Use the Token authentication + scheme to authenticate to the InfluxDB API. + + In your API requests, send an `Authorization` header. + For the header value, provide the word `Token` followed by a space and a database token. + The word `Token` is case-sensitive. + + ### Syntax + + ```http + Authorization: Token INFLUX_API_TOKEN + ``` + + ### Example + + ```sh + ######################################################## + # Use the Token authentication scheme with /api/v2/write + # to write data. + ######################################################## + + curl --post "https://cluster-id.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \ + --header "Authorization: Token DATABASE_TOKEN" \ + --data-binary 'home,room=kitchen temp=72 1463683075' + ``` + + ### Related guides + + - [Authenticate API requests](/influxdb/cloud-dedicated/primers/api/v2/#authenticate-api-requests) + - [Manage tokens](/influxdb/cloud-dedicated/admin/tokens/) + in: header + name: Authorization + type: apiKey +info: + title: InfluxDB Cloud Dedicated API Service + version: Cloud 2.x + description: | + The InfluxDB HTTP API provides a programmatic interface for interactions with InfluxDB. + Access the InfluxDB API using the `/api/v2/` endpoint or InfluxDB v1 endpoints. + + This documentation is generated from the + [InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/ref/cloud.yml). + license: + name: MIT + url: https://opensource.org/licenses/MIT +openapi: 3.0.0 +paths: + /ping: + get: + description: | + Retrieves the status and InfluxDB version of the instance. + + Use this endpoint to monitor uptime for the InfluxDB instance. The response + returns a HTTP `204` status code to inform you the instance is available. + + This endpoint doesn't require authentication. + operationId: GetPing + responses: + "204": + description: | + Success. + Headers contain InfluxDB version information. + headers: + X-Influxdb-Build: + description: | + The type of InfluxDB build. + schema: + type: string + X-Influxdb-Version: + description: | + The version of InfluxDB. + schema: + type: integer + "4xx": + description: | + #### InfluxDB Cloud + - Doesn't return this error. + security: [{}] + servers: [] + summary: Get the status of the instance + tags: + - Ping + head: + description: | + Returns the status and InfluxDB version of the instance. + + Use this endpoint to monitor uptime for the InfluxDB instance. The response + returns a HTTP `204` status code to inform you the instance is available. + + This endpoint doesn't require authentication. + operationId: HeadPing + responses: + "204": + description: | + Success. + Headers contain InfluxDB version information. + headers: + X-Influxdb-Build: + description: The type of InfluxDB build. + schema: + type: string + X-Influxdb-Version: + description: | + The version of InfluxDB. + schema: + type: integer + "4xx": + description: | + #### InfluxDB Cloud + - Doesn't return this error. + security: [{}] + servers: [] + summary: Get the status of the instance + tags: + - Ping + /api/v2/write: + post: + description: | + Writes data to a database. + + Use this endpoint to send data in [line protocol](/influxdb/cloud-dedicated/reference/syntax/line-protocol/) format to InfluxDB. + + #### InfluxDB Cloud + + - Does the following when you send a write request: + + 1. Validates the request and queues the write. + 2. If queued, responds with _success_ (HTTP `2xx` status code); _error_ otherwise. + 3. Handles the write asynchronously and reaches eventual consistency. + + To ensure that InfluxDB Cloud handles writes in the order you request them, + wait for a success response (HTTP `2xx` status code) before you send the next request. + + Because writes are asynchronous, your change might not yet be readable + when you receive the response. + + #### Rate limits (with InfluxDB Cloud) + + `write` rate limits apply. + For more information, see [limits and adjustable quotas](/influxdb/cloud-dedicated/account-management/limits/). + + #### Related guides + + - [Write data with the InfluxDB API](/influxdb/cloud-dedicated/write-data/developer-tools/api) + - [Optimize writes to InfluxDB](/influxdb/cloud-dedicated/write-data/best-practices/optimize-writes/) + - [Troubleshoot issues writing data](/influxdb/cloud-dedicated/write-data/troubleshoot/) + operationId: PostWrite + parameters: + - $ref: "#/components/parameters/TraceSpan" + - description: | + The compression applied to the line protocol in the request payload. + To send a GZIP payload, pass `Content-Encoding: gzip` header. + in: header + name: Content-Encoding + schema: + default: identity + description: | + Content coding. + Use `gzip` for compressed data or `identity` for unmodified, uncompressed data. + enum: + - gzip + - identity + type: string + - description: | + The format of the data in the request body. + To send a line protocol payload, pass `Content-Type: text/plain; charset=utf-8`. + in: header + name: Content-Type + schema: + default: text/plain; charset=utf-8 + description: | + `text/plain` is the content type for line protocol. `UTF-8` is the default character set. + enum: + - text/plain + - text/plain; charset=utf-8 + type: string + - description: | + The size of the entity-body, in bytes, sent to InfluxDB. + If the length is greater than the `max body` configuration option, + the server responds with status code `413`. + in: header + name: Content-Length + schema: + description: The length in decimal number of octets. + type: integer + - description: | + The content type that the client can understand. + Writes only return a response body if they fail--for example, + due to a formatting problem or quota limit. + + #### InfluxDB Cloud + + - Returns only `application/json` for format and limit errors. + - Returns only `text/html` for some quota limit errors. + + #### Related guides + + - [Troubleshoot issues writing data](/influxdb/cloud-dedicated/write-data/troubleshoot/) + in: header + name: Accept + schema: + default: application/json + description: Error content type. + enum: + - application/json + type: string + - description: | + An organization name or ID. + + #### InfluxDB Cloud + + - Ignores `org` and `orgID` parameters. + - Authorizes the request using the specified database token + and writes data to the specified cluster database. + in: query + name: org + required: true + schema: + description: The organization name or ID. + type: string + - description: | + An organization ID. + + #### InfluxDB Cloud + + - Ignores `org` and `orgID` parameters. + - Authorizes the request using the specified database token + and writes data to the specified cluster database. + in: query + name: orgID + schema: + type: string + - description: | + A database name or ID. + InfluxDB writes all points in the batch to the specified database. + in: query + name: bucket + required: true + schema: + description: The database name or ID. + type: string + - description: The precision for unix timestamps in the line protocol batch. + in: query + name: precision + schema: + $ref: "#/components/schemas/WritePrecision" + requestBody: + content: + text/plain: + examples: + plain-utf8: + value: | + airSensors,sensor_id=TLM0201 temperature=73.97038159354763,humidity=35.23103248356096,co=0.48445310567793615 1630424257000000000 + airSensors,sensor_id=TLM0202 temperature=75.30007505999716,humidity=35.651929918691714,co=0.5141876544505826 1630424257000000000 + schema: + format: byte + type: string + description: | + In the request body, provide data in [line protocol format](/influxdb/cloud-dedicated/reference/syntax/line-protocol/). + + To send compressed data, do the following: + + 1. Use [GZIP](https://www.gzip.org/) to compress the line protocol data. + 2. In your request, send the compressed data and the + `Content-Encoding: gzip` header. + + #### Related guides + + - [Best practices for optimizing writes](/influxdb/cloud-dedicated/write-data/best-practices/optimize-writes/) + required: true + responses: + "204": + description: | + Success. + + #### InfluxDB Cloud + + - Validated and queued the request. + - Handles the write asynchronously - the write might not have completed yet. + + #### Related guides + + - [How to check for write errors](/influxdb/cloud-dedicated/write-data/troubleshoot/) + "400": + content: + application/json: + examples: + measurementSchemaFieldTypeConflict: + summary: (Cloud) field type conflict thrown by an explicit database schema + value: + code: invalid + message: 'partial write error (2 written): unable to parse ''air_sensor,service=S1,sensor=L1 temperature="90.5",humidity=70.0 1632850122'': schema: field type for field "temperature" not permitted by schema; got String but expected Float' + orgNotFound: + summary: (OSS) organization not found + value: + code: invalid + message: "failed to decode request body: organization not found" + schema: + $ref: "#/components/schemas/LineProtocolError" + description: | + Bad request. The response body contains detail about the error. + + InfluxDB returns this error if the line protocol data in the request is malformed. + The response body contains the first malformed line in the data, and indicates what was expected. + For partial writes, the number of points written and the number of points rejected are also included. + + #### InfluxDB Cloud + + - Returns this error for database schema conflicts. + "401": + $ref: "#/components/responses/AuthorizationError" + "404": + $ref: "#/components/responses/ResourceNotFoundError" + "413": + content: + application/json: + examples: + dataExceedsSizeLimitOSS: + summary: InfluxDB OSS response + value: | + {"code":"request too large","message":"unable to read data: points batch is too large"} + schema: + $ref: "#/components/schemas/LineProtocolLengthError" + text/html: + examples: + dataExceedsSizeLimit: + summary: InfluxDB Cloud response + value: | + + 413 Request Entity Too Large + +

413 Request Entity Too Large

+
+
nginx
+ + + schema: + type: string + description: | + The request payload is too large. + InfluxDB rejected the batch and did not write any data. + + #### InfluxDB Cloud: + + - Returns this error if the payload exceeds the 50MB size limit. + - Returns `Content-Type: text/html` for this error. + "429": + description: | + Too many requests. + + #### InfluxDB Cloud + + - Returns this error if a **read** or **write** request exceeds your plan's [adjustable service quotas](/influxdb/cloud-dedicated/account-management/limits/#adjustable-service-quotas) + or if a **delete** request exceeds the maximum [global limit](/influxdb/cloud-dedicated/account-management/limits/#global-limits). + - For rate limits that reset automatically, returns a `Retry-After` header that describes when to try the write again. + - For limits that can't reset (for example, **cardinality limit**), doesn't return a `Retry-After` header. + + Rates (data-in (writes), queries (reads), and deletes) accrue within a fixed five-minute window. + Once a rate limit is exceeded, InfluxDB returns an error response until the current five-minute window resets. + headers: + Retry-After: + description: Non-negative decimal integer indicating seconds to wait before retrying the request. + schema: + format: int32 + type: integer + "500": + $ref: "#/components/responses/InternalServerError" + "503": + description: | + Service unavailable. + + - Returns this error if + the server is temporarily unavailable to accept writes. + - Returns a `Retry-After` header that describes when to try the write again. + headers: + Retry-After: + description: Non-negative decimal integer indicating seconds to wait before retrying the request. + schema: + format: int32 + type: integer + default: + $ref: "#/components/responses/GeneralServerError" + summary: Write data + tags: + - Data I/O endpoints + - Write + /query: + get: + description: Queries InfluxDB using InfluxQL with InfluxDB v1 request and response formats. + operationId: GetLegacyQuery + parameters: + - $ref: "#/components/parameters/TraceSpan" + - in: header + name: Accept + schema: + default: application/json + description: | + Media type that the client can understand. + + **Note**: With `application/csv`, query results include [**unix timestamps**](/influxdb/cloud-dedicated/reference/glossary/#unix-timestamp) instead of [RFC3339 timestamps](/influxdb/cloud-dedicated/reference/glossary/#rfc3339-timestamp). + enum: + - application/json + - application/csv + - text/csv + - application/x-msgpack + type: string + - description: The content encoding (usually a compression algorithm) that the client can understand. + in: header + name: Accept-Encoding + schema: + default: identity + description: The content coding. Use `gzip` for compressed data or `identity` for unmodified, uncompressed data. + enum: + - gzip + - identity + type: string + - in: header + name: Content-Type + schema: + enum: + - application/json + type: string + - description: The InfluxDB 1.x username to authenticate the request. + in: query + name: u + schema: + type: string + - description: The InfluxDB 1.x password to authenticate the request. + in: query + name: p + schema: + type: string + - description: | + The [database](/influxdb/cloud-dedicated/admin/databases/) to query data from. + in: query + name: db + required: true + schema: + type: string + - description: | + The retention policy to query data from. + For more information, see [InfluxQL DBRP naming convention](/influxdb/cloud-dedicated/admin/databases/create/#influxql-dbrp-naming-convention). + in: query + name: rp + schema: + type: string + - description: The InfluxQL query to execute. To execute multiple queries, delimit queries with a semicolon (`;`). + in: query + name: q + required: true + schema: + type: string + - description: | + A unix timestamp precision. + Formats timestamps as [unix (epoch) timestamps](/influxdb/cloud-dedicated/reference/glossary/#unix-timestamp) the specified precision + instead of [RFC3339 timestamps](/influxdb/cloud-dedicated/reference/glossary/#rfc3339-timestamp) with nanosecond precision. + in: query + name: epoch + schema: + enum: + - ns + - u + - ยต + - ms + - s + - m + - h + type: string + responses: + "200": + content: + application/csv: + schema: + $ref: "#/components/schemas/InfluxqlCsvResponse" + application/json: + schema: + $ref: "#/components/schemas/InfluxqlJsonResponse" + application/x-msgpack: + schema: + format: binary + type: string + text/csv: + schema: + $ref: "#/components/schemas/InfluxqlCsvResponse" + description: Query results + headers: + Content-Encoding: + description: Lists encodings (usually compression algorithms) that have been applied to the response payload. + schema: + default: identity + description: | + The content coding: + - `gzip`: compressed data + - `identity`: unmodified, uncompressed data. + enum: + - gzip + - identity + type: string + Trace-Id: + description: The trace ID, if generated, of the request. + schema: + description: Trace ID of a request. + type: string + "429": + description: | + #### InfluxDB Cloud: + - returns this error if a **read** or **write** request exceeds your + plan's [adjustable service quotas](/influxdb/cloud-dedicated/account-management/limits/#adjustable-service-quotas) + or if a **delete** request exceeds the maximum + [global limit](/influxdb/cloud-dedicated/account-management/limits/#global-limits) + - returns `Retry-After` header that describes when to try the write again. + headers: + Retry-After: + description: A non-negative decimal integer indicating the seconds to delay after the response is received. + schema: + format: int32 + type: integer + default: + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Error processing query + summary: Query using the InfluxDB v1 API + tags: + - Query + /write: + post: + operationId: PostLegacyWrite + parameters: + - $ref: "#/components/parameters/TraceSpan" + - description: The InfluxDB 1.x username to authenticate the request. + in: query + name: u + schema: + type: string + - description: The InfluxDB 1.x password to authenticate the request. + in: query + name: p + schema: + type: string + - description: database to write to. If none exists, InfluxDB creates a database with a default 3-day retention policy. + in: query + name: db + required: true + schema: + type: string + - description: Retention policy name. + in: query + name: rp + schema: + type: string + - description: Write precision. + in: query + name: precision + schema: + type: string + - description: When present, its value indicates to the database that compression is applied to the line protocol body. + in: header + name: Content-Encoding + schema: + default: identity + description: Specifies that the line protocol in the body is encoded with gzip or not encoded with identity. + enum: + - gzip + - identity + type: string + requestBody: + content: + text/plain: + schema: + type: string + description: Line protocol body + required: true + responses: + "204": + description: Write data is correctly formatted and accepted for writing to the database. + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/LineProtocolError" + 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. + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Token doesn't have sufficient permissions to write to this database or the database doesn't exist. + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: No token was sent and they are required. + "413": + content: + application/json: + schema: + $ref: "#/components/schemas/LineProtocolLengthError" + 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. + "429": + description: Token is temporarily over quota. The Retry-After header describes when to try the write again. + headers: + Retry-After: + description: A non-negative decimal integer indicating the seconds to delay after the response is received. + schema: + format: int32 + type: integer + "503": + description: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again. + headers: + Retry-After: + description: A non-negative decimal integer indicating the seconds to delay after the response is received. + schema: + format: int32 + type: integer + default: + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Internal server error + summary: Write data using the InfluxDB v1 API + tags: + - Write +security: + - BearerAuthentication: [] + - TokenAuthentication: [] + - BasicAuthentication: [] + - QuerystringAuthentication: [] +servers: + - url: / +tags: + - description: | + Use one of the following schemes to authenticate to the InfluxDB API: + + - [Bearer authentication](#section/Authentication/BearerAuthentication) + - [Token authentication](#section/Authentication/TokenAuthentication) + - [Basic authentication](#section/Authentication/BasicAuthentication) + - [Querystring authentication](#section/Authentication/QuerystringAuthentication) + + name: Authentication + x-traitTag: true + - description: | + To specify resources, some InfluxDB API endpoints require parameters or + properties in the request--for example, + writing to a `database` resource. + + ### Common parameters + + | Query parameter | Value type | Description | + |:------------------------ |:--------------------- |:-------------------------------------------| + | `database`, `db` | string | The database name | + name: Common parameters + x-traitTag: true + - name: Data I/O endpoints + description: | + Write and query data stored in InfluxDB. + - description: | + InfluxDB `/api/v2` API endpoints use standard HTTP request and response headers. + The following table shows common headers used by many InfluxDB API endpoints. + Some endpoints may use other headers that perform functions more specific to those endpoints--for example, + the `POST /api/v2/write` endpoint accepts the `Content-Encoding` header to indicate the compression applied to line protocol in the request body. + + | Header | Value type | Description | + |:------------------------ |:--------------------- |:-------------------------------------------| + | `Accept` | string | The content type that the client can understand. | + | `Authorization` | string | The authorization scheme and credential. | + | `Content-Length` | integer | The size of the entity-body, in bytes, sent to the database. | + | `Content-Type` | string | The format of the data in the request body. | + name: Headers + x-traitTag: true + - name: Ping + - description: | + Query data stored in a database. + + - HTTP clients can query the v1 [`/query` endpoint](/influxdb/cloud-dedicated/api/#operation/GetLegacyQuery) + using **InfluxQL** and retrieve data in **CSV** or **JSON** format. + - The `/api/v2/query` endpoint can't query InfluxDB Cloud Dedicated. + - _Flight + gRPC_ clients can query using **SQL** or **InfluxQL** and retrieve data in **Arrow** format. + + To learn more about using Flight, see the following: + + - [Query with Flight SQL](/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/) + - [Flight SQL clients](/influxdb/cloud-dedicated/reference/client-libraries/flight-sql/) + name: Query + - description: | + See the [**Get Started**](/influxdb/cloud-dedicated/get-started/) tutorial + to get up and running authenticating with tokens, writing to databases, and querying data. + + [**InfluxDB API client libraries and Flight clients**](/influxdb/cloud-dedicated/reference/client-libraries/) + are available to integrate InfluxDB APIs with your application. + name: Quick start + x-traitTag: true + - description: | + InfluxDB `/api/v2` API endpoints use standard HTTP status codes for success and failure responses. + The response body may include additional details. + For details about a specific operation's response, + see **Responses** and **Response Samples** for that operation. + + API operations may return the following HTTP status codes: + + |  Code  | Status | Description | + |:-----------:|:------------------------ |:--------------------- | + | `200` | Success | | + | `204` | No content | For a `POST` request, `204` indicates that InfluxDB accepted the request and request data is valid. Asynchronous operations, such as `write`, might not have completed yet. | + | `400` | Bad request | InfluxDB can't parse the request due to an incorrect parameter or bad syntax. If line protocol in the request body is malformed. The response body contains the first malformed line and indicates what was expected. For partial writes, the number of points written and the number of points rejected are also included. | + | `401` | Unauthorized | May indicate one of the following:
  • `Authorization: Token` header is missing or malformed
  • API token value is missing from the header
  • API token doesn't have permission. For more information about token types and permissions, see [Manage tokens](/influxdb/cloud-dedicated/admin/tokens/)
| + | `404` | Not found | Requested resource was not found. `message` in the response body provides details about the requested resource. | + | `405` | Method not allowed | The API path doesn't support the HTTP method used in the request--for example, you send a `POST` request to an endpoint that only allows `GET`. | + | `413` | Request entity too large | Request payload exceeds the size limit. | + | `422` | Unprocessable entity | Request data is invalid. `code` and `message` in the response body provide details about the problem. | + | `429` | Too many requests | API token is temporarily over the request quota. The `Retry-After` header describes when to try the request again. | + | `500` | Internal server error | | + | `503` | Service unavailable | Server is temporarily unavailable to process the request. The `Retry-After` header describes when to try the request again. | + name: Response codes + x-traitTag: true + - name: System information endpoints + - name: Usage + - description: | + Write time series data to [databases](/influxdb/cloud-dedicated/admin/databases/). + name: Write +x-tagGroups: + - name: Using the InfluxDB HTTP API + tags: + - Quick start + - Authentication + - Headers + - Response codes + - name: All endpoints + tags: + - Ping + - Query + - Write diff --git a/api-docs/cloud-serverless/content/v1compat/info.yml b/api-docs/cloud-serverless/content/v1compat/info.yml deleted file mode 100644 index fe2a195dc..000000000 --- a/api-docs/cloud-serverless/content/v1compat/info.yml +++ /dev/null @@ -1,11 +0,0 @@ -title: InfluxDB Cloud Serverless v1 compatibility API documentation -description: | - The InfluxDB 1.x compatibility /write and /query endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others. - - If you want to use the latest InfluxDB /api/v2 API instead, see the [InfluxDB v2 API documentation](/influxdb/cloud-iox/api/). - - This documentation is generated from the - [InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/swaggerV1Compat.yml). -license: - name: MIT - url: 'https://opensource.org/licenses/MIT' \ No newline at end of file diff --git a/api-docs/cloud-serverless/ref.yml b/api-docs/cloud-serverless/ref.yml index 313263d83..7532c6abd 100644 --- a/api-docs/cloud-serverless/ref.yml +++ b/api-docs/cloud-serverless/ref.yml @@ -6726,8 +6726,8 @@ info: title: InfluxDB Cloud (IOx) API Service version: Cloud 2.x description: | - The InfluxDB HTTP API provides a programmatic interface for all interactions with InfluxDB. - Access the InfluxDB API using the `/api/v2/` endpoint. + The InfluxDB HTTP API provides a programmatic interface for interactions with InfluxDB. + Access the InfluxDB API using the `/api/v2/` endpoint or InfluxDB v1 endpoints. This documentation is generated from the [InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/ref/cloud.yml). @@ -15607,7 +15607,7 @@ paths: - url: /private /query: get: - description: Queries InfluxDB using InfluxQL. + description: Queries InfluxDB using InfluxQL with InfluxDB v1 request and response formats. operationId: GetLegacyQuery parameters: - $ref: '#/components/parameters/TraceSpan' @@ -15748,9 +15748,9 @@ paths: schema: $ref: '#/components/schemas/Error' description: Error processing query - summary: Query with the 1.x compatibility API + summary: Query using the InfluxDB v1 API tags: - - Legacy Query + - Query /write: post: operationId: PostLegacyWrite @@ -15848,9 +15848,9 @@ paths: schema: $ref: '#/components/schemas/Error' description: Internal server error - summary: Write time series data into InfluxDB in a V1-compatible format + summary: Write data using the InfluxDB v1 API tags: - - Legacy Write + - Write security: - TokenAuthentication: [] servers: @@ -15984,8 +15984,6 @@ tags: name: Invokable Scripts - name: Labels - name: Legacy Authorizations - - name: Legacy Query - - name: Legacy Write - name: Limits - name: NotificationEndpoints - name: NotificationRules @@ -16036,14 +16034,20 @@ tags: x-traitTag: true - name: Ping - description: | - Retrieve data, analyze queries, and get query suggestions. + Use the InfluxDB v1 and v2 HTTP APIs with Flux, SQL, or InfluxQL to retrieve data, analyze queries, and get query suggestions. + + To get started using Flight and gRPC for querying InfluxDB v3, see the following: + + - [Get started with InfluxDB Cloud Serverless](/influxdb/cloud-serverless/get-started/) + - [Query with Flight SQL](/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/) + - [InfluxDB v3 client libraries and Flight clients](/influxdb/cloud-serverless/reference/client-libraries/) name: Query - description: | - See the [**API Quick Start**](/influxdb/cloud-serverless/api-guide/api_intro/) + See the [**Get started**](/influxdb/cloud-serverless/get-started/) tutorial to get up and running authenticating with tokens, writing to buckets, and querying data. - [**InfluxDB API client libraries**](/influxdb/cloud-serverless/api-guide/client-libraries/) - are available for popular languages and ready to import into your application. + [**InfluxDB API client libraries and Flight clients**](/influxdb/cloud-serverless/reference/client-libraries/) + are available to integrate InfluxDB with your application. name: Quick start x-traitTag: true - name: Resources @@ -16176,8 +16180,6 @@ x-tagGroups: - Delete - DBRPs - Invokable Scripts - - Legacy Query - - Legacy Write - Limits - Organizations - Query diff --git a/api-docs/cloud-serverless/swaggerV1Compat.yml b/api-docs/cloud-serverless/swaggerV1Compat.yml deleted file mode 100644 index c118acbf2..000000000 --- a/api-docs/cloud-serverless/swaggerV1Compat.yml +++ /dev/null @@ -1,432 +0,0 @@ -openapi: 3.0.0 -info: - title: InfluxDB Cloud (IOx) v1 compatibility API documentation - version: 0.1.0 - description: | - The InfluxDB 1.x compatibility /write and /query endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others. - - If you want to use the latest InfluxDB /api/v2 API instead, see the [InfluxDB v2 API documentation](/influxdb/cloud-serverless/api/). - - This documentation is generated from the - [InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/swaggerV1Compat.yml). - license: - name: MIT - url: https://opensource.org/licenses/MIT -servers: - - url: / -paths: - /write: - post: - operationId: PostWriteV1 - tags: - - Write - summary: Write time series data into InfluxDB in a V1-compatible format - requestBody: - description: Line protocol body - required: true - content: - text/plain: - schema: - type: string - parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/AuthUserV1' - - $ref: '#/components/parameters/AuthPassV1' - - in: query - name: db - schema: - type: string - required: true - description: Bucket to write to. If none exists, InfluxDB creates a bucket with a default 3-day retention policy. - - in: query - name: rp - schema: - type: string - description: Retention policy name. - - in: query - name: precision - schema: - type: string - description: Write precision. - - in: header - name: Content-Encoding - description: When present, its value indicates to the database that compression is applied to the line protocol body. - schema: - type: string - description: Specifies that the line protocol in the body is encoded with gzip or not encoded with identity. - default: identity - enum: - - gzip - - identity - responses: - '204': - description: Write data is correctly formatted and accepted for writing to the bucket. - '400': - description: Line protocol poorly formed and no points were written. Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written. - content: - application/json: - schema: - $ref: '#/components/schemas/LineProtocolError' - '401': - description: Token does not have sufficient permissions to write to this organization and bucket or the organization and bucket do not exist. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '403': - description: No token was sent and they are required. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '413': - description: Write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written. - content: - application/json: - schema: - $ref: '#/components/schemas/LineProtocolLengthError' - '429': - description: Token is temporarily over quota. The Retry-After header describes when to try the write again. - headers: - Retry-After: - description: A non-negative decimal integer indicating the seconds to delay after the response is received. - schema: - type: integer - format: int32 - '503': - description: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again. - headers: - Retry-After: - description: A non-negative decimal integer indicating the seconds to delay after the response is received. - schema: - type: integer - format: int32 - default: - description: Internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - /query: - post: - operationId: PostQueryV1 - tags: - - Query - summary: Query InfluxDB in a V1 compatible format - requestBody: - description: InfluxQL query to execute. - content: - text/plain: - schema: - type: string - parameters: - - $ref: '#/components/parameters/TraceSpan' - - $ref: '#/components/parameters/AuthUserV1' - - $ref: '#/components/parameters/AuthPassV1' - - in: header - name: Accept - schema: - type: string - description: Specifies how query results should be encoded in the response. **Note:** With `application/csv`, query results include epoch timestamps instead of RFC3339 timestamps. - default: application/json - enum: - - application/json - - application/csv - - text/csv - - application/x-msgpack - - in: header - name: Accept-Encoding - description: The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand. - schema: - type: string - description: Specifies that the query response in the body should be encoded with gzip or not encoded with identity. - default: identity - enum: - - gzip - - identity - - in: header - name: Content-Type - schema: - type: string - enum: - - application/vnd.influxql - - in: query - name: db - schema: - type: string - required: true - description: Bucket to query. - - in: query - name: rp - schema: - type: string - description: Retention policy name. - - in: query - name: q - description: Defines the influxql query to run. - schema: - type: string - responses: - '200': - description: Query results - headers: - Content-Encoding: - description: The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body - schema: - type: string - description: Specifies that the response in the body is encoded with gzip or not encoded with identity. - default: identity - enum: - - gzip - - identity - Trace-Id: - description: The Trace-Id header reports the request's trace ID, if one was generated. - schema: - type: string - description: Specifies the request's trace ID. - content: - application/csv: - schema: - $ref: '#/components/schemas/InfluxQLCSVResponse' - text/csv: - schema: - $ref: '#/components/schemas/InfluxQLCSVResponse' - application/json: - schema: - $ref: '#/components/schemas/InfluxQLResponse' - application/x-msgpack: - schema: - type: string - format: binary - '429': - description: Token is temporarily over quota. The Retry-After header describes when to try the read again. - headers: - Retry-After: - description: A non-negative decimal integer indicating the seconds to delay after the response is received. - schema: - type: integer - format: int32 - default: - description: Error processing query - content: - application/json: - schema: - $ref: '#/components/schemas/Error' -components: - parameters: - TraceSpan: - in: header - name: Zap-Trace-Span - description: OpenTracing span context - example: - trace_id: '1' - span_id: '1' - baggage: - key: value - required: false - schema: - type: string - AuthUserV1: - in: query - name: u - required: false - schema: - type: string - description: Username. - AuthPassV1: - in: query - name: p - required: false - schema: - type: string - description: User token. - schemas: - InfluxQLResponse: - properties: - results: - type: array - oneOf: - - required: - - statement_id - - error - - required: - - statement_id - - series - items: - type: object - properties: - statement_id: - type: integer - error: - type: string - series: - type: array - items: - type: object - properties: - name: - type: string - tags: - type: object - additionalProperties: - type: string - partial: - type: boolean - columns: - type: array - items: - type: string - values: - type: array - items: - type: array - items: {} - InfluxQLCSVResponse: - type: string - example: | - name,tags,time,test_field,test_tag test_measurement,,1603740794286107366,1,tag_value test_measurement,,1603740870053205649,2,tag_value test_measurement,,1603741221085428881,3,tag_value - Error: - properties: - code: - description: Code is the machine-readable error code. - readOnly: true - type: string - enum: - - internal error - - not found - - conflict - - invalid - - unprocessable entity - - empty value - - unavailable - - forbidden - - too many requests - - unauthorized - - method not allowed - message: - readOnly: true - description: Message is a human-readable message. - type: string - required: - - code - - message - LineProtocolError: - properties: - code: - description: Code is the machine-readable error code. - readOnly: true - type: string - enum: - - internal error - - not found - - conflict - - invalid - - empty value - - unavailable - message: - readOnly: true - description: Message is a human-readable message. - type: string - op: - readOnly: true - description: Op describes the logical code operation during error. Useful for debugging. - type: string - err: - readOnly: true - description: Err is a stack of errors that occurred during processing of the request. Useful for debugging. - type: string - line: - readOnly: true - description: First line within sent body containing malformed data - type: integer - format: int32 - required: - - code - - message - - op - - err - LineProtocolLengthError: - properties: - code: - description: Code is the machine-readable error code. - readOnly: true - type: string - enum: - - invalid - message: - readOnly: true - description: Message is a human-readable message. - type: string - maxLength: - readOnly: true - description: Max length in bytes for a body of line-protocol. - type: integer - format: int32 - required: - - code - - message - - maxLength - securitySchemes: - TokenAuthentication: - type: apiKey - name: Authorization - in: header - description: | - Use the [Token authentication](#section/Authentication/TokenAuthentication) - scheme to authenticate to the InfluxDB API. - - - In your API requests, send an `Authorization` header. - For the header value, provide the word `Token` followed by a space and an InfluxDB API token. - The word `Token` is case-sensitive. - - - ### Syntax - - `Authorization: Token YOUR_INFLUX_TOKEN` - - - For examples and more information, see the following: - - [`/authorizations`](#tag/Authorizations) endpoint. - - [Authorize API requests](/influxdb/cloud/api-guide/api_intro/#authentication). - - [Manage API tokens](/influxdb/cloud/security/tokens/). - BasicAuthentication: - type: http - scheme: basic - description: | - Use the HTTP [Basic authentication](#section/Authentication/BasicAuthentication) - scheme with clients that support the InfluxDB 1.x convention of username and password (that don't support the `Authorization: Token` scheme): - - - For examples and more information, see how to [authenticate with a username and password](/influxdb/cloud/reference/api/influxdb-1x/). - QuerystringAuthentication: - type: apiKey - in: query - name: u=&p= - description: | - Use the [Querystring authentication](#section/Authentication/QuerystringAuthentication) - scheme with InfluxDB 1.x API parameters to provide credentials through the query string. - - - For examples and more information, see how to [authenticate with a username and password](/influxdb/cloud/reference/api/influxdb-1x/). -security: - - TokenAuthentication: [] - - BasicAuthentication: [] - - QuerystringAuthentication: [] -tags: - - name: Authentication - description: | - The InfluxDB 1.x API requires authentication for all requests. - InfluxDB Cloud uses InfluxDB API tokens to authenticate requests. - - - For more information, see the following: - - [Token authentication](#section/Authentication/TokenAuthentication) - - [Basic authentication](#section/Authentication/BasicAuthentication) - - [Querystring authentication](#section/Authentication/QuerystringAuthentication) - - - x-traitTag: true - - name: Query - - name: Write -x-tagGroups: [] diff --git a/api-docs/cloud/ref.yml b/api-docs/cloud/ref.yml index 21e485a41..cf6f16b47 100644 --- a/api-docs/cloud/ref.yml +++ b/api-docs/cloud/ref.yml @@ -12389,10 +12389,6 @@ paths: Use this endpoint to monitor uptime for the InfluxDB instance. The response returns a HTTP `204` status code to inform you the instance is available. - #### InfluxDB Cloud - - - Isn't versioned and doesn't return `X-Influxdb-Version` in the headers. - #### Related guides - [Influx ping](/influxdb/cloud/reference/cli/influx/ping/) @@ -12411,9 +12407,6 @@ paths: X-Influxdb-Version: description: | The version of InfluxDB. - - #### InfluxDB Cloud - - Doesn't return version. schema: type: integer servers: [] @@ -12421,11 +12414,6 @@ paths: tags: - Ping - System information endpoints - x-codeSamples: - - label: cURL - lang: Shell - source: | - curl --request GET "http://localhost:8086/ping" head: description: | Returns the status and InfluxDB version of the instance. @@ -12433,10 +12421,6 @@ paths: Use this endpoint to monitor uptime for the InfluxDB instance. The response returns a HTTP `204` status code to inform you the instance is available. - #### InfluxDB Cloud - - - Isn't versioned and doesn't return `X-Influxdb-Version` in the headers. - #### Related guides - [Influx ping](/influxdb/cloud/reference/cli/influx/ping/) @@ -12454,20 +12438,12 @@ paths: X-Influxdb-Version: description: | The version of InfluxDB. - - #### InfluxDB Cloud - - Doesn't return version. schema: type: integer servers: [] summary: Get the status of the instance tags: - Ping - x-codeSamples: - - label: cURL - lang: Shell - source: | - curl --request HEAD "http://localhost:8086/ping" /api/v2/query: post: description: | diff --git a/api-docs/generate-api-docs.sh b/api-docs/generate-api-docs.sh index 207946f8a..9475d5b09 100755 --- a/api-docs/generate-api-docs.sh +++ b/api-docs/generate-api-docs.sh @@ -146,20 +146,23 @@ weight: 304 # If the v1 compatibility spec file differs from master, regenerate the HTML. filePath="${version}/swaggerV1Compat.yml" update=0 - if [[ $generate_changed == 0 ]]; then - fileChanged=$(git diff --name-status master -- ${filePath}) - if [[ -z "$fileChanged" ]]; then - update=1 + + if [ -e "$filePath" ]; then + if [[ $generate_changed == 0 ]]; then + fileChanged=$(git diff --name-status master -- ${filePath}) + if [[ -z "$fileChanged" ]]; then + update=1 + fi + fi + + if [[ $update -eq 0 ]]; then + outFilename="v1-compatibility" + titleSubmodule="v1 compatibility" + generateHtml $filePath $outFilename $titleVersion $titleSubmodule + + # Create temp file with frontmatter and Redoc html + echo "$v1compatfrontmatter" >> $version$outFilename.tmp + buildHugoTemplate $version v1 $outFilename fi fi - - if [[ $update -eq 0 ]]; then - outFilename="v1-compatibility" - titleSubmodule="v1 compatibility" - generateHtml $filePath $outFilename $titleVersion $titleSubmodule - - # Create temp file with frontmatter and Redoc html - echo "$v1compatfrontmatter" >> $version$outFilename.tmp - buildHugoTemplate $version v1 $outFilename - fi done diff --git a/api-docs/getswagger.sh b/api-docs/getswagger.sh index d9c2108a7..64c2e7d9e 100755 --- a/api-docs/getswagger.sh +++ b/api-docs/getswagger.sh @@ -41,6 +41,8 @@ function showHelp { echo " With optional arguments:" echo " ./getswagger.sh -b -V" echo " ./getswagger.sh cloud" + echo " ./getswagger.sh cloud-dedicated" + echo " ./getswagger.sh cloud-serverless" echo " ./getswagger.sh oss -o -V" echo " ./getswagger.sh all -o " echo "Commands:" @@ -57,7 +59,7 @@ function showHelp { subcommand=$1 case "$subcommand" in - cloud-iox|cloud|oss|v1compat|all) + cloud-dedicated|cloud-serverless|cloud|oss|v1compat|all) platform=$1 shift @@ -132,10 +134,16 @@ function updateCloud { postProcess $outFile cloud } -function updateCloudIOx { - outFile="cloud-iox/ref.yml" +function updateCloudDedicated { + outFile="cloud-dedicated/ref.yml" curl $UPDATE_OPTIONS ${baseUrl}/contracts/ref/cloud.yml -o $outFile - postProcess $outFile cloud-iox + postProcess $outFile cloud-dedicated +} + +function updateCloudServerless { + outFile="cloud-serverless/ref.yml" + curl $UPDATE_OPTIONS ${baseUrl}/contracts/ref/cloud.yml -o $outFile + postProcess $outFile cloud-serverless } function updateOSS { @@ -167,9 +175,12 @@ fi if [ "$platform" = "cloud" ]; then updateCloud -elif [ "$platform" = "cloud-iox" ]; +elif [ "$platform" = "cloud-dedicated" ]; then - updateCloudIOx + updateCloudDedicated +elif [ "$platform" = "cloud-serverless" ]; +then + updateCloudServerless elif [ "$platform" = "oss" ]; then updateOSS @@ -179,7 +190,8 @@ then elif [ "$platform" = "all" ]; then updateCloud - updateCloudIOx + updateCloudDedicated + updateCloudServerless updateOSS updateV1Compat else diff --git a/api-docs/openapi/plugins/docs-content.js b/api-docs/openapi/plugins/docs-content.js index 6cbc764e7..6855a179f 100644 --- a/api-docs/openapi/plugins/docs-content.js +++ b/api-docs/openapi/plugins/docs-content.js @@ -2,7 +2,7 @@ const path = require('path'); const { toJSON } = require('./helpers/content-helper'); function getVersioned(filename) { - const apiDocsRoot=path.resolve(process.env.API_DOCS_ROOT_PATH); + const apiDocsRoot=path.resolve(process.env.API_DOCS_ROOT_PATH || process.cwd()); const contentPath = path.join(apiDocsRoot, process.env.INFLUXDB_PLATFORM, 'content'); return toJSON(path.join(contentPath, (process.env.INFLUXDB_API_VERSION || ''), filename)); diff --git a/content/influxdb/cloud-dedicated/reference/api/_index.md b/content/influxdb/cloud-dedicated/reference/api/_index.md new file mode 100644 index 000000000..11d922f66 --- /dev/null +++ b/content/influxdb/cloud-dedicated/reference/api/_index.md @@ -0,0 +1,22 @@ +--- +title: InfluxDB HTTP API +description: > + The InfluxDB HTTP API provides a programmatic interface for interactions with InfluxDB. + Access the InfluxDB API using the `/api/v2/` endpoint or InfluxDB v1 endpoints. +menu: + influxdb_cloud_dedicated: + parent: Reference + name: InfluxDB HTTP API +weight: 104 +influxdb/cloud-dedicated/tags: [api] +aliases: + - /influxdb/cloud-dedicated/api/v1-compatibility/ +--- + +The InfluxDB HTTP API provides a programmatic interface for interactions with InfluxDB. + +## InfluxDB HTTP API reference + +InfluxDB Cloud Dedicated HTTP API reference + +The API reference describes requests and responses for `/api/v2/` endpoints and v1 `/query` and `/write` endpoints. \ No newline at end of file diff --git a/content/influxdb/cloud-serverless/reference/api/_index.md b/content/influxdb/cloud-serverless/reference/api/_index.md index f77db082a..e41eee325 100644 --- a/content/influxdb/cloud-serverless/reference/api/_index.md +++ b/content/influxdb/cloud-serverless/reference/api/_index.md @@ -2,24 +2,21 @@ title: InfluxDB HTTP API description: > The InfluxDB HTTP API provides a programmatic interface for interactions with InfluxDB. - Access the InfluxDB API using the `/api/v2/` endpoint. + Access the InfluxDB API using the `/api/v2/` endpoint or InfluxDB v1 endpoints. menu: influxdb_cloud_serverless: parent: Reference name: InfluxDB HTTP API weight: 104 influxdb/cloud-serverless/tags: [api] +aliases: + - /influxdb/cloud-serverless/api/v1-compatibility/ --- The InfluxDB HTTP API provides a programmatic interface for interactions with InfluxDB. -Access the InfluxDB HTTP API using the `/api/v2/` endpoint. -## InfluxDB HTTP API documentation -InfluxDB Cloud Serverless HTTP API documentation +## InfluxDB HTTP API reference -## InfluxDB v1 compatibility API documentation -The InfluxDB HTTP API includes InfluxDB 1.x compatibility endpoints -that work with InfluxDB 1.x client libraries and third-party integrations like -[Grafana](https://grafana.com) and others. +InfluxDB Cloud Serverless HTTP API reference -InfluxDB Cloud Serverless v1 compatibility HTTP API documentation +The API reference describes requests and responses for `/api/v2/` endpoints and v1 `/query` and `/write` endpoints.