GCP stackdriver enteries list pagination issue

Viewed 286

i am sending the followin request for enteries list API ,here is the link to API https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list

{
    "filter": "(jsonPayload.event_type=\"GCE_OPERATION_DONE\" OR  protoPayload.serviceName=\"storage.googleapis.com\" OR protoPayload.serviceName=\"clientauthconfig.googleapis.com\" OR protoPayload.serviceName=\"iam.googleapis.com\" OR protoPayload.serviceName=\"compute.googleapis.com\") AND (jsonPayload.event_subtype=\"compute.instances.insert\" OR jsonPayload.event_subtype=\"compute.instances.delete\" OR protoPayload.methodName=\"storage.buckets.create\" OR protoPayload.methodName=\"storage.buckets.delete\" AND protoPayload.resourceOriginalState.direction=\"EGRESS\" AND protoPayload.request.disabled=true)) AND timestamp>=\"2020-05-16T12:52:00.820Z\" AND timestamp <  \"2020-05-16T13:52:00.820Z\"",
    "resourceNames": [
        "projects/project1"
    ],
    "orderBy": "timestamp desc",
    "pageSize": 1000,
    "pageToken":xxxx"
}

I am getting the following respone

{
  "error": {
    "code": 400,
    "message": "page_token doesn't match arguments from the request",
    "status": "INVALID_ARGUMENT"
  }
}

Can anyone Suggest what does message imply with an example

2 Answers

this error is faced when,

the page token of some other project is being used in place of project1

Try to test the API using following format for the requested body and also try without any parameters.

{ "projectIds": [ string ], "resourceNames": [ string ], "filter": string, "orderBy": string, "pageSize": integer, "pageToken": string }

Related