Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

Get user details

GET /users/{id}

Returns the information about a specific user.

This operation requires oz_users_view admin privilege.

Example cURL requests

Get user details

curl -u username:password -X GET \
https://$HOST/api/v3/onezone/users/$USER_ID

{
  "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
}

Path parameters

Parameter Type & Description
id required
string

User Id.

Request Examples

Shell
onezone-rest-cli getUser id=a5b469a2b0516b662a49da74d6d7d7bc

Responses

application/json
200

Information about a user.

PropertyType & 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.

idp required
string

Id of the Identity Provider, as specified in Onezone's auth.config.

subjectId required
string

Unique user Id assigned by the Identity Provider.

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.

emails
array of strings

The list of user email accounts.

entitlements
array of strings

A list of strings denoting user group memberships as acquired from the identity provider. Memberships are in Onedata normalized form.

custom
object

Custom user data collected upon login, depending on Onezone auth.config.

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. 1563819329.

Example

application/json
{
  "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
}
400

Invalid request.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
401

Authentication error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
403

Authorization error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
404

Resource not found.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
500

Internal server Error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}