Atomically grant one known permission to a role without replacing concurrent changes.
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://example.com/api/workspace/roles/example/permissions/grants"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"PermissionKey\": \"example\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://example.com/api/workspace/roles/example/permissions/grants';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"PermissionKey":"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/api/workspace/roles/example/permissions/grants \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "PermissionKey": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.
Request Bodyrequired
Section titled “Request Bodyrequired”Request payload for an atomic role permission grant or revoke.
object
Normalized permission key.
Examplegenerated
{ "PermissionKey": "example"}Request payload for an atomic role permission grant or revoke.
object
Normalized permission key.
Examplegenerated
{ "PermissionKey": "example"}Request payload for an atomic role permission grant or revoke.
object
Normalized permission key.
Examplegenerated
{ "PermissionKey": "example"}Responses
Section titled “Responses”OK
object
Complete permission set assigned to a workspace role.
object
Aggregate version that changes with every effective permission mutation.
Normalized permission keys assigned to the role.
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Bad Request
object
Complete permission set assigned to a workspace role.
object
Aggregate version that changes with every effective permission mutation.
Normalized permission keys assigned to the role.
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Forbidden
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
object
Complete permission set assigned to a workspace role.
object
Aggregate version that changes with every effective permission mutation.
Normalized permission keys assigned to the role.
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}