Is there a way to retrieve nextPageToken for schedules the way nextPageToken can be retrieved when using ListWorkflowExecutionsRequest?
let me know if this post helps Schedule List: Next Page? - #2 by taonic
Are you facing any issues?
Antonio
We have an endpoint /notifications/schedules that currently just returns all of the schedules. We would like to be able to only return a specified number per page and allow the UI consuming the call to move forward or back, similar to the Temporal UI
![]()
I see,
You should be able to implement the query in a similar way you do with ListWorkflowExecutionsRequest , assuming you are using java
ListSchedulesResponse value =
client
.getWorkflowServiceStubs()
.blockingStub()
.listSchedules(
ListSchedulesRequest.newBuilder()
.setMaximumPageSize(10)
.setNamespace("default")
.setNextPageToken(nextPageToken)
.build());
Antonio
Would we need to build our own nextPageToken or is it being returned by a call to the API?
It is returned, for the first request you can set null
We are using Go. In your example I see we are building the ListSchedulesRequest and pass in a nextPageToken. What I’m not sure how to do is actually get the value for nextPageToken so that we can use it later
netxPageToken is returned with ListSchedulesResponse, after you call workflowservice.ListSchedulesRequest
For the first invocation you have to set it to nil
Antonio