api:users
Table of Contents
The following includes the details of how to interface with the user records through the API.
Record field format
| Name | Type | Details |
|---|---|---|
id | integer | >0 |
name | string | |
level | integer | [10, 20, 30, 31, 32, 40, 50] |
inviter_id | integer | >0 |
post_update_count | integer | |
note_update_count | integer | |
post_upload_count | integer | |
favorite_count | integer | |
unread_dmail_count | integer | |
is_banned | boolean | |
bit_prefs | integer | Each bit stores a boolean value. See Bit fields below for more information. |
theme | string | [light, dark] |
favorite_tags | string | |
blacklisted_tags | string | |
comment_threshold | integer | |
timezone | string | |
per_page | integer | 1 - 200 |
default_image_size | string | [large, original] |
custom_css | string | |
upload_points | integer | |
last_forum_read_at | timestamp | |
last_logged_in_at | timestamp | |
created_at | timestamp | |
updated_at | timestamp |
Bit fields
| Name | Type | Bit position |
|---|---|---|
is_banned | status | 0 |
receive_email_notifications | setting | 2 |
always_resize_images | setting | 3 |
enable_post_navigation | setting | 4 |
new_post_navigation_layout | setting | 5 |
enable_private_favorites | setting | 6 |
enable_sequential_post_navigation | setting | 7 |
hide_deleted_posts | setting | 8 |
style_usernames | setting | 9 |
enable_auto_complete | setting | 10 |
show_deleted_children | setting | 11 |
disable_categorized_saved_searches | setting | 15 |
disable_tagged_filenames | setting | 17 |
disable_cropped_thumbnails | setting | 19 |
disable_mobile_gestures | setting | 20 |
enable_safe_mode | setting | 21 |
enable_desktop_mode | setting | 22 |
disable_post_tooltips | setting | 23 |
enable_recommended_posts | setting | 24 |
requires_verification | status | 28 |
is_verified | status | 29 |
Associated attributes
| Name | Type | Number | Availability | Details |
|---|---|---|---|---|
inviter | user | single | optional |
Nomenclature
- Plural form: "users"
- Used in the URL pathname
- Singular form: "user"
- Used for write parameters (Help:API Write Requests)
- Versions: none
Actions
These are the various actions that can be done with user records.
Index
| HTTP Method | GET |
| Base URL | /users.json |
| Type | read request |
| Description | The default order is created at descending. |
Search attributes
All of the following are standard attributes with all of their available formats and qualifiers.
- Number syntax
idlevelpost_upload_countpost_update_countnote_update_countfavorite_countcreated_atupdated_at- Text syntax
name- User syntax
inviter
Special search parameters
name_matches- Case-insensitive wildcard search on the name field.min_level- Minimum user level to include.max_level- Maximum user level to include.current_user_first- Shows the current user first, then all other users by ID desc.order- Sets the order of results.name- Alphabetical on the name field.post_upload_countpost_update_countnote_count
Show
| HTTP Method | GET |
| Base URL | /users/$id.json |
| Type | read request |
| Description | $id is the user ID.Can also be reached by using the /profile endpoint for the current user. |
Create
| HTTP Method | POST |
| Base URL | /users.json |
| Type | write request |
Create parameters
- Required:
namepasswordpassword_confirmation- Optional:
email
Update
| HTTP Method | PUT/PATCH |
| Base URL | /users/$id.json |
| Type | write request |
| Description | $id is the user ID. |
Update parameters
- Optional:
comment_thresholddefault_image_sizefavorite_tagsblacklisted_tagstime_zoneper_pagecustom_stylethemereceive_email_notificationsalways_resize_imagesenable_post_navigationnew_post_navigation_layoutenable_private_favoritesenable_sequential_post_navigationshow_deleted_postsstyle_usernamesenable_auto_completeshow_deleted_childrendisable_categorized_saved_searchesdisable_tagged_filenamesdisable_cropped_thumbnailsdisable_mobile_gesturesenable_safe_modeenable_desktop_modedisable_post_tooltips- Admin only:
level
