You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| `201` | Created | Successfully created a resource. The response body may contain details. |
266
-
| `204` | No content | The request succeeded. InfluxDB doesn't typically return a response body for the operation. The [`/write`](#operation/PostLegacyWrite) and [`/api/v2/write`](#operation/PostWrite) endpoints return a response body if some points are written and some are rejected. |
265
+
| `201` | Created | Successfully created a resource. The response body may contain details, for example [`/write`](#operation/PostLegacyWrite) and [`/api/v2/write`](#operation/PostWrite) response bodies contain details of partial write failures. |
266
+
| `204` | No content | The request succeeded. |
267
267
| `400` | Bad request | InfluxDB can't parse the request due to an incorrect parameter or bad syntax. For _writes_, the error may indicate one of the following problems: <ul><li>Line protocol is malformed. The response body contains the first malformed line in the data and indicates what was expected.</li><li>The batch contains a point with the same series as other points, but one of the field values has a different data type.<li>`Authorization` header is missing or malformed or the API token doesn't have permission for the operation.</li></ul> |
268
268
| `401` | Unauthorized | May indicate one of the following: <ul><li>`Authorization: Token` header is missing or malformed</li><li>API token value is missing from the header</li><li>API token doesn't have permission. For more information about token types and permissions, see [Manage API tokens](/influxdb/cloud-serverless/security/tokens/)</li></ul> |
269
269
| `404` | Not found | Requested resource was not found. `message` in the response body provides details about the requested resource. |
@@ -7487,14 +7487,17 @@ paths:
7487
7487
7488
7488
InfluxDB Cloud Serverless does the following when you send a write request:
7489
7489
7490
-
1. Validates the request.
7491
-
2. If successful, attempts to [ingest the data](/influxdb/cloud-serverless/reference/internals/durability/#data-ingest); [error](/influxdb/cloud-serverless/write-data/troubleshoot/#review-http-status-codes) otherwise.
7492
-
3. If some or all points in the batch are written, responds with an HTTP `204 "No Content"` status code, acknowledging that data is written and queryable; error otherwise.
7490
+
1. Validates the request.
7491
+
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](/influxdb/cloud-serverless/write-data/troubleshoot/#review-http-status-codes).
7492
+
3. Ingests or rejects data in the batch and returns one of the following HTTP status codes:
7493
7493
7494
-
- `204 "No Content"`: Data in the batch is written and queryable.
7495
-
- `400 "Bad Request"`: The entire batch is rejected.
7494
+
- `204 No Content`: all data in the batch is ingested
7495
+
- `201 Created`: some points in the batch are ingested and queryable, and some points are rejected
7496
+
- `400 Bad Request`: all data is rejected
7496
7497
7497
-
If some points in the batch are rejected, the response body contains details about the [rejected points](/influxdb/cloud-serverless/write-data/troubleshoot/#troubleshoot-rejected-points).
7498
+
The response body contains error details about [rejected points](/influxdb/cloud-serverless/write-data/troubleshoot/#troubleshoot-rejected-points), up to 100 points.
7499
+
7500
+
Writes are synchronous--the response status indicates the final status of the write and all ingested data is queryable.
7498
7501
7499
7502
To ensure that InfluxDB handles writes in the order you request them,
7500
7503
wait for the response before you send the next request.
@@ -7636,12 +7639,9 @@ paths:
7636
7639
- [Best practices for optimizing writes](/influxdb/cloud-serverless/write-data/best-practices/optimize-writes/)
7637
7640
required: true
7638
7641
responses:
7639
-
'204':
7642
+
'201':
7640
7643
description: |
7641
-
Success.
7642
-
Data in the batch is written and queryable.
7643
-
7644
-
If some points in the batch are rejected, the response body contains details about the [rejected points](/influxdb/cloud-serverless/write-data/troubleshoot/#troubleshoot-rejected-points), up to 100 points.
7644
+
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.
7645
7645
content:
7646
7646
application/json:
7647
7647
examples:
@@ -7653,6 +7653,8 @@ paths:
7653
7653
message: 'failed to parse line protocol: errors encountered on line(s): error message for first rejected point</n> error message for second rejected point</n> error message for Nth rejected point (up to 100 rejected points)'
7654
7654
schema:
7655
7655
$ref: '#/components/schemas/LineProtocolError'
7656
+
'204':
7657
+
description: Success ("No Content"). All data in the batch is written and queryable.
7656
7658
'400':
7657
7659
description: |
7658
7660
All data in the batch was rejected and not written.
@@ -7916,18 +7918,21 @@ paths:
7916
7918
description: |
7917
7919
Writes data to a bucket.
7918
7920
7919
-
Use this endpoint to send data in [line protocol](/influxdb/cloud-serverless/reference/syntax/line-protocol/) format to InfluxDB.
7921
+
Use this endpoint for [InfluxDB v1 parameter compatibility](/influxdb/cloud-serverless/guides/api-compatibility/v1/) when sending data in [line protocol](/influxdb/cloud-serverless/reference/syntax/line-protocol/) format to InfluxDB.
7920
7922
7921
7923
InfluxDB Cloud Serverless does the following when you send a write request:
7922
7924
7923
-
1. Validates the request.
7924
-
2. If successful, attempts to [ingest the data](/influxdb/cloud-serverless/reference/internals/durability/#data-ingest); [error](/influxdb/cloud-serverless/write-data/troubleshoot/#review-http-status-codes) otherwise.
7925
-
3. If some or all points in the batch are written, responds with an HTTP `204 "No Content"` status code, acknowledging that data is written and queryable; error otherwise.
7925
+
1. Validates the request.
7926
+
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](/influxdb/cloud-serverless/write-data/troubleshoot/#review-http-status-codes).
7927
+
3. Ingests or rejects data in the batch and returns one of the following HTTP status codes:
7926
7928
7927
-
- `204 "No Content"`: Data in the batch is written and queryable.
7928
-
- `400 "Bad Request"`: The entire batch is rejected.
7929
+
- `204 No Content`: all data in the batch is ingested
7930
+
- `201 Created`: some points in the batch are ingested and queryable, and some points are rejected
7931
+
- `400 Bad Request`: all data is rejected
7929
7932
7930
-
If some points in the batch are rejected, the response body contains details about the [rejected points](/influxdb/cloud-serverless/write-data/troubleshoot/#troubleshoot-rejected-points).
7933
+
The response body contains error details about [rejected points](/influxdb/cloud-serverless/write-data/troubleshoot/#troubleshoot-rejected-points), up to 100 points.
7934
+
7935
+
Writes are synchronous--the response status indicates the final status of the write and all ingested data is queryable.
7931
7936
7932
7937
To ensure that InfluxDB handles writes in the order you request them,
7933
7938
wait for the response before you send the next request.
@@ -7995,12 +8000,9 @@ paths:
7995
8000
description: Line protocol body
7996
8001
required: true
7997
8002
responses:
7998
-
'204':
8003
+
'201':
7999
8004
description: |
8000
-
Success.
8001
-
Data in the batch is written and queryable.
8002
-
8003
-
If some points in the batch are rejected, the response body contains details about the [rejected points](/influxdb/cloud-serverless/write-data/troubleshoot/#troubleshoot-rejected-points), up to 100 points.
8005
+
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.
8004
8006
content:
8005
8007
application/json:
8006
8008
examples:
@@ -8012,6 +8014,8 @@ paths:
8012
8014
message: 'failed to parse line protocol: errors encountered on line(s): error message for first rejected point</n> error message for second rejected point</n> error message for Nth rejected point (up to 100 rejected points)'
8013
8015
schema:
8014
8016
$ref: '#/components/schemas/LineProtocolError'
8017
+
'204':
8018
+
description: Success ("No Content"). All data in the batch is written and queryable.
8015
8019
'400':
8016
8020
description: |
8017
8021
All data in the batch is rejected and not written.
|`204 "No Content"`| error details about rejected points, up to 100 points: `line` contains the first rejected line, `message` describes rejected points | If InfluxDB ingested some or all of the data |
54
+
|`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 |
55
+
|`204 "No Content"`| no response body | If InfluxDB ingested all of the data in the batch |
55
56
|`400 "Bad request"`|`line` contains the first malformed line, `message` describes rejected points | If request data is malformed |
56
57
|`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. |
57
58
| `403 "Forbidden"` | `message` contains details about the error | If the data isn't allowed (for example, falls outside of the bucket's retention period).
0 commit comments