Hello Grafeas team!
I have been playing with the filtering capabilities of the API but not successfully. For example doing this call :
Returns :
{
"name": "projects/user1/occurrences/gdx5526",
"resource": {
"name": "",
"uri": "www",
"contentHash": null
},
"noteName": "projects/user1/notes/commonrfq",
"kind": "DEPLOYMENT",
"remediation": "",
"createTime": "2019-08-13T14:20:46.399156301Z",
"updateTime": null,
"deployment": {
"deployment": {
"deployTime": "2019-08-13T15:01:23.045123456Z",
"undeployTime": null,
"config": "N/A",
"address": "",
"resourceUri": [],
"platform": "CUSTOM"
}
}
}
Now if I try to get the occurrences for the note commonrfq
GET https://mygrafeas.com/v1beta1/projects/user1/notes/commonrfq/occurrences
Returns:
{
"occurrences": [],
"nextPageToken": "gAAAAABdUtslyKzswJF7Q1r_AE_gSeZUBCGMRelrp0yR9qX6QEKh8RcJjqIK3fr-Xux6m1uE4tQVN0YY1ujzz2CvWRQvSS0lgg=="
}
It becomes more interesting if I do:
Returns:
{
"occurrences": [
{
"name": "projects/user1/occurrences/spx5047",
"resource": {
"name": "",
"uri": "Admin",
"contentHash": null
},
"noteName": "projects/user1/notes/commonrfq",
"kind": "NOTE_KIND_UNSPECIFIED",
"remediation": "",
"createTime": "2019-08-13T14:01:48.747150497Z",
"updateTime": null,
"deployment": {
"deployment": {
"deployTime": "2019-08-13T15:01:23.045123456Z",
"undeployTime": null,
"config": "N/A",
"address": "",
"resourceUri": [],
"platform": "CUSTOM"
}
}
},
{
"name": "projects/user1/occurrences/gdx5526",
"resource": {
"name": "",
"uri": "Admin",
"contentHash": null
},
"noteName": "projects/user1/notes/commonrfq",
"kind": "DEPLOYMENT",
"remediation": "",
"createTime": "2019-08-13T14:20:46.399156301Z",
"updateTime": null,
"deployment": {
"deployment": {
"deployTime": "2019-08-13T15:01:23.045123456Z",
"undeployTime": null,
"config": "N/A",
"address": "",
"resourceUri": [],
"platform": "CUSTOM"
}
}
}
],
"nextPageToken": "gAAAAABdUttiTOw6Bwcc5WrAm-YrfsXU7wgDXrKI0BYImeUiIiqQkRqQ2YLDRnF722KGroQDAASEIzK1cCR0_dbTf2eKIjkKkQ=="
}
Which means I have occurrences for the specific note.
Also for example, not talking about the filters:
{
"occurrences": [
{
"name": "projects/user1/occurrences/spx5047",
"resource": {
"name": "",
"uri": "Admin",
"contentHash": null
},
"noteName": "projects/user1/notes/commonrfq",
"kind": "NOTE_KIND_UNSPECIFIED",
"remediation": "",
"createTime": "2019-08-13T14:01:48.747150497Z",
"updateTime": null,
"deployment": {
"deployment": {
"deployTime": "2019-08-13T15:01:23.045123456Z",
"undeployTime": null,
"config": "N/A",
"address": "",
"resourceUri": [],
"platform": "CUSTOM"
}
}
},
{
"name": "projects/user1/occurrences/gdx5526",
"resource": {
"name": "",
"uri": "Admin",
"contentHash": null
},
"noteName": "projects/user1/notes/commonrfq",
"kind": "DEPLOYMENT",
"remediation": "",
"createTime": "2019-08-13T14:20:46.399156301Z",
"updateTime": null,
"deployment": {
"deployment": {
"deployTime": "2019-08-13T15:01:23.045123456Z",
"undeployTime": null,
"config": "N/A",
"address": "",
"resourceUri": [],
"platform": "CUSTOM"
}
}
}
],
"nextPageToken": "gAAAAABdUttiTOw6Bwcc5WrAm-YrfsXU7wgDXrKI0BYImeUiIiqQkRqQ2YLDRnF722KGroQDAASEIzK1cCR0_dbTf2eKIjkKkQ=="
}
So in this case is not applying the filter. Some one has a similar issue? Any suggestion about what I'm doing wrong with the API calls?
I really appreciate your help and feedback. Thanks!