Skip to content

HTTP API

Who is calling

GET
/v1/me
curl --request GET \
--url https://sergo.example.com/v1/me \
--header 'Authorization: Bearer <token>'

The key you called with: its type, its access and, for an agent key, its name. A quick way to check that a key works.

Successful Response

Media typeapplication/json
Me
object
user
required

The person, when called from a console session

Any of:
PublicUser
object
id
required
Id
string
username
required
Username

The username — it may be an email address

string
name
required
Name

The display name

string
role
required
Role

user or admin

string
title
required
Title

A job title an admin set, if any

Any of:
string
password_change_required
required
Password Change Required

Signed in with a password someone else set — only the console can continue

boolean
key
required

The key, when called with a key

Any of:
KeyIdentity
object
type
required
Type

An agent key or a personal key

string
Allowed values: agent personal
access
required
Access

read_write can also upload

string
Allowed values: read read_write
masked
required
Masked

The key with most of it hidden, as the console shows it

string
agent_key
required

For an agent key, its id and name

Any of:
Ref
object
id
required
Id
string
name
required
Name

Its name, or null if it was deleted

Any of:
string

Example

{
"user": {
"password_change_required": false
},
"key": {
"type": "agent",
"access": "read"
}
}