Danbooru
Login Posts Comments Notes Artists Tags Pools Wiki Forum More ยป
Search Changes Help | Posts (0) History
  • Help
guro
scat
furry -rating:g

Recent Changes (all)

  • koibumi otome junjou-ha
  • kidoku machi lovers
  • call me!!! (love live!)
  • infinity gems
  • soul gem
  • nimura
  • mishima
  • ichikawa (joshi koukousei)
  • joshi koukousei no nichijou
  • gracebearer (purification of the past) (arknights)
  • gracebearer (arknights)
  • pokemon scarlet and violet
  • behind another
  • aroma (picnic times) (arknights)
  • aroma (arknights)
  • untied bikini bottom
  • untied bikini top
  • untied bikini
  • blonde student council president (blue archive)
  • crotch seam
  • mon3tr (sharpened claws) (arknights)
  • mon3tr (arknights)
  • tentei forte (2nd costume)
  • tentei forte (1st costume)
  • eroeroerokusa

Options

  • Wiki History
  • Discussions
  • What Links Here

api:users

Table of Contents
  • 01. Record field format
  • 02. Associated attributes
  • 03. Index
  • 04. Show
  • 05. Create
  • 06. Update
  • 07. Destroy
  • 08. See also
  • 09. External links

This page has details for how to interact with user records through the API.

01 Record field format


NameTypeDetails
idinteger>0
namestring
levelinteger[10, 20, 30, 31, 32, 35, 37, 40, 50, 60]
inviter_idinteger>0
post_update_countinteger
note_update_countinteger
post_upload_countinteger
favorite_countinteger
unread_dmail_countinteger
is_deletedboolean
bit_prefsintegerEach bit stores a boolean value. See Bit fields below for more information.
themestring[auto, light, dark]
favorite_tagsstring
blacklisted_tagsstring
comment_thresholdinteger
time_zonestring
per_pageinteger1 - 200
default_image_sizestring[large, original]
custom_stylestring
upload_pointsinteger
bcrypt_password_hashinteger
totp_secretinteger
backup_codesinteger
last_forum_read_attimestamp
last_logged_in_attimestamp
last_ip_addrinet
created_attimestamp
updated_attimestamp
User levels
NameLevel
Anonymous0 (Used internally when browsing anonymously)
Restricted10
Member20
Gold30
Platinum31
Builder32
Contributor35
Approver37
Moderator40
Admin50
Owner60
Bit fields
NameTypeBit position
is_bannedstatus0
receive_email_notificationssetting2
new_post_navigation_layoutsetting5
enable_private_favoritessetting6
show_deleted_childrensetting11
disable_categorized_saved_searchessetting15
disable_tagged_filenamessetting17
disable_mobile_gesturessetting20
enable_safe_modesetting21
enable_desktop_modesetting22
disable_post_tooltipssetting23
requires_verificationstatus28
is_verifiedstatus29
show_deleted_postssetting30

02 Associated attributes


The following is the list of relations that can be included in the API results (see Help:Common URL parameters for more info):

NameTypeNumberAvailabilityDetails
inviterusersingleoptional
bansbanmultipleoptional

03 Index


Returns multiple user records.

HTTP MethodGET
Base URL/users.json
Typeread request
DescriptionThe default order is created at descending.
Search attributes

Search parameters take the following format (see Help:Common URL parameters for more info):

search[FIELD]=VALUE

The following are the base fields along with their associated type. Check the syntax pages for all of the available variations.

  • Number syntax
    • id
    • level
    • post_upload_count
    • post_update_count
    • note_update_count
    • favorite_count
    • created_at
    • updated_at
  • String syntax
    • name
  • Boolean syntax
    • is_deleted
  • Post syntax
    • posts
  • User syntax
    • inviter
  • Chaining syntax
    • comments
    • post_appeals
    • post_approvals
    • forum_topics
    • forum_posts
    • forum_post_votes
    • tag_aliases
    • tag_implications
    • feedback
    • bans
    • artist_versions
    • artist_commentary_versions
    • note_versions
    • wiki_page_versions
Special search parameters

The following are additional search fields.

  • name_matches - Case-insensitive wildcard search on the name field.
  • any_name_matches - Case-insensitive search on current or previous usernames.
  • name_or_past_name_matches - Case-insensitive search. Returns either the current holder of the name, or previous users if no users currently have that name.
  • min_level - Minimum user level to include.
  • max_level - Maximum user level to include.
  • is_banned - Uses boolean syntax (Help:Boolean syntax).
  • current_user_first - Shows the current user first, then all other users by ID desc.
Search order

Using the search parameter order with one of the following values changes the order of the results.

  • name - Alphabetical on the name field.
  • post_upload_count
  • post_update_count
  • note_count

04 Show


Returns a single user record.

HTTP MethodGET
Base URL/users/$id.json
Typeread request
Description$id is the user ID.
Can also be reached by using the /profile endpoint for the current user.

05 Create


Creates a single user record.

HTTP MethodPOST
Base URL/users.json
Typewrite request
Create parameters

User parameters take the following format (see Help:API Write Requests for more info):

user[FIELD]=VALUE
  • Required:
    • name
    • password
    • password_confirmation
  • Optional:
    • email

06 Update


Updates a single user record.

HTTP MethodPUT/PATCH
Base URL/users/$id.json
Typewrite request
Description$id is the user ID.
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
Restricted to Admins
HTTP MethodPUT/PATCH
Base URL/admin/users/$id.json
Typewrite request
Description$id is the user ID.
  • Optional
    • level

07 Destroy


Deletes a single user record.

HTTP MethodDELETE
Base URL/users/$id.json
Typewrite request
Description$id is the user ID.

Most account users can only delete their own account. Only the Owner-level user can delete any account.

08 See also


  • Help:Common URL Parameters
  • Help:API

09 External links


Controllerhttps://github.com/danbooru/danbooru/blob/master/app/controllers/users_controller.rb
Modelhttps://github.com/danbooru/danbooru/blob/master/app/models/user.rb
Policyhttps://github.com/danbooru/danbooru/blob/master/app/policies/user_policy.rb
Terms / Privacy / Upgrade / Contact /