diff --git a/api-docs/cloud-serverless/v2/ref.yml b/api-docs/cloud-serverless/v2/ref.yml index 7f084bb70..803789b5d 100644 --- a/api-docs/cloud-serverless/v2/ref.yml +++ b/api-docs/cloud-serverless/v2/ref.yml @@ -7639,27 +7639,14 @@ paths: - [Best practices for optimizing writes](/influxdb/cloud-serverless/write-data/best-practices/optimize-writes/) required: true responses: - '201': - description: | - Success ("Created"). Some points in the batch are written and queryable, and some points are rejected. The response body contains details about the [rejected points](/influxdb/cloud-serverless/write-data/troubleshoot/#troubleshoot-rejected-points), up to 100 points. - content: - application/json: - examples: - partialWriteErrorWithRejectedPoints: - summary: Partial write rejects points with syntax errors - value: - code: invalid - line: 2 - message: 'failed to parse line protocol: errors encountered on line(s): error message for first rejected point error message for second rejected point error message for Nth rejected point (up to 100 rejected points)' - schema: - $ref: '#/components/schemas/LineProtocolError' '204': description: Success ("No Content"). All data in the batch is written and queryable. '400': description: | - All data in the batch was rejected and not written. + Data from the batch was rejected and not written. The response body indicates if a partial write occurred or all data was rejected. + If a partial write occurred then some points from the batch are written and queryable. - The response body contains details about the [rejected points](/influxdb/cloud-serverless/write-data/troubleshoot/#troubleshoot-rejected-points). + The response body contains details about the [rejected points](/influxdb/cloud-serverless/write-data/troubleshoot/#troubleshoot-rejected-points), up to 100 points. content: application/json: examples: @@ -7668,7 +7655,13 @@ paths: value: code: invalid line: 2 - message: 'failed to parse line protocol: errors encountered on line(s): error message for first rejected point error message for second rejected point error message for Nth rejected point (up to 100 rejected points)' + message: 'no data written, errors encountered on line(s): error message for first rejected point error message for second rejected point error message for Nth rejected point (up to 100 rejected points)' + partialWriteErrorWithRejectedPoints: + summary: Partial write rejects some points + value: + code: invalid + line: 2 + message: 'partial write has occurred, errors encountered on line(s): error message for first rejected point error message for second rejected point error message for Nth rejected point (up to 100 rejected points)' schema: $ref: '#/components/schemas/LineProtocolError' '401': diff --git a/content/influxdb/cloud-serverless/write-data/troubleshoot.md b/content/influxdb/cloud-serverless/write-data/troubleshoot.md index 1cadf7373..6501a03e0 100644 --- a/content/influxdb/cloud-serverless/write-data/troubleshoot.md +++ b/content/influxdb/cloud-serverless/write-data/troubleshoot.md @@ -31,12 +31,12 @@ Learn how to avoid unexpected results and recover from errors when writing to {{ 1. Validates the request. 2. If successful, attempts to [ingest data](/influxdb/cloud-serverless/reference/internals/durability/#data-ingest) from the request body; otherwise, responds with an [error status](#review-http-status-codes). - 3. Ingests or rejects the entire batch and returns one of the following HTTP status codes: + 3. Ingests or rejects data from the batch and returns one of the following HTTP status codes: - - `204 No Content`: some or all of the data is ingested and queryable - - `400 Bad Request`: all data is rejected + - `204 No Content`: all of the data is ingested and queryable + - `400 Bad Request`: some or all of the data has been rejected. data which has not been rejected is ingested and queryable - If points are rejected, the `204` or `400` response body contains error details about [rejected points](#troubleshoot-rejected-points), up to 100 points. + The response body contains error details about [rejected points](#troubleshoot-rejected-points), up to 100 points. Writes are synchronous--the response status indicates the final status of the write and all ingested data is queryable. @@ -51,9 +51,8 @@ The `message` property of the response body may contain additional details about | HTTP response code | Response body | Description | | :-------------------------------| :--------------------------------------------------------------- | :------------- | -| `201 "Created"` | error details about rejected points, up to 100 points, `line` contains the first rejected line, `message` describes rejections | If some of the data is ingested and some of the data is rejected | | `204 "No Content"` | no response body | If InfluxDB ingested all of the data in the batch | -| `400 "Bad request"` | `line` contains the first malformed line, `message` describes rejected points | If request data isn't allowed (for example, is malformed or falls outside of the bucket's retention period) | +| `400 "Bad request"` | error details about rejected points, up to 100 points: `line` contains the first rejected line, `message` describes rejections | If some or all request data isn't allowed (for example, is malformed or falls outside of the bucket's retention period). The response body indicates if a partial write has occurred or all data has been rejected | | `401 "Unauthorized"` | | If the `Authorization` header is missing or malformed or if the [token](/influxdb/cloud-serverless/admin/tokens/) doesn't have [permission](/influxdb/cloud-serverless/admin/tokens/create-token/) to write to the bucket. See [examples using credentials](/influxdb/cloud-serverless/get-started/write/#write-line-protocol-to-influxdb) in write requests. | | `404 "Not found"` | requested **resource type** (for example, "organization" or "bucket"), and **resource name** | If a requested resource (for example, organization or bucket) wasn't found | | `413 “Request too large”` | cannot read data: points in batch is too large | If a request exceeds the maximum [global limit](/influxdb/cloud-serverless/admin/billing/limits/) |