Creating a token scoped to a bucket by using the name with the API

I would like to create a token scoped to a bucket by using the name with the AP, is it possible?

http://localhost:8086/api/v2/authorizations
{
  "description": "my_bucket_name_token",
  "orgID": "a62a40195e5b0bf7",
  "permissions": [
    {
      "action": "read",
      "resource": {
        "orgID": "a62a40195e5b0bf7",
        "type": "buckets",
        //"id": "a81764bf998a926b"
          "name": "my_bucket_name"
      }
    }
  ]
}

thanks in advance :slight_smile:

Hello @vrielmann-ee,
Looking at the API docs, it seems possible:

"permissions": [
{
"action": "read",
"resource": {
"id": "string",
"name": "string",
"org": "string",
"orgID": "string",
"type": "authorizations"
}
}
],

Also it’s possible to create it with the CLI (which uses the same unified API) by just providing the name.

So yes, I’m included to say you can.
Did you try it? What errors id you get if any?