Get the current user
const url = 'http://localhost:8080/api/auth/me';const options = {method: 'GET', headers: {cookie: 'cetra_session=<cetra_session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:8080/api/auth/me \ --cookie cetra_session=<cetra_session>Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The signed-in user and org memberships.
The signed-in user and the orgs they belong to.
GET /api/auth/me. Spec 09 § Auth.
object
Orgs the user belongs to, with their org role.
One org membership of the signed-in user.
Spec 04 org_members.
object
The demo org (demo.org, D187). Its role is viewer for a caller without a row.
Org id.
Display name.
Org role. A project override of none hides that project and is never returned.
URL slug.
The signed-in user.
object
Email address.
The address has been verified.
A password is set. SSO-only accounts are false.
User id.
Instance administrator, allowed to manage instance settings.
Display name. Omitted when the user has not set one.
Example
{ "orgs": [ { "role": "owner" } ]}No credentials, or the credentials are invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}Too many requests.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}