Refer to User-Records in the docs/ folder. Refer to Implications in the docs/ folder. Typically it's better to generate the API-key on the site and store it in a file somewhere to be used in your project. Also, be aware of the security risks involved in sending your API key through an unencrypted channel. If you do not have an API key generated, you will receive a failed login, even if the details are correct. name=USERNAME_HERE& password=PASSWORD_HERE The required form headers parameters look like this for logging in: If you don't know what they are, check out POSTing-to-e621 in the docs/ folder. You must supply these parameters in your form headers even if you are sending a GET request. Some API actions (Mostly POSTs) will require you to have an e621 account and log in through the API to complete actions as yourself. The SSL handshake between CloudFlare and the e621 servers failed Unexpected server response which violates protocolĬloudFlare's attempt to connect to the e621 servers timed outĪ connection was established between CloudFlare and the e621 servers, but it timed out before an HTTP response was received Try again later or decrease your rate of requests. Server cannot currently handle the request or you have exceeded the request rate limit. Some unknown error occurred on the serverĪ gateway server received an invalid response from the e621 servers The resource is locked and cannot be modified May indicate that your request lacks a User-Agent header (see Notice #2 above). blip/index.json?callback=mycallbackfunctionĮ621 also uses standard HTTP responses as well as some custom responses, listed below. The resulting JSON will be encapsulated into a call to mycallbackfunction. To use JSONP, append &callback=mycallbackfunction to your request. Also, any additional parameters beyond the first must be separated with an &. Note: Parameters for GET requests must always use a ? to separate the URL from the parameters. This limits the response from e621 to 10 posts being returned. These change depending on the 'action' you are performing but the allow you to specify the type of data you are receiving from the API. Both JSON and XML are available but some endpoints are only available in one or the other. json part of the URL tells e621 that we want a JSON message returned, as opposed to XML. In this case the index action retrieves an index of posts.Īfter that, the. The next part of the URL index is considered the 'action'. Changing this to something like artist would make all artist endpoints available to us. If you've dealt with REST APIs before this should seem familiar, if not here's a breakdown: The base URL will always be, the next part of the URL post indicates the base endpoint we want to access. Any time you are retrieving data from the API you are using GET, any time your are giving the API information you are using POST.Į621 treats REST URLs as functions, so when you are GETting data, you pass your desired options after the base URL (separated by a ?). This is how you interact with the API, through REST URL endpoints. The e621 API uses the two main HTTP REST methods, GET and POST. #E621 sparkbox pdf#PDF versions of these docs here if you need them to be portable if you want to get more information on any specific endpoint, look in the docs/ folder of this repo. This documentation is derived from the official API documentation but presented in a different and more in-depth manor.Īny general information will be available on this page. The official documentation is available here, but it does not go very in depth on GET/POST endpoints and how they differ. If you're here, you know what this site is for. This is a repository for a better set of documentation for the site e621. The simplicity of the API means you can write scripts using JavaScript, Perl, Python, Ruby, even shell languages like bash or tcsh." The ability to parse JSON or XML responses is nice, but not critical. All you need is a way to GET and POST to URLs. "e621 offers a simple API to make scripting easy. You can also login with HTTP Basic Auth, which should be used instead of putting the login parameters in the URL of GET requests. The login parameters are now login for your username and api_key for the API key. When removing favorites/votes/etc posts, DELETE is used instead of POST. #E621 sparkbox Patch#When updating posts, PATCH is used instead of POST. The URLs, paths and returned fields have changed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |