API
The API (Application Programming Interface) gives you a powerful set of tools for interacting directly with Inkbunny's core functionality without needing to connect via HTML.
External scripts must use the API rather than interacting with standard pages, because it is much faster, more flexible, more efficient (using less of your bandwidth and ours) and places less strain on our poor busy server.
Note: The API and this documentation is a work-in-progress. Only the most essential functionality has been added so far.
Please report all bugs and issues to admin@inkbunny.net or via a Support Ticket.
Important Notes
- ESSENTIAL: User accounts are only accessible for login via the API if “Enable API Access” is enabled in the user's Account Settings https://inkbunny.net/account.php
- ESSENTIAL: The IP used to access the API must be in the user's “Allowed IP Range“ settings if they have set one. By default the range is blank and all IPs are allowed. https://inkbunny.net/iprange.php
- ESSENTIAL: If you are sending data via the "GET" method, you MUST make sure the values of parameters you send are correctly escaped. For example, if the user's password contains an ampersand "&" then it will break the GET url unless you url-escape the password and any other values you send.
- Requests can be sent using GET or POST methods, but in most cases you should use POST, primarily because API calls may change state or increase server burden.
- You probably want to POST multipart/form-data. Content-Type must be specified in the header. Most libraries will handle this for you; for HTTP forms, use the enctype attribute.
- All calls to the API must be made in “HTTPS” SSL mode or an error will be returned. There are some noted exceptions to this rule.
- Responses are in JSON format by default. You can change this to XML format using the "output_mode" parameter with any query.
- You must type-cast variables yourself when they are returned by the API. In JSON mode, sometimes they will be strings or integers when you least expect it.
- All parameter names are case sensitive and must be sent in lowercase.
- All pre-defined parameter values are case sensitive (eg: "create_datetime", “yes”, “no”, etc) and must be sent in lowercase.
- Search words, user names and other freeform user data are not case sensitive.
- All values returned in XML mode are wrapped in a tag called “response”.
- Cookies are not used by the Inkbunny API. Cookie data will be ignored, except when accessing private files, when a normal web SID will be accepted.
- If a SID is passed as a GET or POST parameter to a private file request, that will take precedence, but in that case it must be an API SID, not a web SID.
- A valid SID must be passed as a GET or POST query value with all URLs for PRIVATE assets. e.g.: https://inkbunny.net/private_files/full/0/51_fred_somepic.jpg?sid=AiMAejQkj…
- Private assets are any that have URLs that contain the path "/private_files/" or "/private_thumbnails/". A SID should not be passed for public assets.
- When requesting assets (jpegs, gifs, swf, etc) a blank HTTP referrer or "https://inkbunny.net/" must be sent as the referrer with the request.
- You should be prepared to follow redirects (3xx) when requesting assets.
Time Stamps
All time stamps output by the API will contain a GMT offset to ensure the times are not ambiguous.
Wherever "system time" is mentioned, it refers to the current local time according to the server, in the server's timezone. These times will always contain GMT offset data. The timezone for the server is "CEST" or "CET" (depending on current daylight savings time in that timezone) which is also known as "Europe/Amsterdam" in Posix format.
When "user time" is mentioned, this refers to a timestamp relative to the user's current timezone as defined by their location set in their user account settings. These times will always contain GMT offset data.
Common AJAX Problems
AJAX is a term often used to describe a specific way Javascript can be made to communicate with a server, without needing to load a page or frame to obtain the data.
There are some limitations that are important to understand, as you may run in to these problems without getting any error message or explanation as to why your AJAX enabled script is not working. These restrictions, and the lack of any error messages, are due to the way browsers implement this functionality.
- Cross site requests are not possible, without using a workaround. This means Javascript running in a page delivered by the site "myexamplesite.com" will not be able to make an AJAX based request to the API at "inkbunny.net". The call will fail silently and return no data. To get around this, you must use a trick such as the one described at "To Wrap JSON Response in a Callback Function". An example of this workaround in action can be found under Libraries for the API.
- Making AJAX requests via HTTPS on a page that is in HTTP mode, or vice versa, will fail silently and return no data. If a page is loaded in HTTP mode, then all AJAX requests must be made via HTTP and NOT HTTPS. Similarly, HTTPS pages must make all AJAX requests in HTTPS mode. To get around this, you can use a trick such as the one described at "To Wrap JSON Response in a Callback Function". An example of this workaround in action can be found under Libraries for the API.
Quick Start Guide
- Login - The API uses session-based authentication. Your scripts must always start by obtaining a valid Session ID (SID). You should only obtain an SID once per session, not once per query. A SID is obtained by sending a valid username and password to "api_login.php". eg: https://inkbunny.net/api_login.php?username=myusername&password=mypassword
- Note: You can obtain a SID as a guest user. Just send the username "guest" and leave the password field blank. You will then have the same access as a Guest has through the regular web interface. Members can block their artwork from viewing by Guests. To change the Ratings settings for a Guest session, see "Change Allowed Ratings" below.
- Store SID - Store the SID that was returned by Login as the value "sid". This will be sent with all following queries as the parameter "sid". For security you must destroy the password you stored in memory as you won't need it now that you have a valid SID.
- Note: The SID can expire. If error codes relating to expired or invalid SID are returned, a new SID must be obtained via the Login script. See "Error Codes" below.
- Queries - Once a valid SID is obtained, send it with all queries. For example, to find all submissions with the keyword "dragon", ordered by number of views: https://inkbunny.net/api_search.php?sid=AiMAejQkj7tg5R6Lvff9y3CSMRGTCDtSJDdWku3UMMczHK2Io8mq7fStANk2QsCRBzHcZ7mIaLvXYjVitonv03&text=dragon&orderby=views
Contributions
Check out the contributed scripts on the Hacks, Scripts and Mods page. You'll find example scripts that interact with this API, as well as instructions on how to contribute your own!
Examples
Full script examples may be found at Hacks, Scripts and Mods.
The following are some quick send/response examples to get you started.
- Log In as Guest
Send | Returns |
---|---|
https://inkbunny.net/api_login.php?output_mode=xml&username=guest | <response>
</response> |
- Log In as Registered User
Send | Returns |
---|---|
https://inkbunny.net/api_login.php?output_mode=xml&username=myusername&password=mypassword | <response>
</response> |
- Turn on chosen Ratings Options
Send | Returns |
---|---|
https://inkbunny.net/api_userrating.php?output_mode=xml&sid=AiMAejQkj7tg5R6Lvff9y3CSMRGTCDtSJDdWku3UMMczHK2Io8mq7fStANk2QsCRBzHcZ7mIaLvXYjVitonv03&tag[2]=yes&tag[3]=yes | <response>
</response> |
Note: Normally only used after login as guest. In this example "Mature - Violence" and "Mature - Nudity" are turned on. |
- Search for all submissions I own
Send | Returns |
---|---|
https://inkbunny.net/api_search.php?output_mode=xml&sid=AiMAejQkj7tg5R6Lvff9y3CSMRGTCDtSJDdWku3UMMczHK2Io8mq7fStANk2QsCRBzHcZ7mIaLvXYjVitonv03&username=myusername | <response>
</response> |
- Search for all my unread submissions (uploaded by artists I watch)
Send | Returns |
---|---|
https://inkbunny.net/api_search.php?output_mode=xml&sid=AiMAejQkj7tg5R6Lvff9y3CSMRGTCDtSJDdWku3UMMczHK2Io8mq7fStANk2QsCRBzHcZ7mIaLvXYjVitonv03&unread_submissions=yes | <response>
</response> |
- Search for all submissions with "dragon" as a keyword
This example also returns a "RID" Results ID by setting "get_rid=yes". The RID is used in the next example to page through results.
Page 1 of 27 possible pages are shown (30 results per page, and 800 total submissions found).
Send | Returns |
---|---|
https://inkbunny.net/api_search.php?output_mode=xml&sid=AiMAejQkj7tg5R6Lvff9y3CSMRGTCDtSJDdWku3UMMczHK2Io8mq7fStANk2QsCRBzHcZ7mIaLvXYjVitonv03&text=dragon&get_rid=yes | <response>
</response> |
- Show page 2 of the above search without running the search again
Send | Returns |
---|---|
https://inkbunny.net/api_search.php?output_mode=xml&sid=AiMAejQkj7tg5R6Lvff9y3CSMRGTCDtSJDdWku3UMMczHK2Io8mq7fStANk2QsCRBzHcZ7mIaLvXYjVitonv03&rid=f36030d230&page=2 | <response>
</response> |
Errors
Response
Standard errors are returned in the following format.
- error_code – The error code number (see table below).
- error_message – Human-readable message associated with the error.
Error Codes
- Note: This is an incomplete list of possible error codes.
- 0 - Invalid login. Username and password incorrect or account does not have API Access enabled in account Settings.
- Note: User accounts are only accessible via the API if “Enable API Access” is enabled in the user's Account Settings https://inkbunny.net/account.php
- 1- No Session ID sent as variable 'sid'.
- If this error appears then a valid session ID is required as part of the query, but it was not received by the script. Session Ids are obtained by logging in using the api_login.php Login script.
- 2 - Invalid Session ID sent as variable 'sid'.
- This error will appear if you send a Session ID (sid) that is not valid, has been logged out or has expired.
- 3 - Invalid Results ID sent as variable 'rid'. It contains invalid characters.
- Results Ids can only contain Hexadecimal values.
- 4 - No results found for Results ID sent as variable 'rid'.
- The Results ID (rid) sent has either expired or is not valid. Results sets will automatically be removed after not being accessed for a period of time, or when a user has created too many results sets (in which case the oldest results sets will be removed first).
- 5 - Current user does not have permission to upload files.
- 6 - Submission Hourly Limit Reached. This policy exists to prevent spamming and flooding. We apologise for the inconvenience. Please wait a while and try again to add more uploads.
- 7 - Database error. Unable to create a new submission.
- 8 - No valid submission id given.
- 9 - Current user does not have permission to edit this submission.
- 10 - Current user does not have permission to edit this file.
- 11 - Could not create an entry for the file (filename) in our database. Please try again. If the problem persists, contact an administrator.
- 12 - User does not have permission to BULK upload multiple pages/files at once.
- 13 - ZIP file is too big.
- 14 - Incoming file names cannot contain a double-dot '..'. Please rename your file and try again.
- 15 - Invalid characters detected in filenames inside your zip file. The server said (error message).
- 16 - Could not extract any files from that ZIP. ZIP files cannot have subdirectories in them for Bulk Upload. Please check the zip file is not damaged and that it has files in it. If you are sure your zip file is fine, please contact an administrator and tell them about this message.
- 17 - The file you uploaded was not a ZIP file. It was of a non-ZIP file type (type). Please try again with a valid ZIP file. If the problem persists, contact an administrator.
- 18 - ZIP upload failed. You might not have provided a file, or the file may have been too big for the size restrictions. If you are sure the file is fine, then the server may be out of space or the tmp uploads directory is not writable. Please contact a system administrator and tell them about this message if you are sure the problem is on our end.
- 19 - File could not be read. File name was (file name).
- 20 - The file you uploaded (file name) was too large in file size. Please try again with a smaller file size. If the problem persists, contact an administrator.
- 21 - The file you uploaded (file name) was of an unsupported file type (type). Please try again with a supported file type as listed. If the problem persists, contact an administrator.
- 22 - The file you uploaded (file name) was too large in pixel size (width and/or height). Please try again with dimensions not exceeding those listed. If the problem persists, contact an administrator.
- 23 - The file you uploaded (file name) was not in RGB or Greyscale color mode (most likely it was in CMYK mode). Please try again with an RGB or Greyscale image. If the problem persists, contact an administrator.
- 24 - There was an unknown error when trying to check your uploaded file (file name). Please check your file meets all the listed requirements and try again. If the problem persists, contact an administrator.
- 25 - The thumbnail you uploaded (file name) was of an unsupported file type (type). Please try again with a supported thumbnail type as listed. If the problem persists, contact an administrator.
- 26 - The thumbnail you uploaded (file name) was too large in pixel size (width and/or height). Please try again with dimensions not exceeding those listed. If the problem persists, contact an administrator.
- 27 - The thumbnail you uploaded (file name) was not in RGB or Greyscale color mode (most likely it was in CMYK mode). Please try again with an RGB or Greyscale thumbnail. If the problem persists, contact an administrator.
- 28 - There was an unknown error when trying to check your uploaded thumbnail (file name). Please check your thumbnail meets all the listed requirements and try again. If the problem persists, contact an administrator.
- 29 - If you upload all the files in this ZIP file, you will exceed the maximum limit of files/pages per submission. None of the files from your zip were added. Please upload less pages in the one zip file or start a new submission for the remaining pages.
- 30 - Received cancellation request or didn't receive response from browser within timeout limit. Some files may have been uploaded successfully. Stopped uploading on file (file name). That file and any after it in the zip were not added.
- 31 - You have reached the maximum allowed number of files/pages for this submission. Stopped uploading on file (file name). That file and any after it in the zip were not added.
- 32 - Could not upload the thumbnail (file name). Please try again. If the problem persists, contact an administrator.
- 33 - Could not create copy of that file in our system. Please try again. If the file is a PNG, make sure it is in RGB color mode and not Indexed color. If the problem persists, contact an administrator.
- 34 - Could not create a thumbnail for the file (file name). Thumbnail file was called (thumbnail file name). If the file is a PNG, make sure it is in RGB color mode and not Indexed color. Please try again. If the problem persists, contact an administrator.
- 35 - User canceled.
- 36 - Invalid Progress Key.
- 37 - Current user does not have permission to delete this submission.
- 38 - Current user does not have permission to remove this file.
- 39 - Current user does not have permission to change the order of this file.
- 40 - That submission has been deleted.
- 41 - Too many submission ids to query. Limit exceeded.
- 42 - Current user does not have permission to get the favlist of this submission.
- 43 - Couldn't create zip tmp extraction dir.
- 44 - Could not rename file in unzip process.
- 45 - Invalid Keyword ID.
- 46 - Could not replace that file or thumbnail.
- 999 - Request was not sent in HTTPS mode.
To Wrap JSON Response in secure escape string
You can choose to wrap JSON output in a special escape string to help prevent XSS and other attacks. Set the parameter "json_secure" to "yes" and all JSON output will be wrapped in the string "/*-secure-\n (Json output here) \n*/".
The characters "\n" in this example represent a carriage return.
This is mainly for use with Javascript frameworks such as Prototype, which have a JSON Secure option that requires this escape string. For more information on JSON and the Prototype framework, see Prototype - Introduction to JSON.
To Wrap JSON Response in a Callback Function
You can choose a function name to wrap JSON data responses for all scripts. Just add the parameter “callback” and the name of the function you want. Eg: “callback=foo” would return JSON data in a format like: foo({“somevar”:”example”})
This is useful for using things like the JSONP trick in jQuery to get around limitations with cross-site Ajax requests. http://remysharp.com/2007/10/08/what-is-jsonp/
- Note: Of course, this only works in JSON output mode. So output_mode must be set to “json” or this parameter means nothing.
Login
URL: https://inkbunny.net/api_login.php
All queries to the API must be sent with a valid Session ID (SID). An SID is returned as a string called “sid” when you successfully log in to the API using the Login script. The SID identifies your session and contains all the properties and settings of the logged in user.
- Notes:
- ESSENTIAL: User accounts are only accessible for login via the API if “Enable API Access” is enabled in the user's Account Settings https://inkbunny.net/account.php
- ESSENTIAL: Unless you connect as a Guest, your script is potentially required to store and send the user's Inkbunny password.
- DO NOT store the password for longer than required. Destroy the variable in memory as soon as possible once you have obtained a valid SID.
- DO NOT hard-code a login username and password into your script or else others may see it when they see your script source! This is especially important in Javascript, where all users have access to your source code.
- To log in as “guest” and return a Session ID for a Guest user, enter username “guest” and do not send a password.
- You should logout if you do not expect to reuse a session. Session IDs typically remain valid for several days after their last use; so if you plan to access the site regularly, you should cache the SID, and only re-login if you receive an invalid SID error (code 2) when attempting to use it. This is preferable to caching login credentials.
Parameters
- Required
- username - Username of account to log in to. Case-insensitive. Set username to “guest” to log in as a guest user.
- Values: (username). Default: n/a. Required: Yes
- password - Password of account to log in to. Case sensitive. Leave blank if logging in as "guest".
- Values: (password). Default: n/a. Required: Yes (except when logging in as guest)
- Optional
- output_mode - Set output response to XML or JSON format.
- Values: json, xml. Default: json. Required: No
Response
- sid - New Session ID for this authenticated session.
- user_id - User ID of the logged in user.
- ratingsmask - Binary string representation of the users Allowed Ratings choice. The bits are in this order left-to-right:
- General – must always be set
- Mature – Nudity
- Mature – Violence
- Adult – Sex
- Adult – Strong Violence
- Eg: A string 11100 means only items rated General, Nudity and Violence are allowed, but Sex and Strong Violence are blocked. A string 11111 means items of any rating would be shown. Only 'left-most significant bits' are returned. So 11010 and 1101 are the same, and 10000 and 1 are the same.
Logout
URL: https://inkbunny.net/api_logout.php
Log out of a session and destroy the temporary session data associated with the Session ID (sid).
Parameters
Required
- sid - Session ID of the session you want to log out of.
- Values: (session ID). Default: n/a. Required: Yes
Optional
- output_mode - Set output response to XML or JSON format.
- Values: json, xml. Default: json. Required: No
Response
- sid - Session ID of the session that was destroyed.
- logout - Will contain the string “success” on successful logout.
Change Allowed Ratings (Guest Accounts Only)
URL: https://inkbunny.net/api_userrating.php
This script allows GUEST users to change their rating choice. By default, Guest users cannot see items with Mature (for sexual content) or Adult ratings.
Notes:
- If you use this script to change rating settings for a logged in registered member, it will affect the current session only. The changes to their allowed ratings will not be saved to their account.
- Members can still choose to block their work from Guest users, regardless of the Guests' rating choice, so some work may still not appear for Guests even with all rating options turned on.
- New Guest sessions and newly created accounts have the tag “Violence - Mild violence” enabled by default, so images tagged with this will be visible. However when calling this script, that tag will be set to “off” unless you explicitly keep it activated with the parameter “tag[3]=yes”.
Parameters
Required
- sid - Session ID of the session you want to change Allowed Ratings for.
- Values: (session ID). Default: n/a. Required: Yes
Optional
- output_mode - Set output response to XML or JSON format.
- Values: json, xml. Default: json. Required: No.
- tag[2] - Show images with Rating tag: "Nudity - Nonsexual nudity exposing breasts or genitals (must not show arousal)".
- Values: yes, no. Default: no. Required: No.
- tag[3] - Show images with Rating tag: "Violence - Mild violence".
- Values: yes, no. Default: no. Required: No.
- tag[4] - Show images with Rating tag: "Sexual Themes - Erotic imagery, sexual activity or arousal".
- Values: yes, no. Default: no. Required: No.
- tag[5] - Show images with Rating tag: "Strong Violence - Strong violence, blood, serious injury or death".
- Values: yes, no. Default: no. Required: No.
Response
- sid - Session ID of the session that had the Allowed Ratings changed.
Search
URL: https://inkbunny.net/api_search.php
Submissions are found via the Search script. Searches return basic submission and thumbnail data, and a summary of the top 100 keywords associated with all the submissions on the current page of search results. The top 100 keywords for a group of submissions are determined and sorted by the number of submissions they are assigned to, system-wide, in descending order.
Note: To help prevent spamming and flooding, submissions are filtered from searches using a “trust” check. This means that submissions will be hidden from general searches if the artist's account hasn't passed the automatically calculated trust rules. This only affects new accounts and only for a short period of time. This trust check is skipped if you search for submissions by a particular user ID (eg: user_id=123) or a particular pool (eg: pool_id=456). Non-published submissions will likewise show up if a user does a a user_id search on themselves.
Searches are run in two possible modes, which depend on what parameters you send the Search script.
Mode 1: Search
Searches are performed based on a set of constraints such as keywords, time range, sort order, count limit, etc. The results are returned for the first page, or the page number you specify. A new search is run each time a call like this is made.
You may elect to have the search system return a Results ID (RID) which can then be used in Mode 2 to page through a results set without running the search again each time.
Mode 2: Page through results
Using a Results ID (RID), which can be returned by any search in Mode 1, you can specify a results set to page through. This means you can run the search once in Mode 1, and then return the results page by page without running the search again. This is much faster than using Mode 1 over and over again to get each subsequent page of results.
The disadvantage is that the results are not updated between requests. If submissions are added, changed or deleted in a way that would alter the current search results, you will not see the change until the search is run again with Mode 1.
Note: If you specify an RID, the search script will ignore all "Mode 1" search parameters.
Parameters
Output Control
Required
- sid - Current valid Session ID.
- Values: (session ID). Default: n/a. Required: Yes
Optional
- output_mode - Set output response to XML or JSON format.
- Values: json, xml. Default: json. Required: No
- rid - Results ID of results set to page through. To get an RID to use here, run a search (Mode 1, as described above) with “get_rid=yes” first. Then use the returned RID here to page through those results without needing to run the same search again. Only used for Mode 2, as described above.
- Note: Results sets will be automatically removed after not being accessed for a certain amount of time, or if an excess number of results sets are created by a user. Attempting to access a results set that has been removed will throw an error. See the Error Codes section in this document.
- Values: (Results ID obtained in Mode 1). Default: n/a. Required: No
- submission_ids_only - Boolean. Return Submission Ids Only (and no other submission info).
- Values: yes,no. Default: no. Required: No
- submissions_per_page - Number of submissions to return per page of results.
- Values: Integer from 0 to 100. Default: 30. Required: No
- page - Results page number to return.
- Values: Integer from 1 to Maximum Pages returned. Default: 1. Required: No.
- keywords_list - Boolean. Return list of Top 100 Keywords associated with all submissions on current results page. Note that this list includes both offcially assigned keywords and also keywords suggested for this submission by other users.
- Values: yes,no. Default: no. Required: No
- no_submissions - Boolean. Skip returning submission info. Useful when you are just returning Top Keywords or Submission Counts for searches and you don't want all the other submission data.
- Values: yes,no. Default: no. Required: No
- get_rid - Boolean. Return a Results ID for this search, which can then be used in Mode 2 to page through the results without running the search again for each page.
- Values: yes,no. Default: no. Required: No
Search Condition Parameters (Only used in Mode 1)
Note: If you send a Results ID (the parameter “rid”, above) then the search runs in Mode 2 and these Search Condition parameters are ignored.
Optional
- field_join_type- Defines the union between keywords, description, writing and title search fields. Possible values are "or", "and".
- "or" will return submissions found that have the search text in any one of the chosen fields (The default and recommended settings).
- "and" will ONLY return submissions that have the search text found in ALL of the chosen fields (unusual and not recommended).
- Values: or,and. Default: or. Required: No
- text - Text to search chosen fields for. eg "dragon", "wolf", etc. A Full Text search is performed using this string (see the meaning of Full Text searches in the Postgresql Documentation). The characters "_" and "," are converted to spaces automatically. Characters which have special meanings for Full Text searches in Postgresql (such as |, &, :, ! and ~) are ignored.
- Note: At least one of the Search Field parameters "keywords", "title", "description" or "md5" must be set to “yes” for text search to work. By default, "keywords" is set to "yes", so all searches with no Search Field specified will search in keywords.
- Values: (Any text string). Default: n/a. Required: No
- string_join_type - Join type for the words in a string of text being searched for. "and" finds all the words together in the chosen field (default), "or" finds any one of the words, "exact" find the exact phrase.
- Note: This property has no effect on searching for MD5 strings (property "MD5" set to "yes"), which always assumes "or" when multiple MD5 Hashes are given.
- Values: or,and. Default: and. Required: No
- keywords - Boolean. Search Keywords for the chosen text.
- Note: This is ON by default, and is the standard field that text searches look in, unless specified otherwise.
- Note: At least one of keywords, title or description must be set to “yes” for text search to work.
- Values: yes,no. Default: yes. Required: No
- title - Boolean. Search Title for the chosen text.
- Note: At least one of keywords, title or description must be set to “yes” for text search to work.
- Values: yes,no. Default: no. Required: No
- description - Boolean. Search the Description AND Story fields for the chosen text.
- Note: At least one of keywords, title or description must be set to “yes” for text search to work.
- Values: yes,no. Default: no. Required: No
- md5 - Boolean. Search for the chosen text in the MD5 Checksum/hash of the Initial (as uploaded and before any conversion), Full (may have metadata removed and optimised for lossless compression), Large (also known as Screen), Small, or HiRes/Sales versions of a file. This is useful for finding files based on their content, and for finding identical files.
- Notes:
- Although the MD5 Hash for the HiRes/Sales file is only shown to the Submission owner, they are still found when anyone runs an MD5 search.
- Deleted Files - This search will also find submissions based the MD5 of free and sales files that are marked deleted (that have been removed from a submission). This is to assist with finding submissions even if their files are updated later.
- The property "string_join_type" has no effect on searching for MD5 strings. It always assumes "or" when multiple MD5 Hashes are given.
- See MD5 Checksums for more information on how MD5 is used in Inkbunny.
- Values: yes,no. Default: no. Required: No
- Notes:
- keyword_id - Keyword ID to search for. Overrides text search and all its options.
- Values: (Any Keyword ID). Default: n/a. Required: No
- username - Limit results to those uploaded/owned by user with this Username only. Must be exact, but is case-insensitive. May includes non-published submissions if run by a moderator.
- Values: (Exact username, case insensitive). Default: n/a. Required: No
- user_id - Limit results to those uploaded/owned by user with this User ID. May include non-published submissions if run by the relevant user, or a moderator.
- Values: (User ID). Default: n/a. Required: No
- favs_user_id - Limit results to favorites of the user with this User ID only.
- Values: (User ID). Default: n/a. Required: No
- unread_submissions - Boolean. Limit results to those which are New Unread Submissions for the currently logged in user.
- Note: This will return anything in the user's unread submissions list, even if it would normally be blocked by ratings or keywords. Items only end up in the unread submissions list in the first place if they pass the blocking checks. So blocked items would only be returned here if they had their keywords or ratings changed after they were added to this user's list.
- Values: yes,no. Default: no. Required: No
- type - Limit results to submissions with this type id. Multiple type ids are allowed, separated by commas, NO SPACES.
- Available IDs are
- 1 - Picture/Pinup
- 2 - Sketch
- 3 - Picture Series
- 4 - Comic
- 5 - Portfolio
- 6 - Shockwave/Flash - Animation
- 7 - Shockwave/Flash - Interactive
- 8 - Video - Feature Length
- 9 - Video - Animation/3D/CGI
- 10 - Music - Single Track
- 11 - Music - Album
- 12 - Writing - Document
- 13 - Character Sheet
- 14 - Photography - Fursuit/Sculpture/Jewelry/etc
- Values: (Submission type Ids separated by commas, no spaces). Default: n/a. Required: No
- sales - Filter by sales status. Possible options are "forsale" (for sale by any method), "digital" (digital sales), "prints" (print sales.
- Values: forsale,digital,prints. Default: n/a. Required: No
- pool_id - Show only submissions from the Pool that has this Pool ID.
- Values: (any pool id). Default: n/a. Required: No
- orderby - Order search results by selected criteria.
- Possible values are:
- create_datetime - date submission was uploaded.
- last_file_update_datetime - date the most recent file attached to the submission was added/changed. Submissions with no attached files will be listed last.
- unread_datetime – DESCENDING date that submission was added to the user's unread submissions list (newest first). Only for use when "unread_submissions=yes" is set.
- unread_datetime_reverse – ASCENDING date that submission was added to the user's unread submissions list (oldest first). Only for use when "unread_submissions=yes" is set.
- views – Number of times submission has been viewed.
- total_print_sales – Number of times submission has sold as a print.
- total_digital_sales – Number of times submission has sold as a download.
- total_sales – Number of times a submission has been sold in total, of any sale type.
- username - artist name.
- fav_datetime - date image was set as a favorite by target user. Only for use when "favs_user_id" is set.
- fav_stars - number of stars assigned to favorite by target user. Only for use when "favs_user_id" is set.
- pool_order - submission order specified for the target pool. Only for use when "pool_id" is set.
- Values: create_datetime, unread_datetime, views, total_print_sales, total_digital_sales, total_sales, username, fav_datetime, fav_stars, pool_order. Default: create_datetime. Required: No
- dayslimit - Limit results to those uploaded in the last X number of days.
- Values: (Integer greater than zero). Default: n/a. Required: No
- random - Boolean. Sort results randomly. This is done after all other filters and sort orders are applied. This can be used in conjunction with "orderby". You can order results with "orderby", limit the number returned with other filters like "count_limit", and then if "random=yes" it will sort those results randomly. Eg: Set "orderby=views" and "count_limit=100" to get the top 100 submissions, then with "random=yes" those top 100 are sorted randomly AFTER the other limits and conditions are used. Does your head hurt? Mine does.
- Values: yes, no. Default: no. Required: No
- scraps - Set how submissions marked as “Scraps” are returned.
- Possible values are:
- both – show submissions from Scraps and Main galleries.
- no – Do not show Scraps. Shows only submissions from Main galleries.
- only – Show only submissions from Scraps galleries, not Main galleries.
- Values: both, no, only. Default: both. Required: No
- count_limit - Limit number of returned results. Minimum is 1. Maximum is 50000.
- Values: (Integer greater than zero). Default: 50000. Required: No.
Response
- sid - Session ID for the current session.
- user_location - User location (city, state, country), if set. Used to indicate what location the dates and times are returned for.
- results_count_all - Total number of results returned by this search (not just those on the current page).
- results_count_thispage - Number of results on the current page only.
- pages_count - Number of pages of results returned.
- page - Current page number being viewed.
- rid - Results ID for this result set. Only returned if “get_rid” is set to “yes”, or if a Results ID “rid” was sent to return pages of an existing result set.
- rid_ttl - Time until this results set is deleted from the system. The timer is reset each time a results set is accessed. Returns time in a format like “2 hours”, “3 days”, etc. Only returned if a Results ID “rid” is also returned.
- search_params[param] - Array of search parameters that were used to find these search results. In XML mode, each search parameter is wrapped in a “param” tag.
- Elements for each search parameter entry follow:
- param_name- Search parameter name. These match the search parameter names described in Search Condition Parameters above.
- param_value - Search parameter value. These match the allowed search parameter values described in Search Condition Parameters above.
- Elements for each search parameter entry follow:
- keyword_list[keyword] - Array of top 100 keywords (sorted by number of submissions tagged with each, in descending order) that the current page of results are tagged with. In XML mode, each keyword is wrapped in a “keyword” tag. Note that Keywords List is only returned if the “keywords_list” parameter is set to “yes”. By default the list is hidden.
- Elements for each keyword entry follow:
- keyword_id - Keyword ID.
- keyword_name - Name of keyword.
- submissions_count - Number of submissions tagged with this keyword, systemwide.
- Elements for each keyword entry follow:
- submissions[submission] - Array of submissions returned. In XML mode, each submission is wrapped in a “submission” tag.
- Note: Returning submission data can be turned off if “no_submissions” is set to “yes”.
- Elements for each submission entry follow:
- submission_id - Submission ID
- hidden - Is the submission “hidden” (blocked) from the user due to keyword blocking, ratings or artist name blocking? Normally submissions that are “hidden” from users do not get returned in search results, but may be returned if the user has chosen to see hidden (blocked) submissions anyway. Boolean true (t) or false (f).
- Note: It is the responsibility of the coder to ensure that hidden (blocked) submissions that return “true” in this field are treated specially. The actual thumbnail should not be displayed and some kind of warning should be shown to the user that this submission is blocked from them, but they may still choose to click on it anyway.
- hidden - Is the submission “hidden” (blocked) from the user due to keyword blocking, ratings or artist name blocking? Normally submissions that are “hidden” from users do not get returned in search results, but may be returned if the user has chosen to see hidden (blocked) submissions anyway. Boolean true (t) or false (f).
- username - Username of the owner of the submission.
- user_id - User ID of the owner of the submission.
- create_datetime - SYSTEM TIME that the submission was first uploaded or first made public. See #Time Stamps.
- create_datetime_usertime - USER TIME (reative to “user_location” above) that the submission was first uploaded or first made public.
- last_file_update_datetime - SYSTEM TIME that the latest file was uploaded to this submission. Will be NULL (empty string) if there are no files attached to the submission. See #Time Stamps.
- last_file_update_datetime_usertime - USER TIME (reative to “user_location” above) that the latest file was uploaded to this submission. Will be NULL (empty string) if there are no files attached to the submission.
- unread_datetime - SYSTEM TIME that the submission was added to your Unread Submissions list. See #Time Stamps.
- unread_datetime_usertime - USER TIME (reative to “user_location” above) that the submission was added to your Unread Submissions list.
- updated - Was this submission updated? Boolean true (t) or false (f). Only shows when displaying Unread Submissions.
- stars - Number of stars awarded by the user who favorited this submission. Only shows when displaying the Favorites of a particular user.
- file_name - Base file name of the submission. Eg: “12341_myusername_fredthecat.jpg”
- thumbnail_url_(SIZE) - Full URL of the (SIZE) thumbnail for the PRIMARY file of this submission. SIZE can be one of "medium, large, huge". Omitted if no thumbnail file of this type exists.
- thumbnail_url_(SIZE)_noncustom - Full URL of the (SIZE) NON-CUSTOM thumbnail for the PRIMARY file of this submission. SIZE can be one of "medium, large, huge". “Non Custom” thumbnails are the original thumbnail of the image, NOT the custom thumbnail uploaded by the artist. Omitted if no thumbnail file of this type exists.
- file_url_(SIZE) - Full URL of the (SIZE) asset for the PRIMARY file of this submission. SIZE can be one of "full, screen, preview".
- latest_file_name - Base file name of the LATEST added file of this submission. Eg: “12341_myusername_fredthecat.jpg”
- latest_thumbnail_url_(size) - Full URL of the (SIZE) thumbnail for the LATEST added file of this submission. SIZE can be one of "medium, large, huge". Omitted if no thumbnail file of this type exists.
- latest_thumbnail_url_(size)_noncustom - Full URL of the (SIZE) NON-CUSTOM thumbnail for the LATEST added file of this submission. SIZE can be one of "medium, large, huge". “Non Custom” thumbnails are the original thumbnail of the image, NOT the custom thumbnail uploaded by the artist. Omitted if no thumbnail file of this type exists.
- title - Title of the submission.
- deleted - Is the submission deleted? Boolean true (t) or false (f). Usually only moderators can see deleted submissions in searches so this will most often return “f”.
- public - Is the submission set public? Boolean true (t) or false (f). Unless you are a moderator, you can only see non-published submissions owned by you, and only if you are viewing your own gallery via a user_id search (not username).
- mimetype - Mimetype of the PRIMARY file for this submission.
- pagecount - The total number of files (also known as pages) attached to this submission.
- latest_mimetype - Mimetype of the LATEST added file for this submission.
- rating_id - Rating ID for this submission. Rartings are 0 (General), 1 (Mature) and 2 (Adult).
- rating_name - Name of the Rating – General, Mature or Adult.
- thumb_(SIZE)_x - Width of the (SIZE) thumbnail of the PRIMARY file for this submission. SIZE can be one of "medium, large, huge". Omitted if no thumbnail file of this type exists.
- thumb_(SIZE)_y - Height of the (SIZE) thumbnail of the PRIMARY file for this submission. SIZE can be one of "medium, large, huge". Omitted if no thumbnail file of this type exists.
- thumb_(SIZE)_noncustom_x - Width of the (SIZE) NON-CUSTOM thumbnail of the PRIMARY file for this submission. SIZE can be one of "medium, large, huge". Omitted if no thumbnail file of this type exists.
- thumb_(SIZE)_noncustom_y - Height of the (SIZE) NON-CUSTOM thumbnail of the PRIMARY file for this submission. SIZE can be one of "medium, large, huge". Omitted if no thumbnail file of this type exists.
- latest_thumb_(SIZE)_x - Width of the (SIZE) thumbnail of the LATEST file for this submission. SIZE can be one of "medium, large, huge". Omitted if no thumbnail file of this type exists.
- latest_thumb_(SIZE)_y - Height of the (SIZE) thumbnail of the LATEST file for this submission. SIZE can be one of "medium, large, huge". Omitted if no thumbnail file of this type exists.
- latest_thumb_(SIZE)_noncustom_x - Width of the (SIZE) NON-CUSTOM thumbnail of the LATEST file for this submission. SIZE can be one of "medium, large, huge". Omitted if no thumbnail file of this type exists.
- latest_thumb_(SIZE)_noncustom_y - Height of the (SIZE) NON-CUSTOM thumbnail of the LATEST file for this submission. SIZE can be one of "medium, large, huge". Omitted if no thumbnail file of this type exists.
- submission_type_id - Submission Type Id of the submission. Submission types are:
- 1 - Picture/Pinup
- 2 - Sketch
- 3 - Picture Series
- 4 - Comic
- 5 - Portfolio
- 6 - Shockwave/Flash - Animation
- 7 - Shockwave/Flash - Interactive
- 8 - Video - Feature Length
- 9 - Video - Animation/3D/CGI
- 10 - Music - Single Track
- 11 - Music - Album
- 12 - Writing - Document
- 13 - Character Sheet
- 14 - Photography - Fursuit/Sculpture/Jewelry/etc
- submission_type_id - Submission Type Id of the submission. Submission types are:
- type_name - Submission Type Name. See list of possible submission types for submission_type_id above.
- digitalsales - Is this submission enabled for Digital Sales? Boolean true (t) or false (f).
- printsales - Is this submission enabled for Print Sales? Boolean true (t) or false (f).
- friends_only - Is this submission only visible to friends of the owner only? Boolean true (t) or false (f).
- guest_block - Is this submission blocked for guest access? Boolean true (t) or false (f).
- scraps - Is this submission in the owner's "scraps" gallery? Boolean true (t) or false (f).
Submission Details
URL: https://inkbunny.net/api_submissions.php
This script returns full details about submissions with the given Submission IDs.
Parameters
Required
- sid - Current valid Session ID.
- Values: (session ID). Default: n/a. Required: Yes
- submission_ids - Submission IDs to return data for. Comma separated list. No spaces.
- Note: A maximum of 100 Submission IDs is allowed per request.
- Values: (Submission IDs. Comma separated list. No spaces). Default: n/a. Required: Yes
Optional
- output_mode - Set output response to XML or JSON format.
- Values: json, xml. Default: json. Required: No
- sort_keywords_by - How to sort keywords.
- Possible options are:
- alphabetical – Sort alphabetically.
- submissions_count – Sort by number of submissions the keyword is assigned to systemwide.
- Values: alphabetical, submissions_count. Default: alphabetical. Required: No
- Possible options are:
- show_description - Boolean. Return Submission Description. The description can be very long so it is not returned by default. Note that descriptions contain unparsed BBCode.
- Values: yes, no. Default: no. Required: No
- show_description_bbcode_parsed - Boolean. Return a version of Submission Description with BBCode parsed into HTML.
- Values: yes, no. Default: no. Required: No
- show_writing - Boolean. Return Submission Writing. The writing can be very long so it is not returned by default. Note that writing contains unparsed BBCode.
- Values: yes, no. Default: no. Required: No
- show_writing_bbcode_parsed - Boolean. Return a version of Submission Writing with BBCode parsed into HTML.
- Values: yes, no. Default: no. Required: No
- show_pools - Boolean. Return pools data for this submission.
- Values: yes, no. Default: no. Required: No
Response
- sid - Session ID for the current session.
- results_count - Number of submissions returned.
- user_location - User location (city, state, country), if set. Used to indicate what locastion dates and times are returned for.
- submissions[submission] - Array of submissions returned. In XML mode, each submission is wrapped in a “submission” tag.
- Elements for each submission entry follow:
- submission_id - Submission ID.
- keywords[keyword] - Array of keywords for this submission. In XML mode, each keyword is wrapped in a “keyword” tag.
- Elements for each keyword entry follow:
- keyword_id - Keyword ID.
- keyword_name - Keyword Name.
- contributed - Whether or not this keyword was contributed by a user other than the submission owner. If true 't' then the keyword was contributed as a suggestion and is not yet officially assigned. However, contributed keywords still affect the submission for search and block functions. In the Inkbunny HTML interface, these contributed keywords are called "suggested keywords" on a submission. Boolean true (t) or false (f).
- submissions_count - Maximum number of submissions that would be returned by searching for this keyword.
- hidden - Is the submission “hidden” (blocked) from the user due to keyword blocking, ratings or artist name blocking? Normally submissions that are “hidden” from users do not get returned in search results, but may be returned if the user has chosen to see hidden (blocked) submissions anyway. Boolean true (t) or false (f).
- Note: It is the responsibility of the coder to ensure that hidden (blocked) submissions that return “true” in this field are treated specially. The actual thumbnail should not be displayed and some kind of warning should be shown to the user that this submission is blocked from them, but they may still choose to click on it anyway.
- hidden - Is the submission “hidden” (blocked) from the user due to keyword blocking, ratings or artist name blocking? Normally submissions that are “hidden” from users do not get returned in search results, but may be returned if the user has chosen to see hidden (blocked) submissions anyway. Boolean true (t) or false (f).
- scraps - Boolean true (t) or false (f). Is this submission in the owner's "scraps" gallery?
- favorite - Boolean true (t) or false (f). Is this submission a favorite of the currently logged in user?
- favorites_count - How many users have selected this submission as a favorite.
- create_datetime - SYSTEM TIME that the submission was first uploaded or first made public. See #Time Stamps.
- create_datetime_usertime - USER TIME (reative to “user_location” above) that the submission was first uploaded or first made public.
- last_file_update_datetime - SYSTEM TIME that the latest file was uploaded to this submission. Will be NULL (empty string) if there are no files attached to the submission. See #Time Stamps.
- last_file_update_datetime_usertime - USER TIME (reative to “user_location” above) that the latest file was uploaded to this submission. Will be NULL (empty string) if there are no files attached to the submission.
- username - Username of the owner of the submission.
- user_id - User ID of the owner of the submission.
- user_icon_file_name - Base file name of the usericon for the owning user.
- user_icon_url_(SIZE) - URL of the (SIZE) usericon for the owning user. SIZE can be one of "large, medium, small".
- file_name - Base file name of the PRIMARY file of the submission. Eg: “12341_myusername_fredthecat.jpg”
- latest_file_name - Base file name of the LATEST added file of the submission. Eg: “12341_myusername_fredthecat.jpg”
- thumbnail_url_(SIZE) - Full URL of the (SIZE) thumbnail for the PRIMARY file of this submission. SIZE can be one of "medium, large, huge". Omitted if no thumbnail file of this type exists.
- thumbnail_url_(size)_noncustom - Full URL of the (SIZE) NON-CUSTOM thumbnail for the PRIMARY file of this submission. SIZE can be one of "medium, large, huge". “Non Custom” thumbnails are the original thumbnail of the image, NOT the custom thumbnail uploaded by the artist. Omitted if no thumbnail file of this type exists.
- file_url_(SIZE) - Full URL of the (SIZE) asset for the PRIMARY file of this submission. SIZE can be one of "full, screen, preview".
- latest_thumbnail_url_(SIZE) - Full URL of the (SIZE) thumbnail for the LATEST added file of this submission. SIZE can be one of "medium, large, huge". Omitted if no thumbnail file of this type exists.
- latest_thumbnail_url_(size)_noncustom - Full URL of the (SIZE) NON-CUSTOM thumbnail for the LATEST added file of this submission. SIZE can be one of "medium, large, huge". “Non Custom” thumbnails are the original thumbnail of the image, NOT the custom thumbnail uploaded by the artist. Omitted if no thumbnail file of this type exists.
- latest_file_url_(SIZE) - Full URL of the (SIZE) asset for the LATEST added file of this submission. SIZE can be one of "full, screen, preview".
- files[file] - Array of Files attached to this submission. In XML mode, each file is wrapped in a “file” tag.
- Elements for each file entry follow:
- files[file] - Array of Files attached to this submission. In XML mode, each file is wrapped in a “file” tag.
- file_id - File ID.
- file_name - Base file name of this file. Eg: “12341_myusername_fredthecat.jpg”
- thumbnail_url_(SIZE) - Full URL of the (SIZE) thumbnail for this file. SIZE can be one of "medium, large, huge".
- thumbnail_url_(size)_noncustom - Full URL of the (SIZE) NON-CUSTOM thumbnail for this file. SIZE can be one of "medium, large, huge". “Non Custom” thumbnails are the original thumbnail of the image, NOT the custom thumbnail uploaded by the artist.
- file_url_(SIZE) - Full URL of the (SIZE) asset for this file. SIZE can be one of "full, screen, preview".
- mimetype - Mimetype for this file.
- submission_id - Submission ID this file belongs to.
- user_id - User ID of user who owns/uploaded this file.
- submission_file_order - An integer showing the order in which the files attached to this submission should be displayed. Starts counting at 0 for the first file/page in the submission.
- (SIZE)_size_x - Width in pixels of uploaded image. SIZE can be one of "full, screen, preview". "full" is the maximum size file uploaded, "screen" is the image resized to fit the default site layout (max 950px wide or high), "preview" is a small preview version of the file.
- (SIZE)_size_y - Same as "(SIZE)_size_x" above, but for the Height of the file in pixels.
- thumb_(SIZE)_x - Width in pixels of the thumbnail. SIZE can be one of "huge, large, medium". Omitted if no thumbnail file of this type exists.
- thumb_(SIZE)_y - Height in pixels of the thumbnail. SIZE can be one of "huge, large, medium". Omitted if no thumbnail file of this type exists.
- thumb_(SIZE)_noncustom_x - Width in pixels of the NONCUSTOM thumbnail. SIZE can be one of "huge, large, medium". See the explanation of "noncustom" thumbnails in the property "thumbnail_url_(size)_noncustom" above. Omitted if no thumbnail file of this type exists.
- thumb_(SIZE)_noncustom_y - Height in pixels of the NONCUSTOM thumbnail. SIZE can be one of "huge, large, medium". See the explanation of "noncustom" thumbnails in the property "thumbnail_url_(size)_noncustom" above. Omitted if no thumbnail file of this type exists.
- initial_file_md5 - MD5 checksum of the INITIAL size file. This is the file before it is optimised for lossless compression and metadata removed.
- full_file_md5 - MD5 checksum of the FULL size file (file may have been optimised for lossless compression and metadata removed).
- large_file_md5 - MD5 checksum of the LARGE (also known as SCREEN) size file.
- small_file_md5 - MD5 checksum of the SMALL (also known as PREVIEW) size file.
- thumbnail_md5 - MD5 checksum of the LARGE size custom thumbnail, if present.
- deleted - Boolean true (t) or false (f). Is this file deleted or not? Deleted files can only be seen by moderators so this value is normally "f".
- create_datetime - SYSTEM TIME that the file was uploaded. See #Time Stamps.
- create_datetime_usertime - USER TIME (reative to “user_location” above) that the file was uploaded.
- pools[pool] - Array of pools for this submission. In XML mode, each pool is wrapped in a “pool” tag.
- Elements for each submission entry follow:
- pool_id - Pool ID.
- name - Name of this pool.
- description - Description for this pool
- count - Number of submissions in this pool.
- The following values are for the submissions to the "Left" and "Right" of the current submission in this pool.
- submission_(left|right)_submission_id - Submission ID of the submission to the Left or Right of the current submission in this pool.
- submission_(left|right)_file_name - Base file name of the PRIMARY file for the submission. Eg: “12341_myusername_fredthecat.jpg”
- submission_(left|right)_thumbnail_url_(SIZE) - Full URL of the (SIZE) PRIMARY thumbnail for the left or right submission. SIZE can be one of "medium, large, huge". Omitted if no thumbnail file of this type exists.
- submission_(left|right)_thumbnail_url_(SIZE)_noncustom - Full URL of the (SIZE) NON-CUSTOM PRIMARY thumbnail for the left or right submission. SIZE can be one of "medium, large, huge". “Non Custom” thumbnails are the original thumbnail of the image, NOT the custom thumbnail uploaded by the artist. Omitted if no thumbnail file of this type exists.
- submission_(left|right)_thumb_(SIZE)_x - Width in pixels of the thumbnail. SIZE can be one of "huge, large, medium". Omitted if no thumbnail file of this type exists.
- submission_(left|right)_thumb_(SIZE)_y - Height in pixels of the thumbnail. SIZE can be one of "huge, large, medium". Omitted if no thumbnail file of this type exists.
- submission_(left|right)_thumb_(SIZE)_noncustom_x - Width in pixels of the NONCUSTOM thumbnail. SIZE can be one of "huge, large, medium". See the explanation of "noncustom" thumbnails in the property "thumbnail_url_(size)_noncustom" above. Omitted if no thumbnail file of this type exists.
- submission_(left|right)_thumb_(SIZE)_noncustom_y - Height in pixels of the NONCUSTOM thumbnail. SIZE can be one of "huge, large, medium". See the explanation of "noncustom" thumbnails in the property "thumbnail_url_(size)_noncustom" above. Omitted if no thumbnail file of this type exists.
- description - Description for the submission. May contain unparsed BBCode.
- description_bbcode_parsed - Description for the submission with BBCode parsed into HTML.
- writing - Writing/story for the submission. May contain unparsed BBCode.
- writing_bbcode_parsed - Writing/story for the submission with BBCode parsed into HTML.
- pools_count - Number of pools this submission belongs to.
- title - Title for submission.
- deleted - Boolean true (t) or false (f). Is this submission deleted? Only moderators can see deleted submissions so this value will normally be "f".
- public - Boolean true (t) or false (f). Is this submission set public?
- mimetype - Mimetype for the PRIMARY file of this submission.
- pagecount - The total number of files (also known as pages) attached to this submission.
- latest_mimetype - Mimetype for the LATEST added file of this submission.
- rating_id - Overall Rating ID for this submission. Ratings are 0 (General), 1 (Mature) and 2 (Adult).
- rating_name - Name of the overall rating assigned to this submission. Possible rating names are General, Mature and Adult.
- ratings[rating] - Array of Rating Tags assigned to this submission. Rating tags are used to give fine-grained classification to sex or violence content in a submission. The maximum "rating_id" of all assigned Rating Tags is then used for the overall submission Rating ID.
- content_tag_id - Unique ID for this assigned rating tag.
- name - Name for this assigned rating tag.
- description - Description for this assigned rating tag.
- rating_id - Rating ID for this assigned rating tag.
- thumb_(SIZE)_x - Width of thumbnail of the PRIMARY file for this submission. SIZE can be one of "huge, large, medium". Omitted if no thumbnail file of this type exists.
- thumb_(SIZE)_y - Height of thumbnail of the PRIMARY file for this submission. SIZE can be one of "huge, large, medium". Omitted if no thumbnail file of this type exists.
- thumb_(SIZE)_noncustom_x - Width in pixels of the NONCUSTOM thumbnail of the PRIMARY file for this submission. SIZE can be one of "huge, large, medium". See the explanation of "noncustom" thumbnails in the property "thumbnail_url_(size)_noncustom" above. Omitted if no thumbnail file of this type exists.
- thumb_(SIZE)_noncustom_y - Height in pixels of the NONCUSTOM thumbnail of the PRIMARY file for this submission. SIZE can be one of "huge, large, medium". See the explanation of "noncustom" thumbnails in the property "thumbnail_url_(size)_noncustom" above. Omitted if no thumbnail file of this type exists.
- latest_thumb_(SIZE)_x - Width of thumbnail of the LATEST added file for this submission. SIZE can be one of "huge, large, medium". Omitted if no thumbnail file of this type exists.
- latest_thumb_(SIZE)_y - Height of thumbnail of the LATEST added file for this submission. SIZE can be one of "huge, large, medium". Omitted if no thumbnail file of this type exists.
- latest_thumb_(SIZE)_noncustom_x - Width in pixels of the NONCUSTOM thumbnail of the LATEST added file for this submission. SIZE can be one of "huge, large, medium". See the explanation of "noncustom" thumbnails in the property "thumbnail_url_(size)_noncustom" above. Omitted if no thumbnail file of this type exists.
- latest_thumb_(SIZE)_noncustom_y - Height in pixels of the NONCUSTOM thumbnail of the LATEST added file for this submission. SIZE can be one of "huge, large, medium". See the explanation of "noncustom" thumbnails in the property "thumbnail_url_(size)_noncustom" above. Omitted if no thumbnail file of this type exists.
- submission_type_id - Submission Type Id of the submission. Submission types are:
- 1 - Picture/Pinup
- 2 - Sketch
- 3 - Picture Series
- 4 - Comic
- 5 - Portfolio
- 6 - Shockwave/Flash - Animation
- 7 - Shockwave/Flash - Interactive
- 8 - Video - Feature Length
- 9 - Video - Animation/3D/CGI
- 10 - Music - Single Track
- 11 - Music - Album
- 12 - Writing - Document
- 13 - Character Sheet
- 14 - Photography - Fursuit/Sculpture/Jewelry/etc
- submission_type_id - Submission Type Id of the submission. Submission types are:
- type_name - Submission Type Name of the Submission Type Id for this submission. See possible type names listed under the "submission_type_id" property.
- guest_block - Boolean true (t) or false (f). Is this submission blocked from viewing by Guest users?
- friends_only - Boolean true (t) or false (f). Is this submission visible only to Friends of the user account that owns the submission?
- comments_count - Number of comments given on this submission.
- views - Number of times this submission has been viewed. Only counts 1 view per viewing member per day. Does not count views by guests.
- sales_description - Brief description of the Digital Sales file attached to this submission.
- forsale - Boolean true (t) or false (f). Are sales (of either type) active for this submission?
- digitalsales - Boolean true (t) or false (f). Are DIGITAL sales active for this submission?
- printsales - Boolean true (t) or false (f). Are PRINT sales active for this submission?
- digital_price - Price for DIGITAL sales (in $USD).
- prints[print] - Array of available Print Sales sizes for this submission. In XML mode, each available print size is wrapped in a “print” tag.
- Elements for each print entry follow:
- prints[print] - Array of available Print Sales sizes for this submission. In XML mode, each available print size is wrapped in a “print” tag.
- print_size_id - Print size ID. At the time this doc was created, the possible sizes and IDs are:
- 0 - 5.5" x 8.5"
- 1 - 8.5" x 11"
- 2 - 18" x 24"
- 3 - 24" x 36"
- print_size_id - Print size ID. At the time this doc was created, the possible sizes and IDs are:
- name - Print size name. See all possible names listed under the "print_size_id" property above.
- price - Price of this print size (in $USD).
- price_owner_discount - Price of this print size (in $USD) that the OWNER of this submission would pay to buy this size. Only shows when viewing the submission while logged in as its owner.
Submission's faving users
URL: https://inkbunny.net/api_submissionfavingusers.php
Returns a list of usernames and user ID's that favorited the given Submission's ID (submission_id).
- Note: Only the owner of a submission, or a moderator, can access this information.
Parameters
Required
- sid - Current valid Session ID.
- Values: (session ID). Default: n/a. Required: Yes
- submission_id - Submission ID of the to check its list of users that faved it.
- Values: (Submission ID). Default: n/a. Required: Yes
Optional
- output_mode - Set output response to XML or JSON format.
- Values: json, xml. Default: json. Required: No
Response
- sid - Session ID for the current session.
- favingusers[favinguser] - Array of users that favorited this submission. In XML mode, each faving user is wrapped in a “favingusers” tag.
- Elements for each user entry follow:
- user_id - User ID.
- username - Current name of the user.
Upload
URL: https://inkbunny.net/api_upload.php
This script uploads files/thumbnails to an existing Submission, or creates a new Submission from the files being uploaded. Multiple files can be uploaded at once to a single submission using an array of files or a ZIP file.
- Notes:
- Files can only be uploaded via the POST method. This is due to limitations with sending binary file data via the GET method.
- To allow an HTML FORM to transmit binary upload data, the HTML FORM encoding type must be set to enctype="multipart/form-data".
- Eg: <form enctype="multipart/form-data" method="post" action="https://inkbunny.net/api_upload.php">
- All new submissions created by uploading a file are initially set "Non Public" until their details are completed and their "Public" status is explicitly turned on via the Edit Submission Details interface.
- The Submission Type ID is automatically set based on the first File added to the submission, if it is of an easily classified type. The following type IDs are automatically assigned:
- Images (Jpeg, Gif, PNG) - 1 "Picture/Pinup"
- Video (FLV) - 9 "Video - Animation/3D/CGI"
- Flash/Shockwave - 6 "Shockwave/Flash - Animation "
- Audio (MP3) - 10 "Music - Single Track "
- Documents (DOC, TXT, RTF) - 12 "Writing - Document"
- The "Story" field is auto-filled from the first file added to the submission if it is a DOC or TXT format document. RTF format is not used for auto-fill because of issues with decoding UTF-8 and other character sets.
An example HTML FORM for uploading files can be found here at Sample Upload Form.
Parameters
Required
- sid - Current valid Session ID.
- Values: (session ID). Default: n/a. Required: Yes
Optional
- output_mode - Set output response to XML or JSON format.
- Values: json, xml. Default: json. Required: No
- submission_id - Submission ID of the existing submission to modify. When no Submission ID is given, a new Submission is created.
- Note: Errors will occur if you do not have permission to upload files and create submissions, or if you do not have permission to edit the specified submission.
- Values: (Submission ID). Default: n/a. Required: No
- progress_key - A unique key used to track upload progress. The key must me a long random unique string. We recommend a random alpha-numeric string 32 characters long. The key can then be sent to the progress.php interface to obtain upload progress data.
- Note: If a progress key is sent, then the key must be queried regularly via the progress.php interface or the upload will be canceled. See more info in the Upload Progress section.
- Values: (Any unique string). Default: n/a. Required: No
- notify - Notify your watchers of this update? Boolean. Only relevant when modifying existing submissions that are set Public.
- Values: yes, no. Default: no. Required: No
- replace - File ID of the file on this submission that you want to replace. Also used when just sending a replacement thumbnail for an existing file. Only relevant when modifying existing submissions, so a Submission ID must be set in the property "submission_id".
- Values: (File ID). Default: n/a. Required: No
- uploadedfile[filenumber] - HTML FORM array of files to upload. Multiple files for one existing or new submission are allowed. Even when sending one file, it MUST be in array format. So the "name" of the FILE element in the upload form should be "uploadedfile[]" (note the square brackets).
- Values: (HTML FORM Files array). Default: n/a. Required: No
- uploadedthumbnail[filenumber] - HTML FORM array of thumbnail to upload. Only ONE thumbnail can be sent at a time. Only for use when uploading ONE new or replacement file, or when replacing ONE thumbnail for an existing file (property "replace" set to the File ID to replace). Even when sending one file, it MUST be in array format. So the "name" of the FILE element in the upload form should be "uploadedthumbnail[]" (note the square brackets).
- Values: (HTML FORM Files array). Default: n/a. Required: No
- zipfile - HTML FORM file to upload. Only ONE zip file may be sent at a time. The files in the zip file must be in the acceptable formats, sizes, etc as required by Inkbunny. Zip Files cannot exceed the maximum upload size which is 300MB. The files will be added as ONE new submission with multiple pages, or as extra pages to one existing submission, if a Submission ID is given in the property "submission_id".
- Values: (HTML FORM File). Default: n/a. Required: No
Response
- sid - Session ID for the current session.
- submission_id - Submission ID of the Submission that was modified or created.
Upload Progress
URL: (https|http)://inkbunny.net/api_progress.php
This script tracks upload and processing progress based on a unique ID key known as a "progress key". The progress key is set when files are sent with the Upload interface.
If a progress key is set for an upload, then this script MUST be queried at regular intervals, no less frequently that the upload timeout which is 10 seconds. This is used to assist user's canceling large multi file uploads part way through the processing stage. To cancel the upload, simply stop querying this script with the chosen progress key. You can also set the property "cancel" to "yes" before stopping the regular queries, which will cause the upload to cancel before the end of the current timeout period.
Note: Because no Session ID or sensitive user data is transmitted, this script can be accessed via both HTTP and HTTPS.
Parameters
Required
- progress_key - A unique key used to track upload progress, as specified by the "progress_key" parameter in the Upload interface.
- Values: (Progress Key). Default: n/a. Required: Yes
Optional
- cancel - Cancel the current upload. Boolean.
- Values: yes, no. Default: no. Required: No
Response
The following values relate to the upload portion of the upload process, while the files are being received from the client.
- status - An array containing the upload Status for the Transfer only. Array values are as follows:
- total - The total size of the file
- current - The amount of the file received so far
- rate - The upload speed in bytes per second (may not be available)
- filename - The name of the file
- name - The name of the variable
- cancel_upload - Whether the upload has been cancelled (1) or not (0)
- done - Whether the upload is complete (1) or not (0)
The following values relate to the processing portion of the upload process, once the files have all been received from the client.
- filescount - Total number of files being worked on.
- filescompletecount - Total number of files completed and added to the system.
- curfilename - Name of the file currently being processed.
- lastuserresponse_epoch_secs - Last time api_progress.php was queried for data on this progress_key. Returns the time in number of seconds since the Epoch.
- usercancelled - Has the user canceled this upload? Boolean. Returns "yes" for true, "no" or empty for false.
Delete Submission
URL: https://inkbunny.net/api_delsubmission.php
This script deletes the selected submission. All files, comments and other data will no longer be accessible. If the submission was available for sale as a Digital Download, then the purchased versions will still be accessible by the buyers on their Bookshelf.
Parameters
Required
- sid - Current valid Session ID.
- Values: (session ID). Default: n/a. Required: Yes
- submission_id - Submission ID of the submission to delete.
- Values: (Submission ID). Default: n/a. Required: Yes
Optional
- output_mode - Set output response to XML or JSON format.
- Values: json, xml. Default: json. Required: No
Response
- submission_id - Submission ID of the submission that was just deleted.
Delete File from Submission
URL: https://inkbunny.net/api_delfile.php
This script deletes the selected files from a submission.
Parameters
Required
- sid - Current valid Session ID.
- Values: (session ID). Default: n/a. Required: Yes
- file_id - File ID of the file to delete.
- Values: (File ID). Default: n/a. Required: Yes
Optional
- output_mode - Set output response to XML or JSON format.
- Values: json, xml. Default: json. Required: No
Response
- submission_id - Submission ID of the submission from which the file was just deleted.
- file_id - File ID of the file that was just deleted.
Reorder Files within Submission
URL: https://inkbunny.net/api_reorderfile.php
This script changes the order of files within a submission.
Parameters
Required
- sid - Current valid Session ID.
- Values: (session ID). Default: n/a. Required: Yes
- file_id - File ID of the file to delete.
- Values: (File ID). Default: n/a. Required: Yes
- newpos - The new index of the file. Order index starts counting from 0 (the first page/file). Index/order numbers for surrounding files are automatically updated. This number relates directly to the file order listed in the "submission_file_order" returned in the "files" array by the Submission Details interface.
- Values: (Index/order number). Default: n/a. Required: Yes
Optional
- output_mode - Set output response to XML or JSON format.
- Values: json, xml. Default: json. Required: No
Response
- submission_id - Submission ID of the submission which the file belongs to.
- file_id - File ID of the file that was just reordered.
- newpos - New submission_file_order position of the file. Should correspond to the "newpos" property that was sent if the move was successful.
Edit Submission Details
URL: https://inkbunny.net/api_editsubmission.php
This script edits the details of a submission, such as description, keywords, Public status, etc.
Parameters
Required
- sid - Current valid Session ID.
- Values: (session ID). Default: n/a. Required: Yes
- submission_id - Submission ID of the submission to edit.
- Values: (Submission ID). Default: n/a. Required: Yes
Optional
Note: For all these parameters, there is no default. If the parameter is not sent, then no update is made for it on the submission. If they are sent as empty strings then that will be treated as an update for that parameter.
- title - Submission title.
- Values: (Title text). Default: n/a. Required: No
- desc - Submission description. This field accepts Inkbunny BBCode.
- Values: (Description text). Default: n/a. Required: No
- story - Story text, which appears in the Story Reader in the HTML UI and is saved to the "Story" field of the submission. This text is auto-filled from the first file added to the submission if it is a DOC or TXT format document. It is is never auto-filled or updated again, even if the file is updated. RTF format is not used for auto-fill because of issues with decoding UTF-8 and other character sets. This field accepts Inkbunny BBCode.
- Values: (Story text). Default: n/a. Required: No
- convert_html_entities - Should html entities (eg: > Ӓ) in uploaded text (title, desc, story) be converted to normal characters before being saved? Boolean.
- Note: By default, html entities will be treated as plain text and will not be converted back to regular characters for display on the Inkbunny website. Eg: If you upload the text as part of a title, it will display literally as on the web page. If your uploaded text is likely to contain html entities then always set this option to "yes".
- Values: yes,no. Default: no. Required: No
- type - Submission type. Available types are:
- 1 - Picture/Pinup
- 2 - Sketch
- 3 - Picture Series
- 4 - Comic
- 5 - Portfolio
- 6 - Shockwave/Flash - Animation
- 7 - Shockwave/Flash - Interactive
- 8 - Video - Feature Length
- 9 - Video - Animation/3D/CGI
- 10 - Music - Single Track
- 11 - Music - Album
- 12 - Writing - Document
- 13 - Character Sheet
- 14 - Photography - Fursuit/Sculpture/Jewelry/etc
- Values: (Submission Type ID). Default: n/a. Required: No
- scraps - Should this submission appear in the owner's "Scraps" gallery? Boolean.
- Values: yes,no. Default: n/a. Required: No
- use_twitter - Announce this submission via the owner's Twitter account, if configured and enabled. If this property is set to "yes", then the announcement occurs the first time the submission is set Public. Note that announcement via Twitter only occurs if the owner's Twitter account is authenticated via their account settings at https://inkbunny.net/account.php, they have "Tweet Submissions" turned on in their account settings, and "use_twitter" is enabled for this submission. Boolean.
- Values: yes,no. Default: n/a. Required: No
- twitter_image_pref - Lets you choose if you want to send an image along in the tweet announcing the submission. Available Options are:
- 0 - Send only Text
- 1 - Send the Thumbnail (if a custom thumbnail was added, it will send that one. If not, the generated one)
- 2 - Send the Full Picture (it will send a proportional, 920px-wide version of the full picture)
- Values: (Twitter Image Preference ID). Default: set on upload to current user preference, which defaults to 1. Required: No
- visibility - Change Public/Non-Public status of the submission. Possible states are:
- "yes" - Set submission Public. Notifies watchers if it is the first time the submission has been set public.
- "yes_nowatch" - Set submission Public but DO NOT notify watchers.
- "no" - Set the submission Non-Public. Only the owner and moderators will be able to see the submission. Submissions can be set Non-Public even if they have previously been set Public.
- Values: yes,yes_nowatch,no. Default: n/a. Required: No
- keywords - Keywords for this submission. Keyword entries must be separated by commas or spaces. Keywords with spaces in them (eg: Roger Rabbit) should be joined with an underscore (eg: Roger_Rabbit). When adding new keywords, all the old keywords must be specified here too. The entry here entirely REPLACES the existing keywords list for this submission. Sending the keywords variable but leaving its value blank will REMOVE all keywords from this submission. To avoid clearing the keywords when updating a submission, simply do not send the keywords property and the existing keywords will be preserved.
- Values: (Keywords as text). Default: n/a. Required: No
- tag[2] - Boolean. Assign content tag/rating: "Nudity - Nonsexual nudity exposing breasts or genitals (must not show arousal)". Tags assigned to submissions by moderators are "locked" and cannot be changed by regular users.
- Values: yes, no. Default: no. Required: No.
- tag[3] - Boolean. Assign content tag/rating: "Violence - Mild violence". Tags assigned to submissions by moderators are "locked" and cannot be changed by regular users.
- Values: yes, no. Default: no. Required: No.
- tag[4] - Boolean. Assign content tag/rating: "Sexual Themes - Erotic imagery, sexual activity or arousal". Tags assigned to submissions by moderators are "locked" and cannot be changed by regular users.
- Values: yes, no. Default: no. Required: No.
- tag[5] - Boolean. Assign content tag/rating: "Strong Violence - Strong violence, blood, serious injury or death". Tags assigned to submissions by moderators are "locked" and cannot be changed by regular users.
- Values: yes, no. Default: no. Required: No.
- Note: By default, when no tag is set as "yes", the rating will automatically be set as General.
- guest_block - Boolean. Block guests from accessing this submission? Guests are users who have not signed up to Inkbunny and are viewing the site without an account.
- Values: yes, no. Default: no. Required: No.
- friends_only - Boolean. Allow only friends to view the submission. Friends are users who have submitted a Friend Request to your account that you have accepted.
- Values: yes, no. Default: no. Required: No.
- output_mode - Set output response to XML or JSON format.
- Values: json, xml. Default: json. Required: No
Response
- submission_id - Submission ID of the submission that was edited.
- twitter_authentication_success - true/false. If the "use_twitter" property is set to "yes", the owner's Twitter authentication details are checked. The check will show "true" here if it succeeds, and "false" if it fails. Note that announcement via Twitter only occurs if the owner's Twitter account is authenticated via their account settings at https://inkbunny.net/account.php, they have "Tweet Submissions" turned on in their account settings, and "use_twitter" is enabled for this submission.
Keyword Autocomplete
URL: https://inkbunny.net/api_search_autosuggest.php
This script suggests keywords based on partial keyword names entered by the user. It searches the start of keywords for the matching strings. It returns multiple matching suggestions as well as a count of the number of submissions each suggestion would find.
Notes and Example Requests
- The HTML response header will contain a directive for your client to cache the result data for 1 day, if it supports caching.
- All results are returned with HTML entities encoded. Eg: & will appear as &, > will appear as >, etc.
- All suggestions are returned ordered first by how many submissions they are assigned to (most commonly used first) and then alphabetically when that number is the same.
- Entering “hu” will search for keywords starting with "hu" and return an array of suggestions like “husky, human, hug, huge, humor, hunter” etc. Eg: https://inkbunny.net/api_search_autosuggest.php?keyword=hu&ratingsmask=11111&output_mode=xml
- Entering multiple words will search for words matching the last word, then matching the last two words, and so on. So entering “my li” will first search for all matches for “li” (lion, little, lizard...) and then all matches for “my li” (my little pony). This is similar to the keyword suggestion method Google uses and is most suitable for search boxes where users are likely to be entering multiple words. Eg: https://inkbunny.net/api_search_autosuggest.php?keyword=my+li&ratingsmask=11111&output_mode=xml
- To force the search to treat a set of words as one keyword only, they must be joined with underscores and the “underscorespaces” parameter must be set to yes. Eg: “my_li” will then only return a result for “my little pony”. https://inkbunny.net/api_search_autosuggest.php?keyword=my_li&underscorespaces=yes&ratingsmask=11111&output_mode=xml
- Keywords are filtered roughly by user ratings settings. So keywords that generally appear on mature/adult rated images will be hidden from users who have those higher ratings turned off. You must send the user ratings selection (see “ratingsmask” parameter below) or the default “G rated only” will be used. Eg: https://inkbunny.net/api_search_autosuggest.php?keyword=hu&ratingsmask=11100&output_mode=xml
- This API interface is compatible with the AJAX Autosuggest JS script by Timothy Groves at http://www.brandspankingnew.net/specials/ajax_autosuggest/ajax_autosuggest_autocomplete.html
- For a heavily modified version we customised for use on Inkbunny, check out any Inkbunny page that does Autocomplete (like the Search page) and look for the bsn.AutoSuggest_c_2.0_IBcustom.*.js file in the source. As with the original, you may download our version and use it freely.
Parameters
Required
- keyword – Partial or complete keyword or keywords as a string, separated by spaces. Multi-word keywords can be joined by underscores but parameter “underscorespaces” must be set to “yes”. Matches are always made with the start of keywords in the database and cannot be used to search for keywords 'containing' the search term in positions other than the start.
- Values: (Keyword text). Default: n/a. Required: Yes
- ratingsmask – Binary string representation of the users Allowed Ratings choice. The bits are in this order left-to-right:
- General – must always be set
- Mature – Nudity
- Mature – Violence
- Adult – Sex
- Adult – Strong Violence
- Eg: A string 11100 means only keywords rated General, Nudity and Violence are allowed, but Sex and Strong Violence are blocked. A string 11111 means keywords of any rating would be shown. Only 'left-most significant bits' need to be sent. So 11010 and 1101 are the same, and 10000 and 1 are the same.
- Values: (Binary string of ratings choice). Default: 1. Required: Yes
Optional
- underscorespaces – Use underscores in input and output to join multi-word keywords together. This would normally only be used when editing keywords for a submission and is not very natural for a user typing out a quick search string.
- Values: yes, no. Default: no. Required: No
- output_mode - Set output response to XML or JSON format.
- Values: json, xml. Default: json. Required: No
Response
- results[suggestion] - Array of keyword suggestions returned. In XML mode, each submission is wrapped in a “suggestion” tag. Suggestions are ordered first by how many submissions they are assigned to (most commonly used first) and then alphabetically when that number is the same. Note: All results are returned with HTML entities encoded. Eg: & will appear as &, > will appear as >, etc.
- Elements for each submission entry follow:
- id - Keyword ID of the suggested keyword.
- value – The user input with the partial keyword replaced by the suggested keyword.
- icon – Not applicable to this usage (empty string).
- info – Not applicable to this usage (empty string).
- singleword – The single keyword being suggested.
- searchterm – They keyword identified in the user input being used to generate this suggestion.
- submissions_count – The number of submissions this keyword is assigned to.
Username Autocomplete
URL: https://inkbunny.net/api_username_autosuggest.php
This script suggests full user names based on partial user names. It will return multiple usernames starting with the the string, if any are present.
Notes and Example Requests
- The HTML response header will contain a directive for your client to cache the result data for 1 day, if it supports caching.
- Results are returned ordered by active accounts first (sorted alphabetically) then inactive accounts (sorted alphabetically). Active accounts are defined as any with activity in the last 30 days, with a preference for those with user icons. This is to ensure the most likely useful names appear at the top of the list (old accounts or those without icons are less likely to be of interest).
- A maximum limit is set on the number of results returned. At the time of writing this note, the limit was 300 results per request.
- All results are returned with HTML entities encoded. Eg: & will appear as &, > will appear as >, etc.
- A minimum of 3 characters must be sent or the search will return no results.
- Assuming the search type is set to "any" (see search type parameter below) then searching for “fre” will return an array of suggestions like “alfred, manfred, killfree, freda, fred, frederick, freeman” etc. Eg: https://inkbunny.net/api_username_autosuggest.php?username=fre&searchmode=any&output_mode=xml
- Only single search terms can be sent. It does not allow multiple search words.
- This API interface is compatible with the AJAX Autosuggest JS script by Timothy Groves at http://www.brandspankingnew.net/specials/ajax_autosuggest/ajax_autosuggest_autocomplete.html
- For a heavily modified version we customised for use on Inkbunny, check out any Inkbunny page that does Autocomplete (like the Search page) and look for the bsn.AutoSuggest_c_2.0_IBcustom.*.js file in the source. As with the original, you may download our version and use it freely.
Parameters
Required
- username – Partial or complete username as a string.
- Values: (Username text). Default: n/a. Required: Yes
Optional
- output_mode - Set output response to XML or JSON format.
- Values: json, xml. Default: json. Required: No
- searchtype - Choose between searching "start" of username for search string (default) or searching "any" part of username for string.
- Values: start, any. Default: start. Required: No
Response
- results[suggestion] - Array of user name suggestions returned. In XML mode, each user name suggestion is wrapped in a “suggestion” tag. Suggestions are ordered alphabetically. Note: All results are returned with HTML entities encoded. Eg: & will appear as &, > will appear as >, etc.
- Elements for each submission entry follow:
- id - User ID of the suggested user.
- value – The user input with the partial username replaced by the suggested username.
- icon – Path and file name of user icon (if account has a user icon set). Note that this is a relative path like "27/27014_fred.jpg". You need to prepend the full location to the start of this string get the icon size you want. Eg: "/usericons/tiny/27/27014_fred.jpg" for tiny icon 20x20px, "/usericons/small/27/27014_fred.jpg" for small icon 50x50px, "/usericons/large/27/27014_fred.jpg" for large icon 100x100px.
- info – Additional information about the selection (usually blank).
- singleword – The single username being suggested.
- searchterm – They keyword identified in the user input being used to generate this suggestion.
User Watchlist
URL: https://inkbunny.net/api_watchlist.php
This script returns the usernames and user ids of accounts being watched by the logged in user.
Parameters
Required
- sid - Current valid Session ID.
- Values: (session ID). Default: n/a. Required: Yes
Optional
- output_mode - Set output response to XML or JSON format.
- Values: json, xml. Default: json. Required: No
- orderby - How to sort results.
- Possible options are:
- alphabetical – Sort alphabetically.
- create_datetime – Sort by date account was watched (newest first).
- Values: alphabetical, create_datetime. Default: create_datetime. Required: No
- Possible options are:
- limit - integer. Limit number of results. Omit this parameter or leave it blank to return all possible results.
- Values: (integer). Default: (null). Required: No
Response
- sid - Session ID for the current session.
- results_count - Number of watch entries returned.
- watches[watch] - Array of watches returned. In XML mode, each submission is wrapped in a “watch” tag.
- Elements for each watch entry follow:
- user_id - User ID of the account being watched.
- username - Username of the account being watched.