updated api example to show org and bucket, added cloud example, resolves #484, resolves #486

pull/500/head
Scott Anderson 2019-09-30 10:28:54 -06:00
parent f474f21c1e
commit f10f52d17b
1 changed files with 19 additions and 3 deletions

View File

@ -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
<a class="btn" href="/v2.0/api/">InfluxDB v2.0 API documentation</a>
### View InfluxDB API documentation locally