-
Notifications
You must be signed in to change notification settings - Fork 6
API cookbook
Mo McRoberts edited this page Jan 25, 2018
·
3 revisions
This Wiki page contains Acropolis (specifically Patchwork API request examples). Its contents should be merged into Inside Acropolis.
All requests should be made via HTTP or HTTPS to the public API root, http://acropolis.org.uk/
.
Note that HTTPS headers not relevant to each specific kind of API call have been trimmed from requests and responses.
- Ensure the identifier is encoded as a URI (for example, ISBNs should be expressed as
urn:isbn:
URIs). - Pass the URI as the
uri
query parameter to the root, taking care to URI-encode the parameter value correctly.
For example, attempting to resolve the URI http://www.wikidata.org/entity/Q90
:
GET /?uri=http://www.wikidata.org/entity/Q90 HTTP/1.1
Host: acropolis.org.uk
HTTP/1.0 303 See other
Location: /427cf01d1215477489dee6091de16e65#id
Content-Length: 0
This response is returned when the knowledge graph does not contain any information relating to the requested item:
HTTP/1.1 404 Not found
In the event of a bad request error, a 4xx
HTTP response (other than 404 Not found
) will be returned.
In the event of a server-side error, a 5xx
HTTP response will be returned.