RolesController_createRole
POST
/roles
const url = 'https://example.com/roles';const options = { method: 'POST', headers: { cookie: 'session=<session>', 'idempotency-key': 'example', 'x-tenant-schema': 'example', 'Content-Type': 'application/json' }, body: '{"name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/roles \ --header 'Content-Type: application/json' \ --header 'idempotency-key: example' \ --header 'x-tenant-schema: example' \ --cookie session=<session> \ --data '{ "name": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”idempotency-key
required
string
x-tenant-schema
required
string
The tenant of the request.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
Examplegenerated
{ "name": "example"}Responses
Section titled “Responses”The created role, as far as the caller may read it.
Media typeapplication/json
object
id
string
name
string
Examplegenerated
{ "id": "example", "name": "example"}