Files
authentik/website/docs/developer-docs/api/reference/core-users-me-retrieve.api.mdx
Tana M Berry 7a6d44d0df first pass
2024-10-22 15:10:13 -05:00

806 lines
38 KiB
Plaintext

---
id: core-users-me-retrieve
title: "core_users_me_retrieve"
description: "Get information about current user"
sidebar_label: "core_users_me_retrieve"
hide_title: true
hide_table_of_contents: true
api: eJztWN9v2zYQ/lcIYcA21LWyNAWGPKVYjSBAuhVNspckc2jpbLORSJWknLqG//d9R8qxYstZBuTRD4kp8ng/vvt4R2mRmIqs9Mroszw5TjJjaVg7sm5Y0tCSt4pmlPSSnFxmVcWCEDslL5QeG1uGrUKOTO1FVltL2gvejy1eTlxyfB10Jre9xBEElJ9jbpHI2k8hq+7xdLvEqiVXGe0IWxbJ4cEB/2RGewjxUFZVobJgLf3q2IlF4rIplZJHfl4R3DKjr5T5LW+/NKoFHBYwK1L2MC1JkM4ro7TvCYRaW+3CchNHMRcy82pGISDxi3Tijkd3orKMmp//eqOlzntCjbFPuSiH3xEpPRGqhBBclZ4gw4qNVROlZdEI6jB5t5pd6+0jhGasIiAB0v8M9IrVXpBVslA/MOR4n6QpGs6kFqvUNqmDI6WjYgZrm6ar+5ZhYEWTkF1LMv9LF8imtzUh28oXLHH2MVn2gr9altTa6mBQTzqS861WlvK++O39gcim0gJ04AawxJgeyPbFOXme6YkcQHkngLk4Sfvpm/RtOhQGTgTAJEuxyn+ub24e+idv3t6++QkLpfx+Tnrip8kxTMC5lznGYP7sYNNVhZwL3tTn0JQbRlq0VIyMKUjqZ2D5ELdsGvlITk2YIU48TAlZsC0muampixxsEh5qwSIBCkbbfXEFQhcgQZRX2nlYFmYsckx75p/MMlNr71ZeuxpZ3SDSLsexY2JNXbmWrLRWziGpPLjSRcanvNmF8pahJwTbJbbkmcgUrilBedh6u8aYM3ZBxfg0er7ssIV6oYouc/GQYCZKrJUO+FnIPEeBck/ZdPj+CCrlTHppX8ynKN4TpEK2pZh6X6X8z4mrL+dMeylyyODprAuuWuUvgtXh1GCpM1MIR7Fbsvjcztmyq85HKjbKxAPcFiPLR5D/AknWq6FKI0Md7kQXFgnpuuQMciVBiWCo6fvjELZmKqNhw11mWyM33Fy67W1h0CbCJdYGbIuhmON0lEMEWirnENpLaN1o7cREFoWISkVLKY4nn2acU29CaW8a4fNUbvjzeODaFWbj3PZavG8luDPASJRWJe44KBzcqvvsu8u+u+y7y7677LvLvru8VnfZ8CVYaQleUNDG8pDdgoLBOXrVF8G/0bny2KwG1hq7XVWMHo4VFfmQeP3/JBLOZibvqEm8svtErLBYuxY924nHu1fE45Q02nkmPnw+2wFITr6zpD0bbTvnjYJW1hujz4SJqRLdyvAHiQn52H1REZOUPyWEl3eHt/e0OdHEebrGO7ItWEZWKp29S5Nl65PDBQMSI2p9eHj0nesjKwtS3LdI2sBJLhBjEyQb79fbewlbjj4fHhwe9X/vH24h/Eneh2bZ7Ip5Ek6VVUF8reBE4jSG0hWbRzKlojAnE/Noqa8M440sE7ryuvkln84u+QiGsEOJP05TXGGm9aifmTJtqUjXo1FhRilM6fT87I/BnxeDEGZlnC+lbilnqEOJcaIksetLUIuKL/woFBH3qMopbj5Kh/ucDRSLWW4+GMXaEnoiPzCDpnCS1xeLkXR0ZYvlkqe/1WT5oxKGM4nb6YgTdX0LvVOURr6QgBz3NA/3pIwqJtRMFnVI5+bpYdY8ku90wAAzdu1LTSRHbzVg7asaoect3XAzSFyae9Jwtdc44fkZhsD9fwGBi8b4
sidebar_class_name: "get 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 Heading from "@theme/Heading";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
<Heading
as={"h1"}
className={"openapi__heading"}
children={"core_users_me_retrieve"}
>
</Heading>
<MethodEndpoint
method={"get"}
path={"/core/users/me/"}
>
</MethodEndpoint>
Get information about current user
<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"}}
>
<SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<span
className={"openapi-schema__container"}
>
<strong
className={"openapi-schema__property"}
>
user
</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"}}
>
<div
style={{"marginTop":".5rem","marginBottom":".5rem"}}
>
User Serializer for information a user can retrieve about themselves
</div><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={true}
schemaName={"Active (boolean)"}
qualifierMessage={undefined}
schema={{"type":"boolean","readOnly":true,"title":"Active","description":"Designates whether this user should be treated as active. Unselect this instead of deleting accounts."}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"is_superuser"}
required={true}
schemaName={"boolean"}
qualifierMessage={undefined}
schema={{"type":"boolean","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<span
className={"openapi-schema__container"}
>
<strong
className={"openapi-schema__property"}
>
groups
</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={"name"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"pk"}
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={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={false}
name={"avatar"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"User's avatar, either a http/https URL or a data URI","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"uid"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<span
className={"openapi-schema__container"}
>
<strong
className={"openapi-schema__property"}
>
settings
</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"}}
>
<div
style={{"marginTop":".5rem","marginBottom":".5rem"}}
>
Get user settings with brand and group settings applied
</div><SchemaItem
name={"property name*"}
required={false}
schemaName={"any"}
qualifierMessage={undefined}
schema={{"type":"object","additionalProperties":{},"description":"Get user settings with brand and group settings applied","readOnly":true}}
collapsible={false}
discriminator={false}
>
</SchemaItem>
</div>
</details>
</SchemaItem><SchemaItem
collapsible={false}
name={"type"}
required={false}
schemaName={"UserTypeEnum (string)"}
qualifierMessage={"**Possible values:** [`internal`, `external`, `service_account`, `internal_service_account`]"}
schema={{"enum":["internal","external","service_account","internal_service_account"],"type":"string","title":"UserTypeEnum"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"system_permissions"}
required={true}
schemaName={"string[]"}
qualifierMessage={undefined}
schema={{"type":"array","items":{"type":"string"},"description":"Get all system permissions assigned to the user","readOnly":true}}
>
</SchemaItem>
</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"}
>
original
</strong><span
className={"openapi-schema__name"}
>
object
</span>
</span>
</summary><div
style={{"marginLeft":"1rem"}}
>
<div
style={{"marginTop":".5rem","marginBottom":".5rem"}}
>
User Serializer for information a user can retrieve about themselves
</div><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={true}
schemaName={"Active (boolean)"}
qualifierMessage={undefined}
schema={{"type":"boolean","readOnly":true,"title":"Active","description":"Designates whether this user should be treated as active. Unselect this instead of deleting accounts."}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"is_superuser"}
required={true}
schemaName={"boolean"}
qualifierMessage={undefined}
schema={{"type":"boolean","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<span
className={"openapi-schema__container"}
>
<strong
className={"openapi-schema__property"}
>
groups
</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={"name"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"pk"}
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={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={false}
name={"avatar"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"User's avatar, either a http/https URL or a data URI","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"uid"}
required={true}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","readOnly":true}}
>
</SchemaItem><SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<span
className={"openapi-schema__container"}
>
<strong
className={"openapi-schema__property"}
>
settings
</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"}}
>
<div
style={{"marginTop":".5rem","marginBottom":".5rem"}}
>
Get user settings with brand and group settings applied
</div><SchemaItem
name={"property name*"}
required={false}
schemaName={"any"}
qualifierMessage={undefined}
schema={{"type":"object","additionalProperties":{},"description":"Get user settings with brand and group settings applied","readOnly":true}}
collapsible={false}
discriminator={false}
>
</SchemaItem>
</div>
</details>
</SchemaItem><SchemaItem
collapsible={false}
name={"type"}
required={false}
schemaName={"UserTypeEnum (string)"}
qualifierMessage={"**Possible values:** [`internal`, `external`, `service_account`, `internal_service_account`]"}
schema={{"enum":["internal","external","service_account","internal_service_account"],"type":"string","title":"UserTypeEnum"}}
>
</SchemaItem><SchemaItem
collapsible={false}
name={"system_permissions"}
required={true}
schemaName={"string[]"}
qualifierMessage={undefined}
schema={{"type":"array","items":{"type":"string"},"description":"Get all system permissions assigned to the user","readOnly":true}}
>
</SchemaItem>
</div>
</details>
</SchemaItem>
</ul>
</details>
</TabItem><TabItem
label={"Example (from schema)"}
value={"Example (from schema)"}
>
<ResponseSamples
responseExample={"{\n \"user\": {\n \"pk\": 0,\n \"username\": \"string\",\n \"name\": \"string\",\n \"is_active\": true,\n \"is_superuser\": true,\n \"groups\": [\n {\n \"name\": \"string\",\n \"pk\": \"string\"\n }\n ],\n \"email\": \"user@example.com\",\n \"avatar\": \"string\",\n \"uid\": \"string\",\n \"settings\": {},\n \"type\": \"internal\",\n \"system_permissions\": [\n \"string\"\n ]\n },\n \"original\": {\n \"pk\": 0,\n \"username\": \"string\",\n \"name\": \"string\",\n \"is_active\": true,\n \"is_superuser\": true,\n \"groups\": [\n {\n \"name\": \"string\",\n \"pk\": \"string\"\n }\n ],\n \"email\": \"user@example.com\",\n \"avatar\": \"string\",\n \"uid\": \"string\",\n \"settings\": {},\n \"type\": \"internal\",\n \"system_permissions\": [\n \"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>