Get user

One user with groups, enrollments, user type and whether login is enabled.

GET https://cotlet.dev/api/v1/learnupon/users/{user_id}

read

Returns the profile of one user: name, email, user type, Login enabled, expiry date, the groups the user belongs to and every enrollment with its status. Use it before unenrolling or disabling someone, to see what will change. A pending user has no enrollments until they accept, unless you enrolled them by email.

Parameters

Parameters: get_user
NameTypeDescription
user_id string required string User id from list_users.

Request

cURL
curl https://cotlet.dev/api/v1/learnupon/users/user_8c41d2 \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("learnupon", "get_user", {"user_id":"user_8c41d2"})
Node.js
const result = await cotlet.call('learnupon', 'get_user', {"user_id":"user_8c41d2"});
CLI
cotlet call learnupon get_user --data '{"user_id":"user_8c41d2"}'

Example response

JSON

{
  "user_id": "51872",
  "name": "Maria Nowak",
  "email": "maria.nowak@example.com",
  "user_type": "learner",
  "login_enabled": true,
  "expires": null,
  "groups": [
    {
      "group_id": "4821",
      "name": "Onboarding"
    }
  ],
  "enrollments": [
    {
      "enrollment_id": "90417",
      "course": "Data privacy basics",
      "status": "In Progress"
    },
    {
      "enrollment_id": "90102",
      "course": "Welcome and Tools basics",
      "status": "Completed"
    }
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.