diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index c25c79fff..bbdac5194 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -82,7 +82,7 @@ GitHub Copilot should help document InfluxData products by creating clear, accur product_version: weight: # Page order (1-99, 101-199, etc.) ``` - +- Follow the shortcode documentation in `CONTRIBUTING.md` - Use provided shortcodes correctly: - Notes/warnings: `{{% note %}}`, `{{% warn %}}` - Product-specific: `{{% enterprise %}}`, `{{% cloud %}}` @@ -126,6 +126,7 @@ Table: keys: [_start, _stop, _field, _measurement] ## API Documentation +- `/api-docs` contains OpenAPI spec files used for API reference documentation - Follow OpenAPI specification patterns - Match REST API examples to current implementation - Include complete request/response examples diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ece943143..7edb6fd7b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1633,6 +1633,31 @@ Supported argument values: {{< influxdb/host "serverless" >}} ``` +### User-populated placeholders + +Use the `code-placeholders` shortcode to format placeholders +as text fields that users can populate with their own values. +The shortcode takes a regular expression for matching placeholder names. +Use the `code-placeholder-key` shortcode to format the placeholder names in +text that describes the placeholder--for example: + +``` +{{% code-placeholders "DATABASE_NAME|USERNAME|PASSWORD_OR_TOKEN|API_TOKEN|exampleuser@influxdata.com" %}} +```sh +curl --request POST http://localhost:8086/write?db=DATABASE_NAME \ + --header "Authorization: Token API_TOKEN" \ + --data-binary @path/to/line-protocol.txt +``` +{{% /code-placeholders %}} + +Replace the following: + +- {{% code-placeholder-key %}}`DATABASE_NAME` and `RETENTION_POLICY`{{% /code-placeholder-key %}}: the [database and retention policy mapping (DBRP)](/influxdb/v2/reference/api/influxdb-1x/dbrp/) for the InfluxDB v2 bucket that you want to write to +- {{% code-placeholder-key %}}`USERNAME`{{% /code-placeholder-key %}}: your [InfluxDB 1.x username](/influxdb/v2/reference/api/influxdb-1x/#manage-credentials) +- {{% code-placeholder-key %}}`PASSWORD_OR_TOKEN`{{% /code-placeholder-key %}}: your [InfluxDB 1.x password or InfluxDB API token](/influxdb/v2/reference/api/influxdb-1x/#manage-credentials) +- {{% code-placeholder-key %}}`API_TOKEN`{{% /code-placeholder-key %}}: your [InfluxDB API token](/influxdb/v2/admin/tokens/) +``` + ## InfluxDB API documentation InfluxData uses [Redoc](https://github.com/Redocly/redoc) to generate the full