Skip to content

Commit 70a0476

Browse files
hpsinSarah Edwards
andauthored
Document query string arrays (github#37271)
Co-authored-by: Sarah Edwards <[email protected]>
1 parent e027874 commit 70a0476

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

content/rest/guides/getting-started-with-the-rest-api.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -410,16 +410,12 @@ By default, the "List repository issues" operation returns thirty issues, sorted
410410

411411
For {% data variables.product.prodname_cli %}, use the `-F` flag to pass a parameter that is a number, Boolean, or null. Use `-f` to pass string parameters.
412412

413-
{% note %}
414-
415-
**Note**: {% data variables.product.prodname_cli %} does not currently accept parameters that are arrays. For more information, see [this issue](https://github.com/cli/cli/issues/1484).
416-
417-
{% endnote %}
418-
419413
```shell
420414
gh api --header 'Accept: application/vnd.github+json' --method GET /repos/octocat/Spoon-Knife/issues -F per_page=2 -f sort=updated -f direction=asc
421415
```
422416

417+
Some operations use query parameters that are arrays. To send an array in the query string, use the query parameter once per array item, and append `[]` after the query parameter name. For example, to provide an array of two repository IDs, use `-f repository_ids[]=REPOSITORY_A_ID -f repository_ids[]=REPOSITORY_B_ID`.
418+
423419
{% endcli %}
424420

425421
{% javascript %}
@@ -449,6 +445,8 @@ curl --request GET \
449445
--header "Authorization: Bearer YOUR-TOKEN"
450446
```
451447

448+
Some operations use query parameters that are arrays. To send an array in the query string, use the query parameter once per array item, and append `[]` after the query parameter name. For example, to provide an array of two repository IDs, use `?repository_ids[]=REPOSITORY_A_ID&repository_ids[]=REPOSITORY_B_ID`.
449+
452450
{% endcurl %}
453451

454452
The operation returns a list of issues and data about each issue. For more information about using the response, see the "[Using the response](#using-the-response)" section.

0 commit comments

Comments
 (0)