skitter.fanfic.dev
Depending on which domain the service is accessed through, there may
or may not be a /skitter prefix to these endpoints.
-
/skitter/v0/status:Returns the status of the service. If everything is well
errshould be0andstatusshould be"ok". Ex:{"err":0,"pid":1539142,"status":"ok","tident":139839177664384} -
/skitter/v0/cache?q={URL}&apiKey={key}:Returns the most recent cached version of a URL if it is in the cache.Returns a
status 404response if no matching cache entry is found. -
/skitter/v0/crawl?q={URL}&apiKey={key}:Crawl a specific URL. It is an error to pass a URL that does not start with
https?://.
Endpoints with a non-optional apiKey parameter
require a valid apiKey to work. It is recommended
to pass the apiKey in the request body.
General Errors and Status Codes
In general, if a response has a negative err code
in a JSON body then there was an error issued by the API codebase. If
there is a positive err code in a JSON body, then
the error was issued by the application framework or web server and
the numeric value will match the HTTP status code.
-
status 200: Body is simply proxied body. A few informative headers starting withX-Weaver-are included to identify the cached request and actually queried URL. Upstream response headers are not included. -
status 400: Bad query, either missing theqquery param or it is not a supported URL. A JSON response body will be included. Ex:{"err":-1,"msg":"missing q param"}{"arg":"foo","err":-2,"msg":"URL is not ffn"} -
status 401: Unauthorized, ensure any required basic auth parameters are being passed. Ex:{"err":401,"msg":"Unauthorized","nginx":true} -
status 404: File Not Found, ensure the URL is a valid API endpoint. Ex:{"err":-404,"msg":"not found"} -
status 429: Too Many Requests; aRetry-Afterheader will be included with minimum integer number of seconds before the client should make another request. A JSON response body with the same field will be included. Ex:{"err":-429,"msg":"too many requests","retryAfter":5} -
status 500: Internal Server Error. Either weaver is misconfigured, or there's an outage somewhere in the pipeline (possibly all FR instances are busy or down).