API Documentation
Werehouse's API allows programmatic access to certain areas of the application from other software. Currently, there is only one API endpoint available.
Authentication
Obtain an API key from your account page. You must supply this API key as a Bearer token in the Authorization HTTP header in your requests.
For example:
$ curl -sSLv -H "Authorization: Bearer api_AaAaAaAaAaAaAaAaAaAaAaAaAaAa" "https://werehouse.s0ph0s.dog/some_endpoint"The HTTP header should look like this:
Authorization: Bearer api_AaAaAaAaAaAaAaAaAaAaAaAaAaAaPOST /enqueue
This endpoint allows you to enqueue images or links in the queue for your account.
Parameters
link- A URL to add to your queue
or
image_b64- Image data encoded in base64 to add to your queuecontent_type- The MIMEContent-Typefor the image
Supported image types are:
image/jpegimage/pngimage/apngimage/gifimage/webp- Image decoding is not supported, so Werehouse will not be able to find duplicates via pHash or generate thumbnails. However, it can still search for sources.
Responses
200- The request was successful and the link or image has been enqueued.{ "ok": true }400- The request was not successful. See theerrorkey for an explanation.{ "error": "must provide link key or image_b64 and content_type keys" }
Example Usage
Enqueueing a link:
$ curl -sS \
--json '{"link":"https://www.furaffinity.net/view/1"}' \
-H "Authorization: Bearer api_AaAaAaAaAaAaAaAaAaAaAaAaAaAa" \
"https://werehouse.s0ph0s.dog/enqueue"
{"ok":true} Enqueueing an image:
$ curl -sS \
--json '{"image_b64":"/9j/4AAQSkZ…", "content_type": "image/jpeg"}' \
-H "Authorization: Bearer api_AaAaAaAaAaAaAaAaAaAaAaAaAaAa" \
"https://werehouse.s0ph0s.dog/enqueue"
{"error":"corrupt base64 data"}