authzen icon indicating copy to clipboard operation
authzen copied to clipboard

Could we (should we) simplify the Action Search API response?

Open davidjbrossard opened this issue 9 months ago • 2 comments

Today, the Search API response looks like this:

{
  "results": [
    {
      "name": "can_read"
    },
    {
      "name": "can_write"
    }
  ],
  "page": {
    "next_token": ""
  }
}

But we could simplify it as

{
  "results": [ "can_read", "can_write"],
  "page": {
    "next_token": ""
  }
}

Thoughts?

davidjbrossard avatar Apr 29 '25 22:04 davidjbrossard

Sounds smart as Action effectively have no Type nor Id but just a name.

identitymonk avatar May 02 '25 16:05 identitymonk

Agreed too, array of string seems sufficient to me.

baboulebou avatar May 20 '25 14:05 baboulebou

On the 6/20 ad-hoc meeting, @ggebel @identitymonk and @davidjbrossard agreed that

  1. to keep the specs as parallel as possible (between subject, resource, and action search)
  2. to plan for future expansion (e.g. group of actions)

It is better to keep the structure as is. We're closing this issue.

davidjbrossard avatar Jun 20 '25 20:06 davidjbrossard