Skip to content
Mo McRoberts edited this page Jan 25, 2018 · 3 revisions

Introduction

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.

Contents

Locate an item by identifier

  1. Ensure the identifier is encoded as a URI (for example, ISBNs should be expressed as urn:isbn: URIs).
  2. Pass the URI as the uri query parameter to the root, taking care to URI-encode the parameter value correctly.

Request

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

Responses

Success

HTTP/1.0 303 See other
Location: /427cf01d1215477489dee6091de16e65#id
Content-Length: 0

Item not found

This response is returned when the knowledge graph does not contain any information relating to the requested item:

HTTP/1.1 404 Not found

Bad request errors

In the event of a bad request error, a 4xx HTTP response (other than 404 Not found) will be returned.

Server-side errors

In the event of a server-side error, a 5xx HTTP response will be returned.