Set grant
POST
/auth/grants
const url = 'https://sylve.lan:8181/api/auth/grants';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"id":1,"path":"example","propagate":true,"role":"example","subject":"example","subjectType":"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://sylve.lan:8181/api/auth/grants \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "id": 1, "path": "example", "propagate": true, "role": "example", "subject": "example", "subjectType": "example" }'Give a user (“name@pam” or “name@sylve”) or a group a role on a path, or change whether it propagates
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Grant
Media typeapplication/json
object
id
integer
path
string
propagate
boolean
role
string
subject
string
subjectType
string
Examplegenerated
{ "id": 1, "path": "example", "propagate": true, "role": "example", "subject": "example", "subjectType": "example"}Responses
Section titled “Responses”Grant Set
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Bad Request
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Forbidden
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Service Unavailable
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}