Skip to content

paginate option does not work with api calls to scim #6044

Open

Description

@jayeye

Describe the bug

The --paginate option appears not to work when calling the SCIM part of the API. Instead, it only returns the first 30 entries.

$ gh --version
gh version 2.14.3 (2022-07-26)

Steps to reproduce the behavior

$ gh api --paginate scim/v2/organizations/$MYORG/Users | jq .
{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:ListResponse"
  ],
  "totalResults": 80,
  "itemsPerPage": 30,
  "startIndex": 1,

Expected vs actual behavior

I would have expected all 80 records to be retrieved.

Activity

  1. added
    priority-3Affects a small number of users or is largely cosmetic
    and removed on Aug 8, 2022
  2. mislav commented on Aug 8, 2022

    @mislav
    Contributor

    Thank you for reporting!

    Right now, --paginate only works with REST ?page=<num>-based pagination and GraphQL cursor-based pagination, but not with startIndex-based pagination of the API you are currently using. Until CLI gains support for this, I would advise calling gh api in a loop until all pages of results have been fetched. 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-apirelating to the gh api commandpriority-3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions