Open
Description
Describe the feature request?
Hi Okta team,
It seems like today we need the resp
object from every inital response to make the next()
call. This is a change from before, where you can pass in a page token in query parameters.
Today in V5
apiTokens, resp, err = o.clientV5.ApiTokenAPI.ListApiTokens(ctx).Execute()
if err != nil {
return nil, "", nil, fmt.Errorf("okta-connectorv2: failed to list api tokens: %w", err)
}
if resp.HasNextPage() {
resp, err = resp.Next(&apiTokens)
if err != nil {
return nil, "", nil, err
}
}
Before in V2
qp := query.NewQueryParams(query.WithLimit(int64(size)), query.WithAfter(after))
oktaUsers, resp, err := client.User.ListUsers(ctx, qp)
This essentially means, the downstream consumer cannot be stateless any more and needs to store the resp object from the API responses. Even if we are able to get page tokens from our end, we are not able to just call list API with the token.
Looking for some guidance if we are looking at it the wrong way. Thanks!
New or Affected Resource(s)
All APIs
Provide a documentation link
No response
Additional Information?
No response