Miyuu's Image Board

api:users

Table of Contents* 1. "Record field format":#dtext-record
* 1. "Bit fields":#dtext-bit-fields
* 2. "Associated attributes":#dtext-associations
* 3. "Nomenclature":#dtext-nomenclature
* 4. "Actions":#dtext-actions
** 4.01 "Index":#dtext-index
** 4.02 "Show":#dtext-show
** 4.03 "Create":#dtext-create
** 4.04 "Update":#dtext-update
* 5. "See also":#dtext-see-also
* 6. "External links":#dtext-external-links

The following includes the details of how to interface with the user records through the API.


h4#record. Record field format


[table]

[thead]

[tr]

[th]Name[/th]

[th]Type[/th]

[th]Details[/th]

[/tr]

[/thead]

[tbody]

[tr]

[td]

id
[/td]

[td]integer[/td]

[td]>0[/td]

[/tr]

[tr]

[td]
name
[/td]

[td]string[/td]

[td][/td]

[/tr]

[tr]

[td]
level
[/td]

[td]integer[/td]

[td][10, 20, 30, 31, 32, 40, 50][/td]

[/tr]

[tr]

[td]
inviter_id
[/td]

[td]integer[/td]

[td]>0[/td]

[/tr]

[tr]

[td]
post_update_count
[/td]

[td]integer[/td]

[td][/td]

[/tr]

[tr]

[td]
note_update_count
[/td]

[td]integer[/td]

[td][/td]

[/tr]

[tr]

[td]
post_upload_count
[/td]

[td]integer[/td]

[td][/td]

[/tr]

[tr]

[td]
favorite_count
[/td]

[td]integer[/td]

[td][/td]

[/tr]

[tr]

[td]
unread_dmail_count
[/td]

[td]integer[/td]

[td][/td]

[/tr]

[tr]

[td]
is_banned
[/td]

[td]boolean[/td]

[td][/td]

[/tr]

[tr]

[td]
bit_prefs
[/td]

[td]integer[/td]

[td]Each bit stores a boolean value. See "Bit fields":[#dtext-bit-fields] below for more information.[/td]

[/tr]

[tr]

[td]
theme
[/td]

[td]string[/td]

[td][light, dark][/td]

[/tr]

[tr]

[td]
favorite_tags
[/td]

[td]string[/td]

[td][/td]

[/tr]

[tr]

[td]
blacklisted_tags
[/td]

[td]string[/td]

[td][/td]

[/tr]

[tr]

[td]
comment_threshold
[/td]

[td]integer[/td]

[td][/td]

[/tr]

[tr]

[td]
timezone
[/td]

[td]string[/td]

[td][/td]

[/tr]

[tr]

[td]
per_page
[/td]

[td]integer[/td]

[td]1 - 200[/td]

[/tr]

[tr]

[td]
default_image_size
[/td]

[td]string[/td]

[td][large, original][/td]

[/tr]

[tr]

[td]
custom_css
[/td]

[td]string[/td]

[td][/td]

[/tr]

[tr]

[td]
upload_points
[/td]

[td]integer[/td]

[td][/td]

[/tr]

[tr]

[td]
last_forum_read_at
[/td]

[td]timestamp[/td]

[td][/td]

[/tr]

[tr]

[td]
last_logged_in_at
[/td]

[td]timestamp[/td]

[td][/td]

[/tr]

[tr]

[td]
created_at
[/td]

[td]timestamp[/td]

[td][/td]

[/tr]

[tr]

[td]
updated_at
[/td]

[td]timestamp[/td]

[td][/td]

[/tr]

[/tbody]

[/table]


h4#bit-fields. Bit fields


[table]

[thead]

[tr]

[th]Name[/th]

[th]Type[/th]

[th]Bit position[/th]

[/tr]

[/thead]

[tbody]

[tr]

[td]

is_banned
[/td]

[td]status[/td]

[td]0[/td]

[/tr]

[tr]

[td]
receive_email_notifications
[/td]

[td]setting[/td]

[td]2[/td]

[/tr]

[tr]

[td]
always_resize_images
[/td]

[td]setting[/td]

[td]3[/td]

[/tr]

[tr]

[td]
enable_post_navigation
[/td]

[td]setting[/td]

[td]4[/td]

[/tr]

[tr]

[td]
new_post_navigation_layout
[/td]

[td]setting[/td]

[td]5[/td]

[/tr]

[tr]

[td]
enable_private_favorites
[/td]

[td]setting[/td]

[td]6[/td]

[/tr]

[tr]

[td]
enable_sequential_post_navigation
[/td]

[td]setting[/td]

[td]7[/td]

[/tr]

[tr]

[td]
hide_deleted_posts
[/td]

[td]setting[/td]

[td]8[/td]

[/tr]

[tr]

[td]
style_usernames
[/td]

[td]setting[/td]

[td]9[/td]

[/tr]

[tr]

[td]
enable_auto_complete
[/td]

[td]setting[/td]

[td]10[/td]

[/tr]

[tr]

[td]
show_deleted_children
[/td]

[td]setting[/td]

[td]11[/td]

[/tr]

[tr]

[td]
disable_categorized_saved_searches
[/td]

[td]setting[/td]

[td]15[/td]

[/tr]

[tr]

[td]
disable_tagged_filenames
[/td]

[td]setting[/td]

[td]17[/td]

[/tr]

[tr]

[td]
disable_cropped_thumbnails
[/td]

[td]setting[/td]

[td]19[/td]

[/tr]

[tr]

[td]
disable_mobile_gestures
[/td]

[td]setting[/td]

[td]20[/td]

[/tr]

[tr]

[td]
enable_safe_mode
[/td]

[td]setting[/td]

[td]21[/td]

[/tr]

[tr]

[td]
enable_desktop_mode
[/td]

[td]setting[/td]

[td]22[/td]

[/tr]

[tr]

[td]
disable_post_tooltips
[/td]

[td]setting[/td]

[td]23[/td]

[/tr]

[tr]

[td]
enable_recommended_posts
[/td]

[td]setting[/td]

[td]24[/td]

[/tr]

[tr]

[td]
requires_verification
[/td]

[td]status[/td]

[td]28[/td]

[/tr]

[tr]

[td]
is_verified
[/td]

[td]status[/td]

[td]29[/td]

[/tr]

[/tbody]

[/table]


h4#associations. Associated attributes


[table]

[thead]

[tr]

[th]Name[/th]

[th]Type[/th]

[th]Number[/th]

[th]Availability[/th]

[th]Details[/th]

[/tr]

[/thead]

[tbody]

[tr]

[td]

inviter
[/td]

[td]user[/td]

[td]single[/td]

[td]optional[/td]

[td][/td]

[/tr]

[/tbody]

[/table]


h4#nomenclature. Nomenclature


* Plural form: "users"

** Used in the URL pathname

* Singular form: "user"

** Used for write parameters (Help:API Write Requests)

* Versions: none


h4#actions. Actions


These are the various actions that can be done with user records.


h5#index. Index


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]GET[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/users.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]read request[/td]

[/tr]

[tr]

[td]Description[/td]

[td]The default order is created at descending.[/td]

[/tr]

[/tbody]

[/table]


h6#search-attributes. Search attributes


All of the following are standard attributes with all of their available formats and qualifiers.


* Number syntax

**

id


**
level


**
post_upload_count


**
post_update_count


**
note_update_count


**
favorite_count


**
created_at


**
updated_at


* Text syntax

**
name


* User syntax

**
inviter


h6#special-search-parameters. 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_count


**
post_update_count


**
note_count


h5#show. Show


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]GET[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/users/$id.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]read request[/td]

[/tr]

[tr]

[td]Description[/td]

[td]
$id
is the user ID.

Can also be reached by using the
/profile
endpoint for the current user.[/td]

[/tr]

[/tbody]

[/table]


h5#create. Create


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]POST[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/users.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]write request[/td]

[/tr]

[/tbody]

[/table]


h6#create-parameters. Create parameters


* Required:

**

name


**
password


**
password_confirmation


* Optional:

**
email


h5#update. Update


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]PUT/PATCH[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/users/$id.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]write request[/td]

[/tr]

[tr]

[td]Description[/td]

[td]
$id
is the user ID.[/td]

[/tr]

[/tbody]

[/table]


h6#update-parameters. Update parameters


* Optional:

**

comment_threshold


**
default_image_size


**
favorite_tags


**
blacklisted_tags


**
time_zone


**
per_page


**
custom_style


**
theme


**
receive_email_notifications


**
always_resize_images


**
enable_post_navigation


**
new_post_navigation_layout


**
enable_private_favorites


**
enable_sequential_post_navigation


**
show_deleted_posts


**
style_usernames


**
enable_auto_complete


**
show_deleted_children


**
disable_categorized_saved_searches


**
disable_tagged_filenames


**
disable_cropped_thumbnails


**
disable_mobile_gestures


**
enable_safe_mode


**
enable_desktop_mode


**
disable_post_tooltips


* Admin only:

**
level


h4#see-also. See also


* Help:Common URL Parameters

* Help:API


h4#external-links. External links


[table]

[tbody]

[tr]

[td]Controller[/td]

[td][/td]

[td][/td]

[/tr]

[tr]

[td]Model[/td]

[td][/td]

[/tr]

[tr]

[td]Policy[/td]

[td][/td]

[/tr]

[/tbody]

[/table]