Input/Output formats
Here you can find detailed information on input parameters required by JotURL API methods along with their output formats.
Input requests
Each JotURL API accepts that the parameters are passed through both the GET and POST HTTP methods.
GET example
HTTP query
https://api.joturl.com/a/v1/shorten?login={PUBLIC_KEY}&key={PRIVATE_KEY}&url=https%3A%2F%2Fwww.joturl.com%2F&alias=jot
related HTTP GET headers
GET /a/v1/shorten?login={PUBLIC_KEY}&key={PRIVATE_KEY}&url=https%3A%2F%2Fwww.joturl.com%2F&alias=jot HTTP/1.1 Host: api.joturl.com ...
Ouput formats
The JotURL API supports Cross Origin Resource Sharing (CORS) requests from any domain.
All JotURL APIs support four return formats: json, jsonp, xml, txt. Note that the txt (text) format may return only limited information. The default output format is format=json
that is also used when the parameter format
is invalid (e.g., format=jsonp
but no callback
parameter is specified).
Query examples and related responses:
query | response |
---|---|
format=json | {"status": {"code": 200, "text": "OK", "error": "", "rate": 89}, "result": {DATA}} |
format=jsonp&callback=clbfunc | clbfunc({"status": {"code": 200, "text": "OK", "error": "", "rate": 89}, "result": {DATA}}) |
format=jsonp | {"status": {"code": 500, "text": "MISSING callback", "error": "", "rate": 75}, "result": []} |
format=xml | <?xmlversion="1.0"encoding="UTF-8"?><response><status><code>200</code> <text>OK</text> <error></error> <rate>89</rate> </status> <result>{DATA}</result> </response> |
format=txt | status_code=200status_text=OKstatus_error=status_rate=89result={DATA} |
format=plain | {DATA} |
HTTP response headers
For each request the status code is equal to the HTTP response status that can be:
status | |||
---|---|---|---|
code | text | error | explanation |
200 | OK | successful request | |
403 | LIMIT EXCEEDED | details on the error if available | rate limit exceeded |
404 | NOT FOUND | details on the error if available | the query is well-formed but there is no available response |
500 | INVALID [PARAMETER] | details on the error if available | invalid parameter [PARAMETER] in the request |
INVALID METHOD [METHOD] | details on the error if available | invalid method [METHOD] | |
MISSING [ARGUMENT] | details on the error if available | the required argument [ARGUMENT] is missing in the request | |
503 | GENERIC ERROR | details on the error if available | an unknown/reserved error occurred or the service is temporarily unavailable |