canonical / identity-platform-admin-ui

Admin UI for the Canonical identity broker and identity provider solution
Other
5 stars 4 forks source link

Standardize rules API pagination strategy #268

Closed shipperizer closed 1 month ago

shipperizer commented 3 months ago

at the moment the /api/v0/rules API follows the page|size pagination strategy

this goes against what is being used in

plan is to standardzie around a page_token strategy like the APIs above, using a base64 json representation of an offset:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "offset": {
      "type": "string"
    }
  },
  "required": [
    "offset"
  ]
}
shipperizer in ~/shipperizer/identity-platform-admin-ui/pkg/rules on IAM-782 ● λ echo -n '{"offset":"250"}' | base64 | base64 -d
{"offset":"250"}%                                                                                                                           
shipperizer in ~/shipperizer/identity-platform-admin-ui/pkg/rules on IAM-782 ● λ echo -n '{"offset":"250"}' | base64            
eyJvZmZzZXQiOiIyNTAifQ==

this is the same token schema used by the /api/v0/schemas

once we get the offset and the page size, we should be more than able to interpolate the page

syncronize-issues-to-jira[bot] commented 3 months ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/IAM-829.

This message was autogenerated