Miyuu's Image Board

api:users

Table of Contents


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


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]


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]


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]


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


[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]



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

••
id

••
level

••
post_upload_count

••
post_update_count

••
note_update_count

••
favorite_count

••
created_at

••
updated_at
••
name
••
inviter


  • 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


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]


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]


Create parameters

  • Required:
••
name

••
password

••
password_confirmation
  • Optional:
••
email


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]


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


See also


[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]