From 248c9c0b3902c0fcbdf53c438de0e8858ba01608 Mon Sep 17 00:00:00 2001 From: Abdullah Sabaa Allil <36844223+Abdullahsab3@users.noreply.github.com> Date: Mon, 15 Apr 2024 23:20:24 +0200 Subject: [PATCH] fix broken curl post commands (#5423) * fix broken curl post commands * fix broken curl post commands --------- Co-authored-by: Scott Anderson --- api-docs/cloud-dedicated/v2/ref.yml | 4 ++-- api-docs/clustered/v2/ref.yml | 4 ++-- .../cloud-serverless/guides/api-compatibility/v2/_index.md | 2 +- .../influxdb/clustered/guides/api-compatibility/v2/_index.md | 4 ++-- shared/text/api/cloud-dedicated/bearer-auth-v2-write.sh | 2 +- shared/text/api/cloud-dedicated/token-auth-v2-write.sh | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api-docs/cloud-dedicated/v2/ref.yml b/api-docs/cloud-dedicated/v2/ref.yml index 29ad4a5fa..c35485c15 100644 --- a/api-docs/cloud-dedicated/v2/ref.yml +++ b/api-docs/cloud-dedicated/v2/ref.yml @@ -2038,7 +2038,7 @@ components: # to write data. ######################################################## - curl --post "https://cluster-id.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \ + curl --request 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' ``` @@ -2069,7 +2069,7 @@ components: # to write data. ######################################################## - curl --post "https://cluster-id.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \ + curl --request 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' ``` diff --git a/api-docs/clustered/v2/ref.yml b/api-docs/clustered/v2/ref.yml index c99970778..4bf98d99b 100644 --- a/api-docs/clustered/v2/ref.yml +++ b/api-docs/clustered/v2/ref.yml @@ -2022,7 +2022,7 @@ components: # to write data. ######################################################## - curl --post "https://cluster-id.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \ + curl --request 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' ``` @@ -2053,7 +2053,7 @@ components: # to write data. ######################################################## - curl --post "https://cluster-id.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \ + curl --request 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' ``` diff --git a/content/influxdb/cloud-serverless/guides/api-compatibility/v2/_index.md b/content/influxdb/cloud-serverless/guides/api-compatibility/v2/_index.md index c842396c7..e2e245cea 100644 --- a/content/influxdb/cloud-serverless/guides/api-compatibility/v2/_index.md +++ b/content/influxdb/cloud-serverless/guides/api-compatibility/v2/_index.md @@ -68,7 +68,7 @@ Use `Token` to authenticate a write request: {{% code-placeholders "BUCKET_NAME|API_TOKEN" %}} ```sh # Use the Token authentication scheme with /api/v2/write -curl --post "https://{{< influxdb/host >}}/api/v2/write?bucket=BUCKET_NAME&precision=s" \ +curl --request post "https://{{< influxdb/host >}}/api/v2/write?bucket=BUCKET_NAME&precision=s" \ --header "Authorization: Token API_TOKEN" \ --data-binary 'home,room=kitchen temp=72 1463683075' ``` diff --git a/content/influxdb/clustered/guides/api-compatibility/v2/_index.md b/content/influxdb/clustered/guides/api-compatibility/v2/_index.md index 015721020..bc8b7dede 100644 --- a/content/influxdb/clustered/guides/api-compatibility/v2/_index.md +++ b/content/influxdb/clustered/guides/api-compatibility/v2/_index.md @@ -78,7 +78,7 @@ Use `Bearer` to authenticate a write request: {{% influxdb/custom-timestamps %}} {{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} ```sh -curl --post 'https://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME&precision=s' \ +curl --request post 'https://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME&precision=s' \ --header 'Authorization: Bearer DATABASE_TOKEN' \ --data-binary 'home,room=kitchen temp=72 1641024000' ``` @@ -88,7 +88,7 @@ Use `Token` to authenticate a write request: {{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} ```sh -curl --post "https://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME&precision=s" \ +curl --request post "https://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME&precision=s" \ --header "Authorization: Token DATABASE_TOKEN" \ --data-binary 'home,room=kitchen temp=72 1641024000' ``` diff --git a/shared/text/api/cloud-dedicated/bearer-auth-v2-write.sh b/shared/text/api/cloud-dedicated/bearer-auth-v2-write.sh index 8c9ea3b2f..fe41a6ad6 100644 --- a/shared/text/api/cloud-dedicated/bearer-auth-v2-write.sh +++ b/shared/text/api/cloud-dedicated/bearer-auth-v2-write.sh @@ -3,6 +3,6 @@ # to write data. ######################################################## -curl --post 'https://cluster-id.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s' \ +curl --request 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' diff --git a/shared/text/api/cloud-dedicated/token-auth-v2-write.sh b/shared/text/api/cloud-dedicated/token-auth-v2-write.sh index 6e718894a..78534adb2 100644 --- a/shared/text/api/cloud-dedicated/token-auth-v2-write.sh +++ b/shared/text/api/cloud-dedicated/token-auth-v2-write.sh @@ -3,6 +3,6 @@ # to write data. ######################################################## -curl --post "https://cluster-id.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s" \ +curl --request 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'