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
Core CRUD
List Users
HTTPie Python TypeScript Query Parameters Responses
http \
GET \
https://api.example.com/api/users/ \
Authorization:"Token YOUR_API_TOKEN"
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 )
API Source: users_list
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
Create
HTTPie Python TypeScript Request Body (required) Responses
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 )
Model Source: UserRequest
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
Update
HTTPie Python TypeScript Path Parameters Request Body (required) Responses
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 )
Model Source: UserRequest
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
HTTPie Python TypeScript Path Parameters Request Body Responses
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 )
Model Source: PatchedUserRequest
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
Other Actions
Get current user details
Get current user details, including authentication token.
Get user auth token
Cancel email change request
Cancel email update request
Request email change
Allows to change email for user.
Change user password
Allows staff user to change password for any user.
Confirm email change
Confirm email update using code
Refresh user auth token