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

762 lines
30 KiB
Plaintext

---
id: core-groups-create
title: "core_groups_create"
description: "Group Viewset"
sidebar_label: "core_groups_create"
hide_title: true
hide_table_of_contents: true
api: eJzNV21v2zYQ/isEMWAfYlvOm9vlU7s2GAKka5E0/ZJmBi2dLTYUqZFUnNTwf98dKVuyY2UZGmz7YsjS3fHuuedeuOCmBCu8NPos4yc8NRbGM2uq0o1TC8ID7/EMXGplSUIo8ht9ZV8kzB14/OrFzPGT66DKb3rcwp8VOP+ryR74yQJfaw/a06MoSyXTcFjyzZGxBXdpDoWgJ/9QApo3k2+Q+o5TL8FKoeR3sChQWvLdS3CkrkUBLTPOW6lnKFVIfQ565nN+sr/scenGrkK1yqGNRnxijAKhHx17hWKOiSyDjHnDfC4dC/CwuVSKTYCtrbkBR/ulsHW0245MjS0EfuFVJTP8ryulxEShjLcVoGow0tIU1ooHFJQeivZ7iYDO0Psl6giP5ieVB7cLQvRbUiBCfWpjRYoW433OYR3uL4MNzLS0kFH2A/yYfS89hRTzdRGpsC1dx+sgraz0yJJr5EblcwRO3uK/m2WgkSuNdtHJg+H+v8ml8vY5CcTyyD5q9RAD2gqdRZgozcV4w94qfdsGSHYnh//frI2q467y2wbpRVgfdMaY3WfodXDgEh0sS8QnM3PNyCBza0IQaC43c2ZBwZ3QPgg4hmBEHN3TlOlKccORs/e8jqMLuE13L+riGbD94yFLc2FF6skl9GgKc7ADdg6e3vRYJmfSY/p1xt4kg2Qv6SdjZtCJAXktSIpM/nH99et88Gavf7P3E/VJcb/uk8fDTjLuotrPDs90pRIPjJQGNWPRQ3kHO+m6guFtFNk2+h6cnGkcPo7Nc8DGYCOHY5pyU6mMSOzDgMqYwGCDoQG7wo6hMN9RXmrnMQHMTFmGrz0GgJKpqbSPvFfC+bEyM6mf5H6Gx/S9LGBXAWDLkepJ9SjRRH1K/6k8sce5TegPjo9+pKtTjf5tEe5s3T1icDTQ4uV2Q/8AxYRq8Bl1/d9NptrEj/WHCzTR6ggvPCKuVsOha2nZLMbOhLXyQw4/TkyHaj2UNrt3TYEGvHaj3WZCnOmbmNHxR8PhC07qL4h+FlTZqbVmx9Zn9HgqQWVjoO//gDfkfmqyXfN22c3PBoXGtehZJx6HL7m5gEZKpuztp7MOQDLwO9vRk9G2GVIbaOc7HvpEmPiqwDZt6AZRGufjnEHy8oRuBUmcmQmnnc/ehXmPK19lFUmIUiZ3hwmnpW+1El4SHjGg1mK4dj33viRjQYoGCyCN42pAiF40N5DTe1GUCpoLQlNjmztVrM/VHsQPp+L18XR01D9+tf+qf3Q8OuhPDqdp/yD9ZXQ4HY3EVIz4enm5Ht5sNbymj10/z9YNzUw9NSHKGvgm9B4n1CLcB8ODo8Hrwf4jcnwQt2HA1VqRYsxJAoBGP3EQ5ySdUM8snoNS5s3MrE8aSBPmokwBJ2kLtg9nnynekDKC350kCa4ZeTUZpKZIWiaS5mmizCTBo3Ryfvbu9PfL05AiYkghdMs4kaRerNjuW2ergh5fQCMpPNz7BJcQnOXL2tNFTcP6ctrj6+WN+J0TU/HbYjERDq6sWi7pNXLH0p0EH+8E9v8w1K4pPzm2VuIKcvcWUIS/iz71P5MHJK6qkLftCl/2Vhpv0xRK/6TsTauYPn28JNgn9V26CBXMrZhTn8ZfLL4e3uBJOxRLeLfAtUbPKjEj2WgztLSKoGiWsVgzvdUDRbXqnPqh5SHCEyQ+m1vQCFGvDsXTf3QXjf8FJMyV/Q==
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={"core_groups_create"}
>
</Heading>
<MethodEndpoint
method={"post"}
path={"/core/groups/"}
>
</MethodEndpoint>
Group 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={"is_superuser"}
required={false}
schemaName={"boolean"}
qualifierMessage={undefined}
schema={{"type":"boolean","description":"Users added to this group will be superusers."}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"parent"}
required={false}
schemaName={"uuid"}
qualifierMessage={undefined}
schema={{"type":"string","format":"uuid","nullable":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"users"}
required={false}
schemaName={"integer[]"}
qualifierMessage={undefined}
schema={{"type":"array","items":{"type":"integer"}}}
>
</SchemaItem><SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<span
className={"openapi-schema__container"}
>
<strong
className={"openapi-schema__property"}
>
attributes
</strong><span
className={"openapi-schema__name"}
>
object
</span>
</span>
</summary><div
style={{"marginLeft":"1rem"}}
>
<SchemaItem
name={"property name*"}
required={false}
schemaName={"any"}
qualifierMessage={undefined}
schema={{"type":"object","additionalProperties":{}}}
collapsible={false}
discriminator={false}
>
</SchemaItem>
</div>
</details>
</SchemaItem><SchemaItem
collapsible={false}
name={"roles"}
required={false}
schemaName={"uuid[]"}
qualifierMessage={undefined}
schema={{"type":"array","items":{"type":"string","format":"uuid"}}}
>
</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":"Group uuid"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"num_pk"}
required={true}
schemaName={"integer"}
qualifierMessage={undefined}
schema={{"type":"integer","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"name"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"is_superuser"}
required={false}
schemaName={"boolean"}
qualifierMessage={undefined}
schema={{"type":"boolean","description":"Users added to this group will be superusers."}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"parent"}
required={false}
schemaName={"uuid"}
qualifierMessage={undefined}
schema={{"type":"string","format":"uuid","nullable":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"parent_name"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","readOnly":true,"nullable":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"users"}
required={false}
schemaName={"integer[]"}
qualifierMessage={undefined}
schema={{"type":"array","items":{"type":"integer"}}}
>
</SchemaItem><SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<span
className={"openapi-schema__container"}
>
<strong
className={"openapi-schema__property"}
>
users_obj
</strong><span
className={"openapi-schema__name"}
>
object[]
</span><span
className={"openapi-schema__divider"}
>
</span><span
className={"openapi-schema__nullable"}
>
nullable
</span><span
className={"openapi-schema__required"}
>
required
</span>
</span>
</summary><div
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={"pk"}
required={true}
schemaName={"ID (integer)"}
qualifierMessage={undefined}
schema={{"type":"integer","readOnly":true,"title":"ID"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"username"}
required={true}
schemaName={"string"}
qualifierMessage={"**Possible values:** `<= 150 characters`, Value must match regular expression `^[\\w.@+-]+$`"}
schema={{"type":"string","description":"Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.","pattern":"^[\\w.@+-]+$","maxLength":150}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"name"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"User's display name."}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"is_active"}
required={false}
schemaName={"Active (boolean)"}
qualifierMessage={undefined}
schema={{"type":"boolean","title":"Active","description":"Designates whether this user should be treated as active. Unselect this instead of deleting accounts."}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"last_login"}
required={false}
schemaName={"date-time"}
qualifierMessage={undefined}
schema={{"type":"string","format":"date-time","nullable":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"email"}
required={false}
schemaName={"email"}
qualifierMessage={"**Possible values:** `<= 254 characters`"}
schema={{"type":"string","format":"email","title":"Email address","maxLength":254}}
>
</SchemaItem><SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<span
className={"openapi-schema__container"}
>
<strong
className={"openapi-schema__property"}
>
attributes
</strong><span
className={"openapi-schema__name"}
>
object
</span>
</span>
</summary><div
style={{"marginLeft":"1rem"}}
>
<SchemaItem
name={"property name*"}
required={false}
schemaName={"any"}
qualifierMessage={undefined}
schema={{"type":"object","additionalProperties":{}}}
collapsible={false}
discriminator={false}
>
</SchemaItem>
</div>
</details>
</SchemaItem><SchemaItem
collapsible={false}
name={"uid"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","readOnly":true}}
>
</SchemaItem><li>
<div
style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}
>
]
</div>
</li>
</div>
</details>
</SchemaItem><SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<span
className={"openapi-schema__container"}
>
<strong
className={"openapi-schema__property"}
>
attributes
</strong><span
className={"openapi-schema__name"}
>
object
</span>
</span>
</summary><div
style={{"marginLeft":"1rem"}}
>
<SchemaItem
name={"property name*"}
required={false}
schemaName={"any"}
qualifierMessage={undefined}
schema={{"type":"object","additionalProperties":{}}}
collapsible={false}
discriminator={false}
>
</SchemaItem>
</div>
</details>
</SchemaItem><SchemaItem
collapsible={false}
name={"roles"}
required={false}
schemaName={"uuid[]"}
qualifierMessage={undefined}
schema={{"type":"array","items":{"type":"string","format":"uuid"}}}
>
</SchemaItem><SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<span
className={"openapi-schema__container"}
>
<strong
className={"openapi-schema__property"}
>
roles_obj
</strong><span
className={"openapi-schema__name"}
>
object[]
</span><span
className={"openapi-schema__divider"}
>
</span><span
className={"openapi-schema__required"}
>
required
</span>
</span>
</summary><div
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={"pk"}
required={true}
schemaName={"uuid"}
qualifierMessage={undefined}
schema={{"type":"string","format":"uuid","readOnly":true,"title":"Uuid"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"name"}
required={true}
schemaName={"string"}
qualifierMessage={"**Possible values:** `<= 150 characters`"}
schema={{"type":"string","maxLength":150}}
>
</SchemaItem><li>
<div
style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}
>
]
</div>
</li>
</div>
</details>
</SchemaItem>
</ul>
</details>
</TabItem><TabItem
label={"Example (from schema)"}
value={"Example (from schema)"}
>
<ResponseSamples
responseExample={"{\n \"pk\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"num_pk\": 0,\n \"name\": \"string\",\n \"is_superuser\": true,\n \"parent\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"parent_name\": \"string\",\n \"users\": [\n 0\n ],\n \"users_obj\": [\n {\n \"pk\": 0,\n \"username\": \"string\",\n \"name\": \"string\",\n \"is_active\": true,\n \"last_login\": \"2024-09-13T14:05:42.118Z\",\n \"email\": \"user@example.com\",\n \"attributes\": {},\n \"uid\": \"string\"\n }\n ],\n \"attributes\": {},\n \"roles\": [\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n ],\n \"roles_obj\": [\n {\n \"pk\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"name\": \"string\"\n }\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>