Files
authentik/website/docs/developer-docs/api/reference/rbac-permissions-assigned-by-roles-assign.api.mdx
2024-09-13 12:17:54 -05:00

413 lines
22 KiB
Plaintext

---
id: rbac-permissions-assigned-by-roles-assign
title: "rbac_permissions_assigned_by_roles_assign"
description: "Assign permission(s) to role. When `object_pk` is set, the permissions"
sidebar_label: "rbac_permissions_assigned_by_roles_assign"
hide_title: true
hide_table_of_contents: true
api: eJzNGcuO2zbwVwSdGsClkk0OhU9N00WxQNIu8mgP6cKhJNpmTJEqSXlXMPzvnSH1tKxHgh56MEUOZ4bzIjkcn0KVM00tV/IuDdehjmmyAUjGjQGY2VD47iRLN3G50UqwGhKuwpSZRPMcaYHytQMHLe0P5llgVYBEJPhrz2TwRcVfWWI3+eFLwE1gmF0Fds86NOZvSTULlBRlUK+MTBDL5CzhW54EnssqUADVj9wwnAZ8IGxodkLFVIiSgJw51TRjlmkTrj+fQo7S5tTuYUrCBIyKgqcwMsmeZTRcn0Jb5gg3VnO5g5mt0hm1NeZ5oHvw6dPdr4FHD3jKpOXbEvt2D4q+RxMAF83+KbhmYGerC3Z+WIWW7lAoZ/bwwWMwY39RaYliJEpa4IVdmueCJ85R0VeDq56G8nrLDFzz3nNFQ3oDBTSQ7LFjd7SSxkiwnBlk2HFJhz/VmpaAyy3LzDU7ZVy+ZXIHtl2/OIOZMpUygYhMFhkqSgvwFVjnsAHFqLSGpCqjHAVopxJd5laRBMXZotLswMqcct3D2gr1aAi2I2AD1mUxl6mXrUVRhc2VcWsnBwgLpo88YWBsCdbz1riCfChipiXEkVlIUHV6k7kCL4KNN2mRZSVxrYOV19HYEQAbiD1wtSZuVA0mqZ5yrkuSg7cflU79cIZAM+du0nanCHZM8Zy4dgqtlqARZQpZs7ywLsJJ250gIH7umochmI+wDbXZiJTmBJsaNIKnEHhDTAK7IAPscY4Vpv/McIXeE/gB2xlMTVNeGOI/34Nb7d9yWnhDM0GwmVmii7eEbcIzgs0c2xrvGjs8BAleFz2oUYVOWMeRHrAEZ0r2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MR4GxCouBRRMXWC5ZRMWZEOrnnWpWIlyhJPWNjtvGV4rf3X0EFt7EaC6zjqIdt/sihmQ4izosorYXCxVHqHL09u7N7e8fbp1J0e0ZlR3m6Pne0dSUs+PS1dFryKXOnd3yP67DV1Fm2ZONcoERcK5MeaqCvyqEr3pBBUfL5QYA2Lqq2TcGwZDb404CLqdTTA37pMX5jGAIW403EnSPVHMaY1jBTkm5wT7swS0Vhk0Y9Yf31X5/Fiys9V9Vtj5nJZ6y8BYscATdAyub/xYeAG/PKCZHKKOfeuMl+fEjMmhJBwfjeVVTvE4gJ7STuA+dM+j+jw8Y2HH1x0PmDr5QU6ytY+vEVM4y7vhwsFMoqNwVmFGtQ8/T3QQF+rI5VapTZFV3UKurhgCvOYyPmGSD52q7+KQbDHM+/wtN+wuk
sidebar_class_name: "post api-method"
info_path: docs/developer-docs/api/reference/authentik
custom_edit_url: null
hide_send_button: true
---
import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Markdown from "@theme/Markdown";
import Heading from "@theme/Heading";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
<Heading
as={"h1"}
className={"openapi__heading"}
children={"rbac_permissions_assigned_by_roles_assign"}
>
</Heading>
<MethodEndpoint
method={"post"}
path={"/rbac/permissions/assigned_by_roles/{uuid}/assign/"}
>
</MethodEndpoint>
Assign permission(s) to role. When `object_pk` is set, the permissions
are only assigned to the specific object, otherwise they are assigned globally.
<Heading
id={"request"}
as={"h2"}
className={"openapi-tabs__heading"}
children={"Request"}
>
</Heading>
<details
style={{"marginBottom":"1rem"}}
className={"openapi-markdown__details"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
>
<h3
className={"openapi-markdown__details-summary-header-params"}
>
Path Parameters
</h3>
</summary><div>
<ul>
<ParamsItem
className={"paramsItem"}
param={{"in":"path","name":"uuid","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this Role.","required":true}}
>
</ParamsItem>
</ul>
</div>
</details><MimeTabs
className={"openapi-tabs__mime"}
>
<TabItem
label={"application/json"}
value={"application/json-schema"}
>
<details
style={{}}
className={"openapi-markdown__details mime"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-mime"}
>
<h3
className={"openapi-markdown__details-summary-header-body"}
>
Body
</h3><strong
className={"openapi-schema__required"}
>
required
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"permissions"}
required={true}
schemaName={"string[]"}
qualifierMessage={"**Possible values:** `non-empty`"}
schema={{"type":"array","items":{"type":"string","minLength":1}}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"model"}
required={false}
schemaName={"ModelEnum (string)"}
qualifierMessage={"**Possible values:** [`authentik_tenants.domain`, `authentik_crypto.certificatekeypair`, `authentik_flows.flow`, `authentik_flows.flowstagebinding`, `authentik_outposts.dockerserviceconnection`, `authentik_outposts.kubernetesserviceconnection`, `authentik_outposts.outpost`, `authentik_policies_dummy.dummypolicy`, `authentik_policies_event_matcher.eventmatcherpolicy`, `authentik_policies_expiry.passwordexpirypolicy`, `authentik_policies_expression.expressionpolicy`, `authentik_policies_geoip.geoippolicy`, `authentik_policies_password.passwordpolicy`, `authentik_policies_reputation.reputationpolicy`, `authentik_policies.policybinding`, `authentik_providers_ldap.ldapprovider`, `authentik_providers_oauth2.scopemapping`, `authentik_providers_oauth2.oauth2provider`, `authentik_providers_proxy.proxyprovider`, `authentik_providers_radius.radiusprovider`, `authentik_providers_radius.radiusproviderpropertymapping`, `authentik_providers_saml.samlprovider`, `authentik_providers_saml.samlpropertymapping`, `authentik_providers_scim.scimprovider`, `authentik_providers_scim.scimmapping`, `authentik_rbac.role`, `authentik_sources_ldap.ldapsource`, `authentik_sources_ldap.ldapsourcepropertymapping`, `authentik_sources_oauth.oauthsource`, `authentik_sources_oauth.oauthsourcepropertymapping`, `authentik_sources_oauth.useroauthsourceconnection`, `authentik_sources_oauth.groupoauthsourceconnection`, `authentik_sources_plex.plexsource`, `authentik_sources_plex.plexsourcepropertymapping`, `authentik_sources_plex.userplexsourceconnection`, `authentik_sources_plex.groupplexsourceconnection`, `authentik_sources_saml.samlsource`, `authentik_sources_saml.samlsourcepropertymapping`, `authentik_sources_saml.usersamlsourceconnection`, `authentik_sources_saml.groupsamlsourceconnection`, `authentik_sources_scim.scimsource`, `authentik_sources_scim.scimsourcepropertymapping`, `authentik_stages_authenticator_duo.authenticatorduostage`, `authentik_stages_authenticator_duo.duodevice`, `authentik_stages_authenticator_sms.authenticatorsmsstage`, `authentik_stages_authenticator_sms.smsdevice`, `authentik_stages_authenticator_static.authenticatorstaticstage`, `authentik_stages_authenticator_static.staticdevice`, `authentik_stages_authenticator_totp.authenticatortotpstage`, `authentik_stages_authenticator_totp.totpdevice`, `authentik_stages_authenticator_validate.authenticatorvalidatestage`, `authentik_stages_authenticator_webauthn.authenticatorwebauthnstage`, `authentik_stages_authenticator_webauthn.webauthndevice`, `authentik_stages_captcha.captchastage`, `authentik_stages_consent.consentstage`, `authentik_stages_consent.userconsent`, `authentik_stages_deny.denystage`, `authentik_stages_dummy.dummystage`, `authentik_stages_email.emailstage`, `authentik_stages_identification.identificationstage`, `authentik_stages_invitation.invitationstage`, `authentik_stages_invitation.invitation`, `authentik_stages_password.passwordstage`, `authentik_stages_prompt.prompt`, `authentik_stages_prompt.promptstage`, `authentik_stages_user_delete.userdeletestage`, `authentik_stages_user_login.userloginstage`, `authentik_stages_user_logout.userlogoutstage`, `authentik_stages_user_write.userwritestage`, `authentik_brands.brand`, `authentik_blueprints.blueprintinstance`, `authentik_core.group`, `authentik_core.user`, `authentik_core.application`, `authentik_core.token`, `authentik_enterprise.license`, `authentik_providers_google_workspace.googleworkspaceprovider`, `authentik_providers_google_workspace.googleworkspaceprovidermapping`, `authentik_providers_microsoft_entra.microsoftentraprovider`, `authentik_providers_microsoft_entra.microsoftentraprovidermapping`, `authentik_providers_rac.racprovider`, `authentik_providers_rac.endpoint`, `authentik_providers_rac.racpropertymapping`, `authentik_stages_source.sourcestage`, `authentik_events.event`, `authentik_events.notificationtransport`, `authentik_events.notification`, `authentik_events.notificationrule`, `authentik_events.notificationwebhookmapping`]"}
schema={{"enum":["authentik_tenants.domain","authentik_crypto.certificatekeypair","authentik_flows.flow","authentik_flows.flowstagebinding","authentik_outposts.dockerserviceconnection","authentik_outposts.kubernetesserviceconnection","authentik_outposts.outpost","authentik_policies_dummy.dummypolicy","authentik_policies_event_matcher.eventmatcherpolicy","authentik_policies_expiry.passwordexpirypolicy","authentik_policies_expression.expressionpolicy","authentik_policies_geoip.geoippolicy","authentik_policies_password.passwordpolicy","authentik_policies_reputation.reputationpolicy","authentik_policies.policybinding","authentik_providers_ldap.ldapprovider","authentik_providers_oauth2.scopemapping","authentik_providers_oauth2.oauth2provider","authentik_providers_proxy.proxyprovider","authentik_providers_radius.radiusprovider","authentik_providers_radius.radiusproviderpropertymapping","authentik_providers_saml.samlprovider","authentik_providers_saml.samlpropertymapping","authentik_providers_scim.scimprovider","authentik_providers_scim.scimmapping","authentik_rbac.role","authentik_sources_ldap.ldapsource","authentik_sources_ldap.ldapsourcepropertymapping","authentik_sources_oauth.oauthsource","authentik_sources_oauth.oauthsourcepropertymapping","authentik_sources_oauth.useroauthsourceconnection","authentik_sources_oauth.groupoauthsourceconnection","authentik_sources_plex.plexsource","authentik_sources_plex.plexsourcepropertymapping","authentik_sources_plex.userplexsourceconnection","authentik_sources_plex.groupplexsourceconnection","authentik_sources_saml.samlsource","authentik_sources_saml.samlsourcepropertymapping","authentik_sources_saml.usersamlsourceconnection","authentik_sources_saml.groupsamlsourceconnection","authentik_sources_scim.scimsource","authentik_sources_scim.scimsourcepropertymapping","authentik_stages_authenticator_duo.authenticatorduostage","authentik_stages_authenticator_duo.duodevice","authentik_stages_authenticator_sms.authenticatorsmsstage","authentik_stages_authenticator_sms.smsdevice","authentik_stages_authenticator_static.authenticatorstaticstage","authentik_stages_authenticator_static.staticdevice","authentik_stages_authenticator_totp.authenticatortotpstage","authentik_stages_authenticator_totp.totpdevice","authentik_stages_authenticator_validate.authenticatorvalidatestage","authentik_stages_authenticator_webauthn.authenticatorwebauthnstage","authentik_stages_authenticator_webauthn.webauthndevice","authentik_stages_captcha.captchastage","authentik_stages_consent.consentstage","authentik_stages_consent.userconsent","authentik_stages_deny.denystage","authentik_stages_dummy.dummystage","authentik_stages_email.emailstage","authentik_stages_identification.identificationstage","authentik_stages_invitation.invitationstage","authentik_stages_invitation.invitation","authentik_stages_password.passwordstage","authentik_stages_prompt.prompt","authentik_stages_prompt.promptstage","authentik_stages_user_delete.userdeletestage","authentik_stages_user_login.userloginstage","authentik_stages_user_logout.userlogoutstage","authentik_stages_user_write.userwritestage","authentik_brands.brand","authentik_blueprints.blueprintinstance","authentik_core.group","authentik_core.user","authentik_core.application","authentik_core.token","authentik_enterprise.license","authentik_providers_google_workspace.googleworkspaceprovider","authentik_providers_google_workspace.googleworkspaceprovidermapping","authentik_providers_microsoft_entra.microsoftentraprovider","authentik_providers_microsoft_entra.microsoftentraprovidermapping","authentik_providers_rac.racprovider","authentik_providers_rac.endpoint","authentik_providers_rac.racpropertymapping","authentik_stages_source.sourcestage","authentik_events.event","authentik_events.notificationtransport","authentik_events.notification","authentik_events.notificationrule","authentik_events.notificationwebhookmapping"],"type":"string","title":"ModelEnum"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"object_pk"}
required={false}
schemaName={"string"}
qualifierMessage={"**Possible values:** `non-empty`"}
schema={{"type":"string","minLength":1}}
>
</SchemaItem>
</ul>
</details>
</TabItem>
</MimeTabs><div>
<div>
<ApiTabs
label={undefined}
id={undefined}
>
<TabItem
label={"200"}
value={"200"}
>
<div>
</div><div>
<MimeTabs
className={"openapi-tabs__mime"}
schemaType={"response"}
>
<TabItem
label={"application/json"}
value={"application/json"}
>
<SchemaTabs
className={"openapi-tabs__schema"}
>
<TabItem
label={"Schema"}
value={"Schema"}
>
<details
style={{}}
className={"openapi-markdown__details response"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-response"}
>
<strong>
Schema
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<li>
<div
style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}
>
Array [
</div>
</li><SchemaItem
collapsible={false}
name={"id"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem><li>
<div
style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}
>
]
</div>
</li>
</ul>
</details>
</TabItem><TabItem
label={"Example (from schema)"}
value={"Example (from schema)"}
>
<ResponseSamples
responseExample={"[\n {\n \"id\": \"string\"\n }\n]"}
language={"json"}
>
</ResponseSamples>
</TabItem>
</SchemaTabs>
</TabItem>
</MimeTabs>
</div>
</TabItem><TabItem
label={"400"}
value={"400"}
>
<div>
</div><div>
<MimeTabs
className={"openapi-tabs__mime"}
schemaType={"response"}
>
<TabItem
label={"application/json"}
value={"application/json"}
>
<SchemaTabs
className={"openapi-tabs__schema"}
>
<TabItem
label={"Schema"}
value={"Schema"}
>
<details
style={{}}
className={"openapi-markdown__details response"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-response"}
>
<strong>
Schema
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"non_field_errors"}
required={false}
schemaName={"string[]"}
qualifierMessage={undefined}
schema={{"type":"array","items":{"type":"string"}}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"code"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem><SchemaItem
name={"property name*"}
required={false}
schemaName={"any"}
qualifierMessage={undefined}
schema={{"type":"object","description":"Validation Error","properties":{"non_field_errors":{"type":"array","items":{"type":"string"}},"code":{"type":"string"}},"additionalProperties":{},"title":"ValidationError"}}
collapsible={false}
discriminator={false}
>
</SchemaItem>
</ul>
</details>
</TabItem><TabItem
label={"Example (from schema)"}
value={"Example (from schema)"}
>
<ResponseSamples
responseExample={"{\n \"non_field_errors\": [\n \"string\"\n ],\n \"code\": \"string\"\n}"}
language={"json"}
>
</ResponseSamples>
</TabItem>
</SchemaTabs>
</TabItem>
</MimeTabs>
</div>
</TabItem><TabItem
label={"403"}
value={"403"}
>
<div>
</div><div>
<MimeTabs
className={"openapi-tabs__mime"}
schemaType={"response"}
>
<TabItem
label={"application/json"}
value={"application/json"}
>
<SchemaTabs
className={"openapi-tabs__schema"}
>
<TabItem
label={"Schema"}
value={"Schema"}
>
<details
style={{}}
className={"openapi-markdown__details response"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-response"}
>
<strong>
Schema
</strong>
</summary><div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
</div><ul
style={{"marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"detail"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"code"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem>
</ul>
</details>
</TabItem><TabItem
label={"Example (from schema)"}
value={"Example (from schema)"}
>
<ResponseSamples
responseExample={"{\n \"detail\": \"string\",\n \"code\": \"string\"\n}"}
language={"json"}
>
</ResponseSamples>
</TabItem>
</SchemaTabs>
</TabItem>
</MimeTabs>
</div>
</TabItem>
</ApiTabs>
</div>
</div>