Roles

Available roles in a Plone site can be queried by interacting with the /@roles endpoint on portal root (requires an authenticated user):

List Roles

To retrieve a list of all roles in the portal, call the /@roles endpoint with a GET request:

GET /@roles HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbiIsImZ1bGxuYW1lIjoiQWRtaW4iLCJpYXQiOjE2NDkzMTI0NDl9.RS1Ny_r0v7vIylFfK6q0JVJrkiDuTOh9iG9IL8xbzAk

The server will respond with a list of all roles in the site:

HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "@id": "http://localhost:8000/@roles/Anonymous",
    "@type": "role",
    "id": "Anonymous",
    "title": "Anonymous"
  },
  {
    "@id": "http://localhost:8000/@roles/Authenticated",
    "@type": "role",
    "id": "Authenticated",
    "title": "Authenticated"
  },
  {
    "@id": "http://localhost:8000/@roles/Owner",
    "@type": "role",
    "id": "Owner",
    "title": "Owner"
  },
  {
    "@id": "http://localhost:8000/@roles/Reader",
    "@type": "role",
    "id": "Reader",
    "title": "Reader"
  },
  {
    "@id": "http://localhost:8000/@roles/Contributor",
    "@type": "role",
    "id": "Contributor",
    "title": "Contributor"
  },
  {
    "@id": "http://localhost:8000/@roles/Editor",
    "@type": "role",
    "id": "Editor",
    "title": "Editor"
  },
  {
    "@id": "http://localhost:8000/@roles/Reviewer",
    "@type": "role",
    "id": "Reviewer",
    "title": "Reviewer"
  },
  {
    "@id": "http://localhost:8000/@roles/Administrator",
    "@type": "role",
    "id": "Administrator",
    "title": "Administrator"
  }
]

The role title is the translated role title.