bawskyB
ZITADEL6mo ago
bawsky

Can't query ListOrganizations with an empty request body (v4-rc.2)

Is this expected? Searching organizations with an empty request body worked fine on previous versions.

Reproducing:
curl -s -H "Authorization: Bearer $token" \
  -H 'Connect-Protocol-Version: 1' \
  -H 'Accept: application/json' \
  -X POST http://localhost:8080/zitadel.org.v2beta.OrganizationService/ListOrganizations
# response status: 415 (Unsupported Media Type)
# response body: <empty>

curl -s -H "Authorization: Bearer $token" \
  -H 'Connect-Protocol-Version: 1' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -X POST http://localhost:8080/zitadel.org.v2beta.OrganizationService/ListOrganizations
# response status: 400 (Bad Request)
# response body: {"code":"invalid_argument","message":"unmarshal message: zero-length payload is not a valid JSON object"}


Obs.: as a workaround, this work fine:
curl -s -H "Authorization: Bearer $token" \
  -H 'Connect-Protocol-Version: 1' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -X POST http://localhost:8080/zitadel.org.v2beta.OrganizationService/ListOrganizations \
  -d '{}'
# works fine
Was this page helpful?