Files
authentik/website/docs/developer-docs/api/reference/policies-expression-create.api.mdx
2024-09-13 12:17:54 -05:00

448 lines
16 KiB
Plaintext

---
id: policies-expression-create
title: "policies_expression_create"
description: "Source Viewset"
sidebar_label: "policies_expression_create"
hide_title: true
hide_table_of_contents: true
api: eJzVVk1v2zgQ/SsEL3vRWknawyKnbQujCNBsgzjbPRSBQUljiTVFakkqjtfwf+8MKUuyYzsoUGDRQwKams/3Zoaz4aYBK7w0+qbg17wxSuYS3ByeGwvO4f08tyA88IQX4HIrGxJG0ZlpbQ7si4SVA4+fvSgdv/7a2+CPCbfwbwvOvzfFml9veG60B+3pKJoGxYLn9Jsjixvu8gpqQSe/bgB9mOwb5P6F64/WtA27hToD6yrZsDtyuWYzsFIo+R9YVGkspeYpEDSoRQ0jw85bqUuUqqX+BLr0Fb++3CYcniFvyctcmbIkkUEnM0aB0C+i+acCzXwlHTPhiuEJtMgUFAkTSrHeKEosomQTA15J/JwBI2dQTNj7NStgIVrlE2a0Wg+qDKw11jFhe2ke4t3R9Gpy28iGtFAQSyPNJKKDdHnpFVmY9h8jsveRRr7dt+JtC3jhMEYrPTL8FXltPeLh5RJ/PW5DCbgGU480XF1c/r910CyPAbUwthYYDm9bWXCKWRSfEf+Y4oBLZz9IbZMTRfULllFuauSoY+QQnAPMwbNIB+u1mDMYj/BsBWypzYpV+OcNg0J6/ACs528fWPT8BDYzDuan+nPf+T341urO3G+O7Wm/Yn3eqNYK9eNOot6rvmrwYl6bAtSPJSOxFaxGB0GXnTKfmVYXc29GdkmzDDV+JoG+SLBcgg0k5pj9c5PkcHb0sYwrJ9kfKYdwdN2SUAce0H6cpzPjKM6h/aSpjN9eXPzE6fIFR0gRVNmUuublm4L9vZCginnsqpFJYa1Yo4L0ULvjgOaIzfEvosC+QbdC3Y39bQdAhtBiZCfxePMzpy1onKs5e3d3cwKQAjmXRzrsbLbjwuoMjKjvnJ5JM7ZeZeL64ijuRtCTx9PdJpIOlZlyeq8sFpwLz1VrFUmKRqZPb1JOD9buOZsRLjGx0aPWp1B535CxIEVzHXCo2hAPIXs/bD7TZ1E3CoY1ZJgIRx6K+OKM23EEo9SLOAE6eIbAQhN18lcXV28nf0wuX1B4K5ZoiO20YiEwJym8Sehm7UUeKgVLgqjkFShl/ixN72kiDUWCyAK+6qOkbm8e0EQElMBx12laSl+12QSnRDoykQ6nTJksRVc6/XTzYfrXbBoAJB5roUfGd1SyARh2fDEd1fuRHTVy5+HZp41Ct5RKCHnTVc1ofz2YaFSWFRUYymw2mXDwt1XbLV0j1ZbWHzw+Cdw9MiIH1x9UwDmLVUGltgQU4R9icL8/UCQkrtpA5GFjbpOdxrs8h8aflX0c9cDd5xnxkHUrdx0aj1uxoqmP/7FnEh5XjFDb4W7DldBlK0qSjTbDJGoJkmF1iSWe7A6U1W7g6fUoQoQnSDyYJWiEKOlS8fQbw0Xj3wG+52Ig
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={"policies_expression_create"}
>
</Heading>
<MethodEndpoint
method={"post"}
path={"/policies/expression/"}
>
</MethodEndpoint>
Source Viewset
<Heading
id={"request"}
as={"h2"}
className={"openapi-tabs__heading"}
children={"Request"}
>
</Heading>
<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={"name"}
required={true}
schemaName={"string"}
qualifierMessage={"**Possible values:** `non-empty`"}
schema={{"type":"string","minLength":1}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"execution_logging"}
required={false}
schemaName={"boolean"}
qualifierMessage={undefined}
schema={{"type":"boolean","description":"When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged."}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"expression"}
required={true}
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={"201"}
value={"201"}
>
<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={"pk"}
required={true}
schemaName={"uuid"}
qualifierMessage={undefined}
schema={{"type":"string","format":"uuid","readOnly":true,"title":"Policy uuid"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"name"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"execution_logging"}
required={false}
schemaName={"boolean"}
qualifierMessage={undefined}
schema={{"type":"boolean","description":"When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged."}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"component"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"Get object component so that we know how to edit the object","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"verbose_name"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"Return object's verbose_name","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"verbose_name_plural"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"Return object's plural verbose_name","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"meta_model_name"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"Return internal model name","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"bound_to"}
required={true}
schemaName={"integer"}
qualifierMessage={undefined}
schema={{"type":"integer","description":"Return objects policy is bound to","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"expression"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem>
</ul>
</details>
</TabItem><TabItem
label={"Example (from schema)"}
value={"Example (from schema)"}
>
<ResponseSamples
responseExample={"{\n \"pk\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"name\": \"string\",\n \"execution_logging\": true,\n \"component\": \"string\",\n \"verbose_name\": \"string\",\n \"verbose_name_plural\": \"string\",\n \"meta_model_name\": \"string\",\n \"bound_to\": 0,\n \"expression\": \"string\"\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>