apigee / apigeecli

This is a tool to interact with Apigee APIs. The tool lets you manage (create, del, get, list) environments, proxies, etc.
Apache License 2.0
54 stars 31 forks source link

"apps list --count <some number>" returning 400 #351

Closed Hoddikr closed 10 months ago

Hoddikr commented 10 months ago

Apigeecli version: apigeecli version 1.124 date: 2023-11-09T16:55:07Z [commit: 5693a22]

Apigee hybrid version used: 1.11.0

When running the command:

apigeecli apps list --count <any number> -o <my org> -t <my access token>

we get the following response:

{code:json}

{
  "error": {
    "code": 400,
    "message": "Invalid JSON payload received. Unknown name \"row\": Cannot bind query parameter. Field 'row' could not be found in request message.",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.BadRequest",
        "fieldViolations": [
          {
            "description": "Invalid JSON payload received. Unknown name \"row\": Cannot bind query parameter. Field 'row' could not be found in request message."
          }
        ]
      }
    ]
  }
}

Error: Bad Request - malformed request syntax
Usage:
  apigeecli apps list [flags]

Flags:
  -c, --count int   Number of apps; limit is 1000 (default -1)
  -x, --expand      Expand Details
  -h, --help        help for list
  -i, --inclCred    Include Credentials

Global Flags:
  -a, --account string   Path Service Account private key in JSON
      --default-token    Use Google default application credentials access token
      --disable-check    Disable check for newer versions
      --metadata-token   Metadata OAuth2 access token
      --no-output        Disable printing all statements to stdout
  -o, --org string       Apigee organization name
      --print-output     Control printing of info log statements (default true)
  -t, --token string     Google OAuth Token
kurtkanaskie commented 10 months ago

I see the same issue, apigeecli was using row instead of rows. It's fixed in the main branch, which has not been released yet.

srinandan commented 10 months ago

Release v1.125 fixes this issue.