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

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
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

200
application/json

OK.

The response is of type object.