I’m having trouble getting filters to work when using the Cloud API to list builds.
This Cloud SDK call works fine:
gcloud builds list --filter=buildTriggerId=d5e674ac-2978-42e1-a490-633b76142d48
But when using the API
GET https://cloudbuild.googleapis.com/v1/projects/{projectId}/builds
It fails with “INVALID_ARGUMENT Request contains an invalid argument.”
The API is working when I filter on ‘status’ but I get the above error when I try to filter on other properties like buildTriggerId, name or id.
The documentation I’ve found is patchy, and I can’t understand why the SDK and API behave differently.
Is anyone using the filters successfully?