Fixed
Status Update
Comments
di...@google.com <di...@google.com>
ka...@gmail.com <ka...@gmail.com> #2
I'm seeing the same passing any filter expression for aggregatedList
cr...@google.com <cr...@google.com> #3
I'm seeing this issue as well when attempting to filter an aggregatedList for compute backend services.
API error: "googleapi: Error 400: Invalid value for field 'filter': 'name = my-backend-service'. Invalid list filter expression., invalid"
API error: "googleapi: Error 400: Invalid value for field 'filter': 'name = my-backend-service'. Invalid list filter expression., invalid"
cr...@google.com <cr...@google.com> #4
Here's the JSON response when I attempt to use this feature via curl: https://paste.googleplex.com/6197368772886528
I know the backend service exists due to it showing up when I don't use the filter query param:https://paste.googleplex.com/5149442621571072
I know the backend service exists due to it showing up when I don't use the filter query param:
m3...@gmail.com <m3...@gmail.com> #5
+1 I'm seeing this issue as well for querying on name.
ga...@metrics.ca <ga...@metrics.ca> #6
I have this problem too, with filtering on aggregateList if disks.
Noted that:
curl 'https://www.googleapis.com/compute/v1/projects/my-project/aggregated/disks?alt=json&filter=labels.snaps+eq+daily '
=> returns expected filtered results
[EDIT: silly example deleted. The point was that the google-api-python-client library produces a request that 400's, but that the request above actually does work]
Noted that:
curl '
=> returns expected filtered results
[EDIT: silly example deleted. The point was that the google-api-python-client library produces a request that 400's, but that the request above actually does work]
ba...@google.com <ba...@google.com> #7
+1 - This is an issue for SAP deployment automation.
ke...@shopify.com <ke...@shopify.com> #8
Just came across this issue as well. Is there an ETA on a fix?
ke...@shopify.com <ke...@shopify.com> #9
Interestingly, it works when you use a string formatted as the gcloud cli client.
For example (pseudocode):
regex_excaped_string = "name eq \"name\\-of\\-instance\""
instances.aggregatedList("project_id", format=regex_escaped_string)
For example (pseudocode):
regex_excaped_string = "name eq \"name\\-of\\-instance\""
instances.aggregatedList("project_id", format=regex_escaped_string)
su...@gmail.com <su...@gmail.com> #10
+1
ma...@templarbit.com <ma...@templarbit.com> #11
I can't get https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates/list to work either.
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "Invalid value for field 'filter': 'labels.foobar = true'. Invalid list filter expression."
}
],
"code": 400,
"message": "Invalid value for field 'filter': 'labels.foobar = true'. Invalid list filter expression."
}
}
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "Invalid value for field 'filter': 'labels.foobar = true'. Invalid list filter expression."
}
],
"code": 400,
"message": "Invalid value for field 'filter': 'labels.foobar = true'. Invalid list filter expression."
}
}
ho...@sfeir.com <ho...@sfeir.com> #12
I have this too when trying to filter firewall rules sourceRanges. Any news on this it's been open for 5 months ?
The gcloud command works using
gcloud compute firewall-rules list --filter="sourceRanges:(0.0.0.0/0 )"
However putting the same filter into the api, I get
Invalid value for field 'filter': 'sourceRanges:(0.0.0.0/0) '. Invalid list filter expression
Is there another way of specifying list values in the API ? I see this is a P2 but really needs bumping up as i'm blocked on a client project
The gcloud command works using
gcloud compute firewall-rules list --filter="sourceRanges:(
However putting the same filter into the api, I get
Invalid value for field 'filter': 'sourceRanges:(
Is there another way of specifying list values in the API ? I see this is a P2 but really needs bumping up as i'm blocked on a client project
jo...@google.com <jo...@google.com> #13
Looks a lot like previously seen issues.
th...@google.com <th...@google.com>
pt...@google.com <pt...@google.com>
el...@google.com <el...@google.com> #14
I am seeing the same thing for "compute.snapshots.list", should I open a separate issue for that? This is happening when I try to compare the time stamp. For example using the filter to search for a name works:
> export PROJECT=$(gcloud config get-value project)
> curl -H "$(oauth2l header cloud-platform)" \
-H "Content-Type: application/json" \
https://www.googleapis.com/compute/v1/projects/${PROJECT}/global/snapshots\?filter\=name%3A%22utilities-vm-\*%22
{
"kind": "compute#snapshotList",
"id": "projects/xxxx/global/snapshots",
"items": [
{
"kind": "compute#snapshot",
"id": "206264346296184964",
"creationTimestamp": "2019-02-11T20:41:15.991-08:00",
"name": "utilities-vm-2019-02-11",
"status": "READY",
Here is the one that fails:
> curl -H "$(oauth2l header cloud-platform)" \
-H "Content-Type: application/json" \
https://www.googleapis.com/compute/v1/projects/${PROJECT}/global/snapshots\?filter\=creationTimestamp%3E%2220190219%22
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "Invalid value for field 'filter': 'creationTimestamp\u003e\"20190219\"'. Invalid list filter expression.",
And with gcloud it works fine:
> gcloud compute snapshots list --filter 'creationTimestamp>2019-02-11'
NAME DISK_SIZE_GB SRC_DISK STATUS
utilities-vm-2019-02-11 20 us-east4-c/disks/utilities-vm READY
> export PROJECT=$(gcloud config get-value project)
> curl -H "$(oauth2l header cloud-platform)" \
-H "Content-Type: application/json" \
{
"kind": "compute#snapshotList",
"id": "projects/xxxx/global/snapshots",
"items": [
{
"kind": "compute#snapshot",
"id": "206264346296184964",
"creationTimestamp": "2019-02-11T20:41:15.991-08:00",
"name": "utilities-vm-2019-02-11",
"status": "READY",
Here is the one that fails:
> curl -H "$(oauth2l header cloud-platform)" \
-H "Content-Type: application/json" \
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "Invalid value for field 'filter': 'creationTimestamp\u003e\"20190219\"'. Invalid list filter expression.",
And with gcloud it works fine:
> gcloud compute snapshots list --filter 'creationTimestamp>2019-02-11'
NAME DISK_SIZE_GB SRC_DISK STATUS
utilities-vm-2019-02-11 20 us-east4-c/disks/utilities-vm READY
j....@salesforce.com <j....@salesforce.com> #15
I am seeing the same issue w/ the java client. In kotlin:
"(creationTimestamp < ${ZonedDateTime.now(ZoneOffset.UTC)
.minusHours(numHoursPrevious)
.format(dateTimeFormatter)})" is my filter and I get:
com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request
{
"code" : 400,
"errors" : [ {
"domain" : "global",
"message" : "Invalid value for field 'filter': '(creationTimestamp > 2019-05-01T06:29:46.613)'. Invalid list filter expression.",
"reason" : "invalid"
} ],
"message" : "Invalid value for field 'filter': '(creationTimestamp > 2019-05-01T06:29:46.613)'. Invalid list filter expression."
}
The same filter works w/ gcloud command line tool.
Edit: If you escape the timestamp like so:
"(creationTimestamp < \"${ZonedDateTime.now(ZoneOffset.UTC)
.minusHours(numHoursPrevious)
.format(dateTimeFormatter)}\")"
it works. These escaped quotes are not intuitive nor documented. Additionally piping more filters using parenthesis does not work as expected unless an AND is used explicitly.
"(creationTimestamp < ${ZonedDateTime.now(ZoneOffset.UTC)
.minusHours(numHoursPrevious)
.format(dateTimeFormatter)})" is my filter and I get:
com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request
{
"code" : 400,
"errors" : [ {
"domain" : "global",
"message" : "Invalid value for field 'filter': '(creationTimestamp > 2019-05-01T06:29:46.613)'. Invalid list filter expression.",
"reason" : "invalid"
} ],
"message" : "Invalid value for field 'filter': '(creationTimestamp > 2019-05-01T06:29:46.613)'. Invalid list filter expression."
}
The same filter works w/ gcloud command line tool.
Edit: If you escape the timestamp like so:
"(creationTimestamp < \"${ZonedDateTime.now(ZoneOffset.UTC)
.minusHours(numHoursPrevious)
.format(dateTimeFormatter)}\")"
it works. These escaped quotes are not intuitive nor documented. Additionally piping more filters using parenthesis does not work as expected unless an AND is used explicitly.
jo...@google.com <jo...@google.com>
j....@salesforce.com <j....@salesforce.com> #16
kn...@google.com <kn...@google.com> #17
I should note that the issue with the filter in instances.aggregatedList method is fixed now. If you get similar issues while using other methods, it is recommended to raise another ticket to be investigated.
al...@google.com <al...@google.com> #18
In response to #16, I created a public issue to investigate it. You can keep track of it in the following link[1].
If you want to subscribe to receive notifications about its progress, you can star that issue.
[1]:https://issuetracker.google.com/132676194
If you want to subscribe to receive notifications about its progress, you can star that issue.
[1]:
ap...@google.com <ap...@google.com> #19
🤖 This is an automatic update. The status of the related internal issue(s) listed in "Blocked By" has changed, so we've done the following:
* Moved this issue to a locked sub-component, because the issue has been closed. Please open a new issue if you need Google to re-visit this topic.
You can read more about what these statuses mean athttps://developers.google.com/issue-tracker/concepts/issues#fields
* Moved this issue to a locked sub-component, because the issue has been closed. Please open a new issue if you need Google to re-visit this topic.
You can read more about what these statuses mean at
Description
I'm getting error while using the filter (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") as per documentation.
The error is:
"message": "Invalid value for field 'filter': ' (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\")'. Invalid list filter expression."
However this is working with method instances.list [2].
Is this an expected behavior therefore bad documentation or might be an API issue ?
[1]
[2]