From f10f52d17be4b6aca37b07d5fb83ec49a0c6f6c9 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Mon, 30 Sep 2019 10:28:54 -0600 Subject: [PATCH] updated api example to show org and bucket, added cloud example, resolves #484, resolves #486 --- content/v2.0/reference/api.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/content/v2.0/reference/api.md b/content/v2.0/reference/api.md index 22c9426f1..364924053 100644 --- a/content/v2.0/reference/api.md +++ b/content/v2.0/reference/api.md @@ -15,14 +15,30 @@ Access the InfluxDB API using the `/api/v2/` endpoint. InfluxDB uses [authentication tokens](/v2.0/security/tokens/) to authorize API requests. Include your authentication token as an `Authorization` header in each request. +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[InfluxDB OSS](#) +[InfluxDB Cloud](#) +{{% /code-tabs %}} +{{% code-tab-content %}} ```sh -curl --request GET \ - --url http://localhost:9999/api/v2/ \ +curl --request POST \ + --url http://localhost:9999/api/v2/write?org=my-org&bucket=example-bucket \ --header 'Authorization: Token YOURAUTHTOKEN' ``` +{{% /code-tab-content %}} +{{% code-tab-content %}} +```sh +# Use the hostname of your InfluxDB Cloud UI +curl --request POST \ + --url https://us-west-2-1.aws.cloud2.influxdata.com/api/v2/write?org=my-org&bucket=example-bucket \ + --header 'Authorization: Token YOURAUTHTOKEN' +``` +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} ## View Influx v2 API Documentation - +View the InfluxDB v2.0 API documentation ### View InfluxDB API documentation locally