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