List the roles and their backend and model (REQ-101).
GET
/admin/roles
const url = 'https://example.com/api/v1/admin/roles';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/admin/rolesResponses
Section titled “ Responses ”The roles.
Media typeapplication/json
object
items
required
Array<object>
object
role
required
string
backend_id
string format: uuid
model
string
price_in_per_mtok
number
price_out_per_mtok
number
Example
{ "items": [ { "role": "reviewer" } ]}default
Section titled “default”An error.
Media typeapplication/problem+json
RFC 9457 problem details with a stable code.
object
type
required
string
title
required
string
status
required
integer
detail
string
instance
string
code
required
A stable machine-readable error code.
string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": "example"}