GET
/
iam
/
users
/
{userId}
Python
from gcore import Gcore

client = Gcore(
    api_key="My API Key",
)
user_detailed = client.iam.users.get(
    0,
)
print(user_detailed.id)
{
  "id": 123,
  "email": "jsmith@example.com",
  "name": "<string>",
  "lang": "de",
  "phone": "<string>",
  "company": "<string>",
  "reseller": 123,
  "client": 123,
  "deleted": true,
  "groups": [
    {
      "id": 1,
      "name": "Administrators"
    }
  ],
  "activated": true,
  "sso_auth": true,
  "two_fa": true,
  "auth_types": [
    "password"
  ],
  "user_type": "common",
  "is_active": true,
  "client_and_roles": [
    {
      "client_id": 123,
      "client_company_name": "<string>",
      "user_roles": [
        "2"
      ],
      "user_id": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

userId
integer
required

User's ID.

Response

OK.

id
integer
required

User's ID.

email
string<email>
required

User's email address.

name
string | null
required

User's name.

lang
enum<string>
required

User's language.

Defines language of the control panel and email messages.

Available options:
de,
en,
ru,
zh,
az
phone
string | null
required

User's phone.

company
string
required

User's company.

reseller
integer
required

Services provider ID.

client
number
required

User's account ID.

deleted
boolean
required

Deletion flag. If true then user was deleted.

groups
object[]
required

User's group in the current account.

IAM supports 5 groups:

  • Users
  • Administrators
  • Engineers
  • Purge and Prefetch only (API)
  • Purge and Prefetch only (API+Web)
activated
boolean
required

Email confirmation:

  • true – user confirmed the email;
  • false – user did not confirm the email.
sso_auth
boolean
required

SSO authentication flag. If true then user can login via SAML SSO.

two_fa
boolean
required

Two-step verification:

  • true – user enabled two-step verification;
  • false – user disabled two-step verification.
auth_types
enum<string>[]
required

System field. List of auth types available for the account.

user_type
enum<string>
required

User's type.

Available options:
common,
reseller,
seller
is_active
boolean
required

User activity flag.

client_and_roles
object[]
required

List of user's clients. User can access to one or more clients.