Create a workspace role
const url = 'https://api.de.teamgrid.app/v1/roles';const options = { method: 'POST', headers: { 'Idempotency-Key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"description":"example","name":"example","permissions":["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://api.de.teamgrid.app/v1/roles \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --data '{ "description": "example", "name": "example", "permissions": [ "example" ] }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Unique request key retained for seven days. Within that window, reuse with different data is rejected.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "description": "example", "name": "example", "permissions": [ "example" ]}Responses
Section titled “Responses”A newly created resource.
object
object
object
object
Example
{ "data": { "type": "role" }}Headers
Section titled “Headers”Strong member-administration resource revision.
Prevents shared caching and representation transformations so the strong revision validator remains byte-for-byte usable for conditional requests.
The request is invalid.
object
object
object
object
Examplegenerated
{ "errors": [ { "code": "example", "detail": "example", "source": { "additionalProperty": "example" }, "status": "example", "title": "example" } ], "meta": { "requestId": "example" }}The bearer credential is missing, invalid, expired, or revoked.
object
object
object
object
Examplegenerated
{ "errors": [ { "code": "example", "detail": "example", "source": { "additionalProperty": "example" }, "status": "example", "title": "example" } ], "meta": { "requestId": "example" }}The credential has insufficient scope.
object
object
object
object
Examplegenerated
{ "errors": [ { "code": "example", "detail": "example", "source": { "additionalProperty": "example" }, "status": "example", "title": "example" } ], "meta": { "requestId": "example" }}The request conflicts with the current resource state.
object
object
object
object
Examplegenerated
{ "errors": [ { "code": "example", "detail": "example", "source": { "additionalProperty": "example" }, "status": "example", "title": "example" } ], "meta": { "requestId": "example" }}The credential or source exceeded its rate limit.
object
object
object
object
Examplegenerated
{ "errors": [ { "code": "example", "detail": "example", "source": { "additionalProperty": "example" }, "status": "example", "title": "example" } ], "meta": { "requestId": "example" }}Headers
Section titled “Headers”Minimum delay in seconds before retrying.
Maximum requests in the current window.
Requests remaining in the current window.
Unix time in milliseconds when the current window resets.
Request correlation identifier.
The cell-local application returned an invalid response.
object
object
object
object
Examplegenerated
{ "errors": [ { "code": "example", "detail": "example", "source": { "additionalProperty": "example" }, "status": "example", "title": "example" } ], "meta": { "requestId": "example" }}A required cell-local dependency is unavailable.
object
object
object
object
Examplegenerated
{ "errors": [ { "code": "example", "detail": "example", "source": { "additionalProperty": "example" }, "status": "example", "title": "example" } ], "meta": { "requestId": "example" }}