Skip to content

Users

A User represents an individual person's account within the system. It is the primary entity for authentication and identity.

A User object on its own has limited capabilities beyond logging in and managing personal details like SSH keys. Its power comes from the roles and permissions it is granted within the scope of a Customer or Project.

User vs. Permissions

It is crucial to distinguish between the User entity and its permissions. The User API allows for managing the account itself (e.g., name, email), while team management is handled through the add_user actions on the Customer and Project endpoints.

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/users/ List Users
GET /api/users/{uuid}/ Retrieve
POST /api/users/ Create
POST /api/users/{uuid}/pull_remote_user/ Synchronize user details from eduTEAMS
PUT /api/users/{uuid}/ Update
PATCH /api/users/{uuid}/ Partial Update
DELETE /api/users/{uuid}/ Delete
Other Actions
GET /api/users/me/ Get current user details
GET /api/users/{uuid}/token/ Get user auth token
POST /api/users/{uuid}/cancel_change_email/ Cancel email change request
POST /api/users/{uuid}/change_email/ Request email change
POST /api/users/{uuid}/change_password/ Change user password
POST /api/users/confirm_email/ Confirm email change
POST /api/users/{uuid}/refresh_token/ Refresh user auth token

Core CRUD

List Users

1
2
3
4
http \
  GET \
  https://api.example.com/api/users/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.users import users_list # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = users_list.sync(client=client)

for item in response:
    print(item)
  1. API Source: users_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { usersList } from 'waldur-js-client';

try {
  const response = await usersList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
agreement_date string (date-time) Agreement date after
civil_number string
customer_uuid string (uuid)
date_joined string (date-time) Date joined after
description string
email string
field array
full_name string Full name
is_active boolean
is_staff boolean
is_support boolean
job_title string
modified string (date-time) Date modified after
native_name string
o array Ordering

organization string
organization_roles string Organization roles
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
phone_number string
project_roles string Project roles
project_uuid string (uuid)
query string Filter by first name, last name, civil number, username or email
registration_method string
user_keyword string User keyword
username string
username_list string Comma-separated usernames

200 -

The response body is an array of objects, where each object has the following structure:

Field Type Description
url string (uri)
uuid string (uuid)
username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
slug string
full_name string
native_name string
job_title string
email string (email)
phone_number string
organization string
civil_number string
description string
is_staff boolean Designates whether the user can log into this admin site.
is_active boolean Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
is_support boolean Designates whether the user is a global support user.
token string
token_lifetime integer Token lifetime in seconds.
token_expires_at string (date-time)
registration_method string Indicates what registration method was used.
date_joined string (date-time)
agreement_date string (date-time) Indicates when the user has agreed with the policy.
notifications_enabled boolean Designates whether the user is allowed to receive email notifications.
preferred_language string
permissions array of objects
permissions.user_uuid string (uuid)
permissions.user_name string
permissions.user_slug string
permissions.created string (date-time)
permissions.expiration_time string (date-time)
permissions.created_by_full_name string
permissions.created_by_username string
permissions.role_name string
permissions.role_description string
permissions.role_uuid string (uuid)
permissions.scope_type string
permissions.scope_uuid string (uuid)
permissions.scope_name string
permissions.customer_uuid string (uuid)
permissions.customer_name string
requested_email string
affiliations any Person's affiliation within organization such as student, faculty, staff.
first_name string
last_name string
birth_date string (date)
identity_provider_name string
identity_provider_label string
identity_provider_management_url string
identity_provider_fields array of strings
image string (uri)
identity_source string Indicates what identity provider was used.
has_active_session boolean
ip_address string

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/users/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.users import users_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = users_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: users_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { usersRetrieve } from 'waldur-js-client';

try {
  const response = await usersRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Name Type
field array

200 -

Field Type Description
url string (uri)
uuid string (uuid)
username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
slug string
full_name string
native_name string
job_title string
email string (email)
phone_number string
organization string
civil_number string
description string
is_staff boolean Designates whether the user can log into this admin site.
is_active boolean Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
is_support boolean Designates whether the user is a global support user.
token string
token_lifetime integer Token lifetime in seconds.
token_expires_at string (date-time)
registration_method string Indicates what registration method was used.
date_joined string (date-time)
agreement_date string (date-time) Indicates when the user has agreed with the policy.
notifications_enabled boolean Designates whether the user is allowed to receive email notifications.
preferred_language string
permissions array of objects
permissions.user_uuid string (uuid)
permissions.user_name string
permissions.user_slug string
permissions.created string (date-time)
permissions.expiration_time string (date-time)
permissions.created_by_full_name string
permissions.created_by_username string
permissions.role_name string
permissions.role_description string
permissions.role_uuid string (uuid)
permissions.scope_type string
permissions.scope_uuid string (uuid)
permissions.scope_name string
permissions.customer_uuid string (uuid)
permissions.customer_name string
requested_email string
affiliations any Person's affiliation within organization such as student, faculty, staff.
first_name string
last_name string
birth_date string (date)
identity_provider_name string
identity_provider_label string
identity_provider_management_url string
identity_provider_fields array of strings
image string (uri)
identity_source string Indicates what identity provider was used.
has_active_session boolean
ip_address string

Create

1
2
3
4
5
6
http \
  POST \
  https://api.example.com/api/users/ \
  Authorization:"Token YOUR_API_TOKEN" \
  username="alice" \
  email="alice@example.com"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.user_request import UserRequest # (1)
from waldur_api_client.api.users import users_create # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = UserRequest(
    username="alice",
    email="alice@example.com"
)
response = users_create.sync(
    client=client,
    body=body_data
)

print(response)
  1. Model Source: UserRequest
  2. API Source: users_create
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
import { usersCreate } from 'waldur-js-client';

try {
  const response = await usersCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "username": "alice",
    "email": "alice@example.com"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required Description
username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
slug string
native_name string
job_title string
email string (email)
phone_number string
organization string
description string
is_staff boolean Designates whether the user can log into this admin site.
is_active boolean Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
is_support boolean Designates whether the user is a global support user.
token_lifetime integer Token lifetime in seconds.
agree_with_policy boolean User must agree with the policy to register.
Constraints: write-only
notifications_enabled boolean Designates whether the user is allowed to receive email notifications.
preferred_language string
first_name string
last_name string
birth_date string (date)
image string (binary)

201 -

Field Type Description
url string (uri)
uuid string (uuid)
username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
slug string
full_name string
native_name string
job_title string
email string (email)
phone_number string
organization string
civil_number string
description string
is_staff boolean Designates whether the user can log into this admin site.
is_active boolean Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
is_support boolean Designates whether the user is a global support user.
token string
token_lifetime integer Token lifetime in seconds.
token_expires_at string (date-time)
registration_method string Indicates what registration method was used.
date_joined string (date-time)
agreement_date string (date-time) Indicates when the user has agreed with the policy.
notifications_enabled boolean Designates whether the user is allowed to receive email notifications.
preferred_language string
permissions array of objects
permissions.user_uuid string (uuid)
permissions.user_name string
permissions.user_slug string
permissions.created string (date-time)
permissions.expiration_time string (date-time)
permissions.created_by_full_name string
permissions.created_by_username string
permissions.role_name string
permissions.role_description string
permissions.role_uuid string (uuid)
permissions.scope_type string
permissions.scope_uuid string (uuid)
permissions.scope_name string
permissions.customer_uuid string (uuid)
permissions.customer_name string
requested_email string
affiliations any Person's affiliation within organization such as student, faculty, staff.
first_name string
last_name string
birth_date string (date)
identity_provider_name string
identity_provider_label string
identity_provider_management_url string
identity_provider_fields array of strings
image string (uri)
identity_source string Indicates what identity provider was used.
has_active_session boolean
ip_address string

Synchronize user details from eduTEAMS

1
2
3
4
http \
  POST \
  https://api.example.com/api/users/a1b2c3d4-e5f6-7890-abcd-ef1234567890/pull_remote_user/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.users import users_pull_remote_user # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = users_pull_remote_user.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: users_pull_remote_user
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { usersPullRemoteUser } from 'waldur-js-client';

try {
  const response = await usersPullRemoteUser({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 - No response body


Update

1
2
3
4
5
6
http \
  PUT \
  https://api.example.com/api/users/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  username="alice" \
  email="alice@example.com"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.user_request import UserRequest # (1)
from waldur_api_client.api.users import users_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = UserRequest(
    username="alice",
    email="alice@example.com"
)
response = users_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: UserRequest
  2. API Source: users_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
import { usersUpdate } from 'waldur-js-client';

try {
  const response = await usersUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "username": "alice",
    "email": "alice@example.com"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required Description
username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
slug string
native_name string
job_title string
email string (email)
phone_number string
organization string
description string
is_staff boolean Designates whether the user can log into this admin site.
is_active boolean Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
is_support boolean Designates whether the user is a global support user.
token_lifetime integer Token lifetime in seconds.
agree_with_policy boolean User must agree with the policy to register.
Constraints: write-only
notifications_enabled boolean Designates whether the user is allowed to receive email notifications.
preferred_language string
first_name string
last_name string
birth_date string (date)
image string (binary)

200 -

Field Type Description
url string (uri)
uuid string (uuid)
username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
slug string
full_name string
native_name string
job_title string
email string (email)
phone_number string
organization string
civil_number string
description string
is_staff boolean Designates whether the user can log into this admin site.
is_active boolean Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
is_support boolean Designates whether the user is a global support user.
token string
token_lifetime integer Token lifetime in seconds.
token_expires_at string (date-time)
registration_method string Indicates what registration method was used.
date_joined string (date-time)
agreement_date string (date-time) Indicates when the user has agreed with the policy.
notifications_enabled boolean Designates whether the user is allowed to receive email notifications.
preferred_language string
permissions array of objects
permissions.user_uuid string (uuid)
permissions.user_name string
permissions.user_slug string
permissions.created string (date-time)
permissions.expiration_time string (date-time)
permissions.created_by_full_name string
permissions.created_by_username string
permissions.role_name string
permissions.role_description string
permissions.role_uuid string (uuid)
permissions.scope_type string
permissions.scope_uuid string (uuid)
permissions.scope_name string
permissions.customer_uuid string (uuid)
permissions.customer_name string
requested_email string
affiliations any Person's affiliation within organization such as student, faculty, staff.
first_name string
last_name string
birth_date string (date)
identity_provider_name string
identity_provider_label string
identity_provider_management_url string
identity_provider_fields array of strings
image string (uri)
identity_source string Indicates what identity provider was used.
has_active_session boolean
ip_address string

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/users/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.patched_user_request import PatchedUserRequest # (1)
from waldur_api_client.api.users import users_partial_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = PatchedUserRequest()
response = users_partial_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: PatchedUserRequest
  2. API Source: users_partial_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { usersPartialUpdate } from 'waldur-js-client';

try {
  const response = await usersPartialUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required Description
username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
slug string
native_name string
job_title string
phone_number string
organization string
description string
is_staff boolean Designates whether the user can log into this admin site.
is_active boolean Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
is_support boolean Designates whether the user is a global support user.
token_lifetime integer Token lifetime in seconds.
agree_with_policy boolean User must agree with the policy to register.
Constraints: write-only
notifications_enabled boolean Designates whether the user is allowed to receive email notifications.
preferred_language string
first_name string
last_name string
birth_date string (date)
image string (binary)

200 -

Field Type Description
url string (uri)
uuid string (uuid)
username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
slug string
full_name string
native_name string
job_title string
email string (email)
phone_number string
organization string
civil_number string
description string
is_staff boolean Designates whether the user can log into this admin site.
is_active boolean Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
is_support boolean Designates whether the user is a global support user.
token string
token_lifetime integer Token lifetime in seconds.
token_expires_at string (date-time)
registration_method string Indicates what registration method was used.
date_joined string (date-time)
agreement_date string (date-time) Indicates when the user has agreed with the policy.
notifications_enabled boolean Designates whether the user is allowed to receive email notifications.
preferred_language string
permissions array of objects
permissions.user_uuid string (uuid)
permissions.user_name string
permissions.user_slug string
permissions.created string (date-time)
permissions.expiration_time string (date-time)
permissions.created_by_full_name string
permissions.created_by_username string
permissions.role_name string
permissions.role_description string
permissions.role_uuid string (uuid)
permissions.scope_type string
permissions.scope_uuid string (uuid)
permissions.scope_name string
permissions.customer_uuid string (uuid)
permissions.customer_name string
requested_email string
affiliations any Person's affiliation within organization such as student, faculty, staff.
first_name string
last_name string
birth_date string (date)
identity_provider_name string
identity_provider_label string
identity_provider_management_url string
identity_provider_fields array of strings
image string (uri)
identity_source string Indicates what identity provider was used.
has_active_session boolean
ip_address string

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/users/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.users import users_destroy # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = users_destroy.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: users_destroy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { usersDestroy } from 'waldur-js-client';

try {
  const response = await usersDestroy({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

204 - No response body


Other Actions

Get current user details

Get current user details, including authentication token.

1
2
3
4
http \
  GET \
  https://api.example.com/api/users/me/ \
  Authorization:"Token YOUR_API_TOKEN"
1
2
3
4
5
6
7
8
9
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.users import users_me_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = users_me_retrieve.sync(client=client)

print(response)
  1. API Source: users_me_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { usersMeRetrieve } from 'waldur-js-client';

try {
  const response = await usersMeRetrieve({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type
field array

200 -

Field Type Description
url string (uri)
uuid string (uuid)
username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
slug string
full_name string
native_name string
job_title string
email string (email)
phone_number string
organization string
civil_number string
description string
is_staff boolean Designates whether the user can log into this admin site.
is_active boolean Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
is_support boolean Designates whether the user is a global support user.
token string
token_lifetime integer Token lifetime in seconds.
token_expires_at string (date-time)
registration_method string Indicates what registration method was used.
date_joined string (date-time)
agreement_date string (date-time) Indicates when the user has agreed with the policy.
notifications_enabled boolean Designates whether the user is allowed to receive email notifications.
preferred_language string
permissions array of objects
permissions.user_uuid string (uuid)
permissions.user_name string
permissions.user_slug string
permissions.created string (date-time)
permissions.expiration_time string (date-time)
permissions.created_by_full_name string
permissions.created_by_username string
permissions.role_name string
permissions.role_description string
permissions.role_uuid string (uuid)
permissions.scope_type string
permissions.scope_uuid string (uuid)
permissions.scope_name string
permissions.customer_uuid string (uuid)
permissions.customer_name string
requested_email string
affiliations any Person's affiliation within organization such as student, faculty, staff.
first_name string
last_name string
birth_date string (date)
identity_provider_name string
identity_provider_label string
identity_provider_management_url string
identity_provider_fields array of strings
image string (uri)
identity_source string Indicates what identity provider was used.
has_active_session boolean
ip_address string

Get user auth token

1
2
3
4
http \
  GET \
  https://api.example.com/api/users/a1b2c3d4-e5f6-7890-abcd-ef1234567890/token/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.users import users_token_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = users_token_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: users_token_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { usersTokenRetrieve } from 'waldur-js-client';

try {
  const response = await usersTokenRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 -

Field Type Description
created string (date-time)
user_first_name string
user_last_name string
user_username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
user_is_active boolean Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
user_token_lifetime integer Token lifetime in seconds.
token string

Cancel email change request

Cancel email update request

1
2
3
4
http \
  POST \
  https://api.example.com/api/users/a1b2c3d4-e5f6-7890-abcd-ef1234567890/cancel_change_email/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.users import users_cancel_change_email # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = users_cancel_change_email.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: users_cancel_change_email
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { usersCancelChangeEmail } from 'waldur-js-client';

try {
  const response = await usersCancelChangeEmail({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 - No response body


Request email change

Allows to change email for user.

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/users/a1b2c3d4-e5f6-7890-abcd-ef1234567890/change_email/ \
  Authorization:"Token YOUR_API_TOKEN" \
  email="alice@example.com"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.user_email_change_request import UserEmailChangeRequest # (1)
from waldur_api_client.api.users import users_change_email # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = UserEmailChangeRequest(
    email="alice@example.com"
)
response = users_change_email.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: UserEmailChangeRequest
  2. API Source: users_change_email
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
import { usersChangeEmail } from 'waldur-js-client';

try {
  const response = await usersChangeEmail({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "email": "alice@example.com"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
email string (email)

200 - No response body


Change user password

Allows staff user to change password for any user.

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/users/a1b2c3d4-e5f6-7890-abcd-ef1234567890/change_password/ \
  Authorization:"Token YOUR_API_TOKEN" \
  new_password="********"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.password_change_request import PasswordChangeRequest # (1)
from waldur_api_client.api.users import users_change_password # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = PasswordChangeRequest(
    new_password="********"
)
response = users_change_password.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: PasswordChangeRequest
  2. API Source: users_change_password
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
import { usersChangePassword } from 'waldur-js-client';

try {
  const response = await usersChangePassword({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "new_password": "********"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
new_password string

200 - No response body


Confirm email change

Confirm email update using code

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/users/confirm_email/ \
  Authorization:"Token YOUR_API_TOKEN" \
  code="string-value"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.confirm_email_request_request import ConfirmEmailRequestRequest # (1)
from waldur_api_client.api.users import users_confirm_email # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = ConfirmEmailRequestRequest(
    code="string-value"
)
response = users_confirm_email.sync(
    client=client,
    body=body_data
)

print(response)
  1. Model Source: ConfirmEmailRequestRequest
  2. API Source: users_confirm_email
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { usersConfirmEmail } from 'waldur-js-client';

try {
  const response = await usersConfirmEmail({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "code": "string-value"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
code string

200 - No response body


Refresh user auth token

1
2
3
4
http \
  POST \
  https://api.example.com/api/users/a1b2c3d4-e5f6-7890-abcd-ef1234567890/refresh_token/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.users import users_refresh_token # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = users_refresh_token.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: users_refresh_token
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { usersRefreshToken } from 'waldur-js-client';

try {
  const response = await usersRefreshToken({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 -

Field Type Description
created string (date-time)
user_first_name string
user_last_name string
user_username string Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
user_is_active boolean Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
user_token_lifetime integer Token lifetime in seconds.
token string