GrantAccess
POST
/api/v1/t/{tenant}/access-grants
const url = 'https://example.com/api/v1/t/example/access-grants';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"principalType":"Role","principalId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","scopeType":"Tenant","scopeId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","level":"Read"}'};
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/v1/t/example/access-grants \ --header 'Content-Type: application/json' \ --data '{ "principalType": "Role", "principalId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "scopeType": "Tenant", "scopeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "level": "Read" }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”tenant
required
string
Tenant slug
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
principalType
required
principalId
required
string format: uuid
scopeType
required
scopeId
required
null | string format: uuid
level
required
Responses
Section titled “ Responses ”OK
Media typeapplication/json
object
id
required
string format: uuid
principalType
required
principalId
required
string format: uuid
principalName
required
null | string
principalKey
required
null | string
scopeType
required
scopeId
required
null | string format: uuid
level
required
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{ "principalType": "Role", "scopeType": "Tenant", "level": "Read"}Bad Request
Media typeapplication/problem+json
object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
errors
object
key
additional properties
Array<string>
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "errors": { "additionalProperty": [ "example" ] }}Forbidden
Media typeapplication/problem+json
object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Conflict
Media typeapplication/problem+json
object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Too Many Requests
Media typeapplication/problem+json
object
type
null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}