User API
User routes manage the authenticated user's profile, usage metadata, and self-service API keys.
API call order
- Sign in at the identity provider for an access token, or hold an
eve_API key. - Send either one as
Authorization: Bearer <token>. - Call user routes (
/users/me,/users/me/token-usage,/userspatch,/users/api-keys).
Shared request setup is documented once in API index.
Get current user profile
GET /users/me
Return the authenticated user's profile.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user
|
User
|
Authenticated user injected by dependency. |
Depends(get_current_user)
|
Returns:
| Type | Description |
|---|---|
UserPublic
|
The public subset of the current user's profile. |
Usage
resp = requests.get(
f"{BASE_URL}/users/me",
headers=headers,
timeout=30,
)
resp.raise_for_status()
print(resp.json())
Explanation
Returns the authenticated user's profile document.
Notes
- Requires
Authorization: Bearer <access_token>.
Get token usage
GET /users/me/token-usage
Usage
resp = requests.get(
f"{BASE_URL}/users/me/token-usage",
headers=headers,
timeout=30,
)
resp.raise_for_status()
print(resp.json())
Explanation
Returns token budget and usage information for the current user.
Notes
- Useful for client-side quota indicators.
Update current user
PATCH /users
Update the authenticated user's profile.
The two names are always written. country and institution are
written only when the body carries them, so a client that sends just the
names leaves them untouched; an empty string or null clears one. Only these
fields are ever written: a $set of the request body, never a
full-document replace, so a concurrent token-budget update on the same row
is never clobbered.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
UpdateUserRequest
|
New names and, optionally, country and institution. |
required |
user
|
User
|
Authenticated user injected by dependency. |
Depends(get_current_user)
|
Returns:
| Type | Description |
|---|---|
UserPublic
|
The public subset of the updated user's profile. |
Usage
resp = requests.patch(
f"{BASE_URL}/users",
json={
"first_name": "Astro",
"last_name": "User",
"country": "Italy",
"institution": "European Space Agency",
},
headers=headers,
timeout=30,
)
resp.raise_for_status()
print(resp.json())
Explanation
Updates mutable profile fields for the authenticated user.
Notes
- Route updates only the current authenticated user.
first_nameandlast_nameare required.country(max 100 characters) andinstitution(max 200) are optional free text, stripped before the length check. Left out of the body, the stored value is kept; an empty string ornullclears it.GET /users/mereturns both,nullwhen unset.
API keys
Create, list and revoke self-service eve_ API keys. Full concepts, error table and a
curl walkthrough live in API keys; this page only links the endpoints.
POST /users/api-keys: create a key. Body optional, every field optional.GET /users/api-keys[?include_revoked=true]: list this user's keys.DELETE /users/api-keys/{id}: revoke a key, cascading to its children.
Full API reference
For exhaustive schema details, use Swagger API.