InfluxData Data I/O endpoints API

The Data I/O endpoints API from InfluxData — 6 operation(s) for data i/o endpoints.

OpenAPI Specification

influxdata-data-i-o-endpoints-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: InfluxDB Cloud API Service Authorizations (API tokens) Authorizations (API tokens) Data I/O endpoints API
  version: 2.0.1
  description: 'The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.

    '
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
- url: /api/v2
security:
- TokenAuthentication: []
tags:
- name: Data I/O endpoints
paths:
  /write:
    post:
      operationId: PostWrite
      tags:
      - Data I/O endpoints
      summary: Write data
      description: "Writes data to a bucket.\n\nUse this endpoint to send data in [line protocol](https://docs.influxdata.com/influxdb/cloud/reference/syntax/line-protocol/) format to InfluxDB.\n\n#### InfluxDB Cloud\n\n- Does the following when you send a write request:\n\n  1. Validates the request and queues the write.\n  2. If queued, responds with _success_ (HTTP `2xx` status code); _error_ otherwise.\n  3. Handles the delete asynchronously and reaches eventual consistency.\n\n  To ensure that InfluxDB Cloud handles writes and deletes in the order you request them,\n  wait for a success response (HTTP `2xx` status code) before you send the next request.\n\n  Because writes and deletes are asynchronous, your change might not yet be readable\n  when you receive the response.\n\n#### InfluxDB OSS\n\n- Validates the request and handles the write synchronously.\n- If all points were written successfully, responds with HTTP `2xx` status code;\n  otherwise, returns the first line that failed.\n\n#### Required permissions\n\n- `write-buckets` or `write-bucket BUCKET_ID`.\n\n *`BUCKET_ID`* is the ID of the destination bucket.\n\n#### Rate limits (with InfluxDB Cloud)\n\n`write` rate limits apply.\nFor more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/).\n\n#### Related guides\n\n- [Write data with the InfluxDB API](https://docs.influxdata.com/influxdb/cloud/write-data/developer-tools/api)\n- [Optimize writes to InfluxDB](https://docs.influxdata.com/influxdb/cloud/write-data/best-practices/optimize-writes/)\n- [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/cloud/write-data/troubleshoot/)\n"
      requestBody:
        description: "In the request body, provide data in [line protocol format](https://docs.influxdata.com/influxdb/cloud/reference/syntax/line-protocol/).\n\nTo send compressed data, do the following:\n\n  1. Use [GZIP](https://www.gzip.org/) to compress the line protocol data.\n  2. In your request, send the compressed data and the\n     `Content-Encoding: gzip` header.\n\n#### Related guides\n\n- [Best practices for optimizing writes](https://docs.influxdata.com/influxdb/cloud/write-data/best-practices/optimize-writes/)\n"
        required: true
        content:
          text/plain:
            schema:
              type: string
              format: byte
            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

                  '
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      - in: header
        name: Content-Encoding
        description: 'The compression applied to the line protocol in the request payload.

          To send a GZIP payload, pass `Content-Encoding: gzip` header.

          '
        schema:
          type: string
          description: 'Content coding.

            Use `gzip` for compressed data or `identity` for unmodified, uncompressed data.

            '
          default: identity
          enum:
          - gzip
          - identity
      - in: header
        name: Content-Type
        description: 'The format of the data in the request body.

          To send a line protocol payload, pass `Content-Type: text/plain; charset=utf-8`.

          '
        schema:
          type: string
          description: '`text/plain` is the content type for line protocol. `UTF-8` is the default character set.

            '
          default: text/plain; charset=utf-8
          enum:
          - text/plain
          - text/plain; charset=utf-8
      - in: header
        name: Content-Length
        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`.

          '
        schema:
          type: integer
          description: The length in decimal number of octets.
      - in: header
        name: Accept
        description: "The content type that the client can understand.\nWrites only return a response body if they fail--for example,\ndue to a formatting problem or quota limit.\n\n#### InfluxDB Cloud\n\n  - Returns only `application/json` for format and limit errors.\n  - Returns only `text/html` for some quota limit errors.\n\n#### InfluxDB OSS\n\n  - Returns only `application/json` for format and limit errors.\n\n#### Related guides\n\n- [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/cloud/write-data/troubleshoot/)\n"
        schema:
          type: string
          description: Error content type.
          default: application/json
          enum:
          - application/json
      - in: query
        name: org
        description: "An organization name or ID.\n\n#### InfluxDB Cloud\n\n- Doesn't use the `org` parameter or `orgID` parameter.\n- Writes data to the bucket in the organization\n  associated with the authorization (API token).\n\n#### InfluxDB OSS\n\n- Requires either the `org` parameter or the `orgID` parameter.\n- If you pass both `orgID` and `org`, they must both be valid.\n- Writes data to the bucket in the specified organization.\n"
        required: true
        schema:
          type: string
          description: The organization name or ID.
      - in: query
        name: orgID
        description: "An organization ID.\n\n#### InfluxDB Cloud\n\n- Doesn't use the `org` parameter or `orgID` parameter.\n- Writes data to the bucket in the organization\n  associated with the authorization (API token).\n\n#### InfluxDB OSS\n\n- Requires either the `org` parameter or the `orgID` parameter.\n- If you pass both `orgID` and `org`, they must both be valid.\n- Writes data to the bucket in the specified organization.\n"
        schema:
          type: string
      - in: query
        name: bucket
        description: 'A bucket name or ID.

          InfluxDB writes all points in the batch to the specified bucket.

          '
        required: true
        schema:
          type: string
          description: The bucket name or ID.
      - in: query
        name: precision
        description: The precision for unix timestamps in the line protocol batch.
        schema:
          $ref: '#/components/schemas/WritePrecision'
      responses:
        '204':
          description: 'Success.


            #### InfluxDB Cloud


            - Validated and queued the request.

            - Handles the write asynchronously - the write might not have completed yet.


            #### InfluxDB OSS


            - Successfully wrote all points in the batch.


            #### Related guides


            - [How to check for write errors](https://docs.influxdata.com/influxdb/cloud/write-data/troubleshoot/)

            '
        '400':
          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.

            For more information, check the `rejected_points` measurement in your `_monitoring` bucket.


            #### InfluxDB Cloud


            - Returns this error for bucket schema conflicts.


            #### InfluxDB OSS


            - Returns this error if the `org` parameter or `orgID` parameter doesn''t match an organization.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineProtocolError'
              examples:
                measurementSchemaFieldTypeConflict:
                  summary: (Cloud) field type conflict thrown by an explicit bucket 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'
        '401':
          $ref: '#/components/responses/AuthorizationError'
        '404':
          $ref: '#/components/responses/ResourceNotFoundError'
        '413':
          description: "The request payload is too large.\nInfluxDB rejected the batch and did not write any data.\n\n#### InfluxDB Cloud:\n\n - Returns this error if the payload exceeds the 50MB size limit.\n - Returns `Content-Type: text/html` for this error.\n\n#### InfluxDB OSS:\n\n - Returns this error only if the [Go (golang) `ioutil.ReadAll()`](https://pkg.go.dev/io/ioutil#ReadAll) function raises an error.\n - Returns `Content-Type: application/json` for this error.\n"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineProtocolLengthError'
              examples:
                dataExceedsSizeLimitOSS:
                  summary: InfluxDB OSS response
                  value: '{"code":"request too large","message":"unable to read data: points batch is too large"}

                    '
            text/html:
              schema:
                type: string
              examples:
                dataExceedsSizeLimit:
                  summary: InfluxDB Cloud response
                  value: "<html>\n  <head><title>413 Request Entity Too Large</title></head>\n  <body>\n    <center><h1>413 Request Entity Too Large</h1></center>\n    <hr>\n    <center>nginx</center>\n  </body>\n</html>\n"
        '429':
          description: "Too many requests.\n\n#### InfluxDB Cloud\n\n  - Returns this error if a **read** or **write** request exceeds your plan's [adjustable service quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/#adjustable-service-quotas)\n    or if a **delete** request exceeds the maximum [global limit](https://docs.influxdata.com/influxdb/cloud/account-management/limits/#global-limits).\n  - For rate limits that reset automatically, returns a `Retry-After` header that describes when to try the write again.\n  - For limits that can't reset (for example, **cardinality limit**), doesn't return a `Retry-After` header.\n\n  Rates (data-in (writes), queries (reads), and deletes) accrue within a fixed five-minute window.\n  Once a rate limit is exceeded, InfluxDB returns an error response until the current five-minute window resets.\n\n#### InfluxDB OSS\n\n  - Doesn't return this error.\n"
          headers:
            Retry-After:
              description: Non-negative decimal integer indicating seconds to wait before retrying the request.
              schema:
                type: integer
                format: int32
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          description: "Service unavailable.\n\n- Returns this error if\n  the server is temporarily unavailable to accept writes.\n- Returns a `Retry-After` header that describes when to try the write again.\n"
          headers:
            Retry-After:
              description: Non-negative decimal integer indicating seconds to wait before retrying the request.
              schema:
                type: integer
                format: int32
        default:
          $ref: '#/components/responses/GeneralServerError'
  /delete:
    post:
      operationId: PostDelete
      tags:
      - Data I/O endpoints
      summary: Delete data
      description: "Deletes data from a bucket.\n\nUse this endpoint to delete points from a bucket in a specified time range.\n\n#### InfluxDB Cloud\n\n- Does the following when you send a delete request:\n\n  1. Validates the request and queues the delete.\n  2. If queued, responds with _success_ (HTTP `2xx` status code); _error_ otherwise.\n  3. Handles the delete asynchronously and reaches eventual consistency.\n\nTo ensure that InfluxDB Cloud handles writes and deletes in the order you request them,\nwait for a success response (HTTP `2xx` status code) before you send the next request.\n\nBecause writes and deletes are asynchronous, your change might not yet be readable\nwhen you receive the response.\n\n#### InfluxDB OSS\n\n- Validates the request, handles the delete synchronously,\n  and then responds with success or failure.\n\n#### Required permissions\n\n- `write-buckets` or `write-bucket BUCKET_ID`.\n\n*`BUCKET_ID`* is the ID of the destination bucket.\n\n#### Rate limits (with InfluxDB Cloud)\n\n`write` rate limits apply.\nFor more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/).\n\n#### Related guides\n\n- [Delete data](https://docs.influxdata.com/influxdb/cloud/write-data/delete-data/)\n- Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/cloud/reference/syntax/delete-predicate/).\n- Learn how InfluxDB handles [deleted tags](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys/)\n  and [deleted fields](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementfieldkeys/).\n"
      x-codeSamples:
      - lang: Shell
        label: cURL
        source: "curl --request POST INFLUX_URL/api/v2/delete?org=INFLUX_ORG&bucket=INFLUX_BUCKET \\\n  --header 'Authorization: Token INFLUX_API_TOKEN' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n    \"start\": \"2020-03-01T00:00:00Z\",\n    \"stop\": \"2020-11-14T00:00:00Z\",\n    \"predicate\": \"tag1=\\\"value1\\\" and (tag2=\\\"value2\\\" and tag3!=\\\"value3\\\")\"\n  }'\n"
      requestBody:
        description: 'Time range parameters and an optional **delete predicate expression**.


          To select points to delete within the specified time range, pass a

          **delete predicate expression** in the `predicate` property of the request body.

          If you don''t pass a `predicate`, InfluxDB deletes all data with timestamps

          in the specified time range.


          #### Related guides


          - [Delete data](https://docs.influxdata.com/influxdb/cloud/write-data/delete-data/)

          - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/cloud/reference/syntax/delete-predicate/).

          '
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeletePredicateRequest'
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      - in: query
        name: org
        description: "An organization name or ID.\n\n#### InfluxDB Cloud\n\n- Doesn't use the `org` parameter or `orgID` parameter.\n- Deletes data from the bucket in the organization\n  associated with the authorization (API token).\n\n#### InfluxDB OSS\n\n- Requires either the `org` parameter or the `orgID` parameter.\n- Deletes data from the bucket in the specified organization.\n- If you pass both `orgID` and `org`, they must both be valid.\n"
        schema:
          type: string
          description: The organization name or ID.
      - in: query
        name: bucket
        description: 'A bucket name or ID.

          Specifies the bucket to delete data from.

          If you pass both `bucket` and `bucketID`, `bucketID` takes precedence.

          '
        schema:
          type: string
          description: The bucket name or ID.
      - in: query
        name: orgID
        description: "An organization ID.\n\n#### InfluxDB Cloud\n\n- Doesn't use the `org` parameter or `orgID` parameter.\n- Deletes data from the bucket in the organization\n  associated with the authorization (API token).\n\n#### InfluxDB OSS\n\n- Requires either the `org` parameter or the `orgID` parameter.\n- Deletes data from the bucket in the specified organization.\n- If you pass both `orgID` and `org`, they must both be valid.\n"
        schema:
          type: string
          description: The organization ID.
      - in: query
        name: bucketID
        description: 'A bucket ID.

          Specifies the bucket to delete data from.

          If you pass both `bucket` and `bucketID`, `bucketID` takes precedence.

          '
        schema:
          type: string
          description: The bucket ID.
      responses:
        '204':
          description: 'Success.


            #### InfluxDB Cloud


            - Validated and queued the request.

            - Handles the delete asynchronously - the deletion might not have completed yet.


            An HTTP `2xx` status code acknowledges that the write or delete is queued.

            To ensure that InfluxDB Cloud handles writes and deletes in the order you request them,

            wait for a response before you send the next request.


            Because writes are asynchronous, data might not yet be written

            when you receive the response.


            #### InfluxDB OSS


            - Deleted the data.

            '
        '400':
          description: 'Bad request.

            The response body contains detail about the error.


            #### InfluxDB OSS


            - Returns this error if the `org` parameter or `orgID` parameter doesn''t match an organization.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                orgNotFound:
                  summary: Organization not found
                  value:
                    code: invalid
                    message: 'failed to decode request body: organization not found'
        '401':
          $ref: '#/components/responses/AuthorizationError'
        '404':
          $ref: '#/components/responses/ResourceNotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/GeneralServerError'
  /query:
    post:
      operationId: PostQuery
      tags:
      - Data I/O endpoints
      summary: Query data
      description: 'Retrieves data from buckets.


        Use this endpoint to send a Flux query request and retrieve data from a bucket.


        #### Rate limits (with InfluxDB Cloud)


        `read` rate limits apply.

        For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/).


        #### Related guides


        - [Query with the InfluxDB API](https://docs.influxdata.com/influxdb/cloud/query-data/execute-queries/influx-api/)

        - [Get started with Flux](https://docs.influxdata.com/flux/v0.x/get-started/)

        '
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      - in: header
        name: Accept-Encoding
        description: The content encoding (usually a compression algorithm) that the client can understand.
        schema:
          type: string
          description: The content coding.  Use `gzip` for compressed data or `identity` for unmodified, uncompressed data.
          default: identity
          enum:
          - gzip
          - identity
      - in: header
        name: Content-Type
        schema:
          type: string
          enum:
          - application/json
          - application/vnd.flux
      - in: query
        name: org
        description: 'An organization name or ID.


          #### InfluxDB Cloud


          - Doesn''t use the `org` parameter or `orgID` parameter.

          - Queries the bucket in the organization associated with the authorization (API token).


          #### InfluxDB OSS


          - Requires either the `org` parameter or `orgID` parameter.

          - Queries the bucket in the specified organization.

          '
        schema:
          type: string
      - in: query
        name: orgID
        description: 'An organization ID.


          #### InfluxDB Cloud


          - Doesn''t use the `org` parameter or `orgID` parameter.

          - Queries the bucket in the organization associated with the authorization (API token).


          #### InfluxDB OSS


          - Requires either the `org` parameter or `orgID` parameter.

          - Queries the bucket in the specified organization.

          '
        schema:
          type: string
      x-codeSamples:
      - lang: Shell
        label: cURL
        source: "curl --request POST 'INFLUX_URL/api/v2/query?org=INFLUX_ORG' \\\n--header 'Content-Type: application/vnd.flux' \\\n--header 'Accept: application/csv \\\n--header 'Authorization: Token INFLUX_API_TOKEN' \\\n--data 'from(bucket: \"example-bucket\")\n          |> range(start: -5m)\n          |> filter(fn: (r) => r._measurement == \"example-measurement\")'\n"
      requestBody:
        description: Flux query or specification to execute
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Query'
          application/vnd.flux:
            schema:
              type: string
            example: "from(bucket: \"example-bucket\")\n    |> range(start: -5m)\n    |> filter(fn: (r) => r._measurement == \"example-measurement\")\n"
      responses:
        '200':
          description: Success. The response body contains query results.
          headers:
            Content-Encoding:
              description: Lists encodings (usually compression algorithms) that have been applied to the response payload.
              schema:
                type: string
                description: 'The content coding: `gzip` for compressed data or `identity` for unmodified, uncompressed data.

                  '
                default: identity
                enum:
                - gzip
                - identity
            Trace-Id:
              description: The trace ID, if generated, of the request.
              schema:
                type: string
                description: Trace ID of a request.
          content:
            application/csv:
              schema:
                type: string
              example: 'result,table,_start,_stop,_time,region,host,_value

                mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:00Z,east,A,15.43

                mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:20Z,east,B,59.25

                mean,0,2018-05-08T20:50:00Z,2018-05-08T20:51:00Z,2018-05-08T20:50:40Z,east,C,52.62

                '
        '400':
          description: 'Bad request.

            The response body contains detail about the error.


            #### InfluxDB OSS


            - Returns this error if the `org` parameter or `orgID` parameter doesn''t match an organization.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                orgNotFound:
                  summary: Organization not found
                  value:
                    code: invalid
                    message: 'failed to decode request body: organization not found'
        '401':
          $ref: '#/components/responses/AuthorizationError'
        '404':
          $ref: '#/components/responses/ResourceNotFoundError'
        '429':
          description: "#### InfluxDB Cloud:\n  - returns this error if a **read** or **write** request exceeds your\n    plan's [adjustable service quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/#adjustable-service-quotas)\n    or if a **delete** request exceeds the maximum\n    [global limit](https://docs.influxdata.com/influxdb/cloud/account-management/limits/#global-limits)\n  - returns `Retry-After` header that describes when to try the write again.\n\n#### InfluxDB OSS:\n  - doesn't return this error.\n"
          headers:
            Retry-After:
              description: Non-negative decimal integer indicating seconds to wait before retrying the request.
              schema:
                type: integer
                format: int32
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/GeneralServerError'
  /tasks/{taskID}/runs:
    post:
      operationId: PostTasksIDRuns
      tags:
      - Data I/O endpoints
      summary: Start a task run, overriding the schedule
      description: 'Schedules a task run to start immediately, ignoring scheduled runs.


        Use this endpoint to manually start a task run.

        Scheduled runs will continue to run as scheduled.

        This may result in concurrently running tasks.


        To _retry_ a previous run (and avoid creating a new run),

        use the [`POST /api/v2/tasks/{taskID}/runs/{runID}/retry` endpoint](#operation/PostTasksIDRunsIDRetry).

        '
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      - in: path
        name: taskID
        schema:
          type: string
        required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunManually'
      responses:
        '201':
          description: Success. The run is scheduled to start.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Run'
        '401':
          $ref: '#/components/responses/AuthorizationError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/GeneralServerError'
  /tasks:
    get:
      operationId: GetTasks
      tags:
      - Data I/O endpoints
      summary: List all tasks
      description: 'Retrieves a list of [tasks](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task).


        To limit which tasks are returned, pass query parameters in your request.

        If no query parameters are passed, InfluxDB returns all tasks up to the default `limit`.

        '
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      - in: query
        name: name
        description: 'A [task](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task) name.

          Only returns tasks with the specified name.

          Different tasks may have the same name.

          '
        schema:
          type: string
      - in: query
        name: after
        schema:
          type: string
        description: 'A [task](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task) ID.

          Only returns tasks created after the specified task.

          '
      - in: query
        name: user
        schema:
          type: string
        description: 'A [user](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#user) ID.

          Only returns tasks owned by the specified user.

          '
      - in: query
        name: org
        schema:
          type: string
        description: 'An [organization](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#organization) name.

          Only returns tasks owned by the specified organization.

          '
      - in: query
        name: orgID
        schema:
          type: string
        description: 'An [organization](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#organization) ID.

          Only returns tasks owned by the specified organization.

          '
      - in: query
        name: status
        schema:
          type: string
          enum:
          - active
          - inactive
        description: 'A [task](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task) status.

          Only returns tasks that have the specified status (`active` or `inactive`).

          '
      - in: query
        name: limit
        schema:
          type: integer
          minimum: -1
          maximum: 500
          default: 100
        description: 'The maximum number of [tasks](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task) to return.

          Default is `100`.

          The minimum is `1` and the maximum is `500`.


          To reduce the payload size, combine _`type=basic`_ and _`limit`_ (see _Request samples_).

          For more information about the `basic` response, see the _`type`_ parameter.

          '
        examples:
          minPaginated:
            summary: Return a maximum of 50 tasks.
            value: '50'
          all:
            summary: Return all tasks, without pagination.
            value: '-1'
      - in: query
        name: offset
        required: false
        schema:
          type: integer
          minimum: 0
          default: 0
        description: The number of records to skip.
      - in: query
        name: sortBy
        description: 'The sort field. Only `name` is supported.

          Specifies the field used to sort records in the list.

          '
        required: false
        schema:
          type: string
          enum:
          - name
      - in: query
        name: type
        description: 'A [task](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#task) type (`basic` or `system`).

          Default is `system`.

          Specifies the level of detail for tasks in the response.

          The default (`system`) response contains all the metadata properties for tasks.

          To reduce the response size, pass `basic` to omit some task properties (`flux`, `createdAt`, `updatedAt`).

          '
        required: false
        schema:
          default: ''
          type: string
          enum:
          - basic
          - system
      - in: query
        name: scriptID
        description: 'A [script](#tag/Invokable-Scripts) ID.

          Only returns tasks that use the specified invokable script.

          '
        schema:
          type: string
      responses:
        '200':
          description: 'Success.

            The response body contains the list of tasks.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tasks'
              examples:
                basicTypeTaskOutput:
                  summary: Basic output
                  description: 'A sample response body for the `?type=basic` parameter.

                    `type=basic` omits some task fields (`createdAt` and `updatedAt`)

                    and field values (`org`, `flux`) in the response.

                    '
                  value:
                    links:
                      self: /api/v2/tasks?limit=100
                    tasks:
                    - links:
                        labels: /api/v2/tasks/09956cbb6d378000/labels
                        logs: /api/v2/tasks/09956cbb6d378000/logs
                        members: /api/v2/tasks/09956cbb6d378000/members
                        owners: /api/v2/tasks/09956cbb6d378000/owners
                        runs: /api/v2/tasks/09956cbb6d378000/runs
                        self: /api/v2/tasks/09956cbb6d378000
                      labels: []
                      id: 09956cbb6d378000
                      orgID: 48c88459ee424a04
                      org: ''
                      ownerID: 0772396d1f411000
                      name: task1
                      status: active
                      flux: ''
                      every: 30m
                      latestCompleted: '2022-06-30T15:00:00Z'
                      lastRunStatus: success
                systemTypeTaskOutput:
                  summary: System output
   

# --- truncated at 32 KB (80 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/influxdata/refs/heads/main/openapi/influxdata-data-i-o-endpoints-api-openapi.yml