-
Notifications
You must be signed in to change notification settings - Fork 6
Document REST Endpoint
Andy Jackson edited this page Feb 3, 2016
·
5 revisions
DDHAPT provides a REST endpoint for adding documents which should be used to update the database according to the crawl results. The HTTP request is defined as:
POST /documents
Content-Type: application/json
[
{
"target_id":<long>,
"wayback_timestamp":<String>,
"landing_page_url":<String>,
"document_url":<String>,
"filename":<String>,
"size":<long>
},
<further documents>
]
POST https://www.webarchive.org.uk/act-ddhapt/documents
Content-Type: application/json
[{
"target_id":1,
"wayback_timestamp":"20150303002015",
"landing_page_url":"http://www.thinknpc.org/publications/show-and-tell/",
"document_url":"http://www.thinknpc.org/publications/show-and-tell/show-and-tell_charities-polling-evidence-of-doing-good/?post-parent=13114",
"filename":"Show-and-tell_charities-polling-evidence-of-doing-good.pdf",
"size":94098
}]
- A watched target has its own id which isn't the same as the target id, but the server performs this lookup for you.
- There is a limit on the length of the posted JSON content which is currently 1MB.