Metadata API Reference: Inherited Roles¶
Table of contents
Introduction¶
Inherited roles allow you to create a role which inherits permissions from other existing roles.
Supported from
The metadata API is supported for versions v2.0.0
and above and replaces the older
schema/metadata API.
add_inherited_role¶
add_inherited_role
is used to create a new inherited role with other existing roles.
POST /v1/metadata HTTP/1.1
Content-Type: application/json
X-Hasura-Role: admin
{
"type":"add_inherited_role",
"args":{
"role_name": "sample_inherited_role",
"role_set": [
"role1",
"role2"
]
}
}
drop_inherited_role¶
drop_inherited_role
is used to delete an existing inherited role.
POST /v1/metadata HTTP/1.1
Content-Type: application/json
X-Hasura-Role: admin
{
"type" : "drop_inherited_role",
"args" : {
"role": "sample_inherited_role"
}
}