Get current user details
Returns details about currently authenticated user.
This operation can be invoked on behalf of the current user only.
Example cURL requests
Get user details
curl -u admin:password -X GET https://$HOST/api/v3/onezone/user
{
"userId": "f1c8b1a37aa7447b22eb65a742d40524",
"fullName": "Rudolf Lingens",
"username": "r.lingens",
"linkedAccounts": [
{
"idp": "github",
"subjectId": "1978f5775ae2dc16730418bf3fc81764"
},
{
"idp": "elixir",
"subjectId": "38bf3fc2f4c16730481764bd775ae2d1"
}
],
"emails": [
"rudolf.lingens@example.com",
"john.doe@example.com"
],
"basicAuthEnabled": false,
"creationTime": 1576152793
}
Request Examples
onezone-rest-cli getCurrentUserResponses
Returns the information about user.
| Property | Type & Description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
userId string Unique user Id. | |||||||||||||||
fullName string User's full name (given names + surname). | |||||||||||||||
username string User's human-readable identifier, unique across the system. Makes it easier to identify the user and can be used for signing in with password. | |||||||||||||||
linkedAccounts array of objects (LinkedAccount) The list of accounts linked to this user.
| |||||||||||||||
emails array of strings | |||||||||||||||
basicAuthEnabled boolean Specifies if this user is allowed to authenticate with username & password. | |||||||||||||||
creationTime integer (Timestamp) Timestamp in seconds (UNIX epoch), e.g. | |||||||||||||||
Example
{
"userId": "f1c8b1a37aa7447b22eb65a742d40524",
"fullName": "Rudolf Lingens",
"username": "r.lingens",
"linkedAccounts": [
{
"idp": "github",
"subjectId": "1978f5775ae2dc16730418bf3fc81764"
},
{
"idp": "elixir",
"subjectId": "38bf3fc2f4c16730481764bd775ae2d1"
}
],
"emails": [
"rudolf.lingens@example.com",
"john.doe@example.com"
],
"basicAuthEnabled": false,
"creationTime": 1576152793
}Invalid request.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Forbidden request.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found..
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}