This is an old revision of the document!


Full-text Content Requests

DRAFT

This page documents the methods to access full-text content of Zotero items via the Zotero Server API. See the Read Requests page for basic information on accessing the API, including possible HTTP status codes not listed here.

Getting new full-text content

GET <userOrGroupPrefix>/fulltext?newer=<version>

<itemKey> should correspond to an existing attachment item. <version> should be the Last-Modified-Version returned from the previous check, or 0 if none.

Content-Type: application/json
Last-Modified-Version: <library version>
{
    "<itemKey>": <version>,
    "<itemKey>": <version>,
    "<itemKey>": <version>
}

For each item with a full-text content version greater than stored locally, get the item's full-text content, as described below.

Common responses
200 OK Full-text content was successfully retrieved.
400 Bad Request The 'newer' parameter was not provided.

Getting an item's full-text content

GET <userOrGroupPrefix>/items/<itemKey>/fulltext

<itemKey> should correspond to an existing attachment item.

Content-Type: text/plain; charset=UTF-8
Last-Modified-Version: <version of item's full-text content>

<UTF-8—encoded full-text content>
Common responses
200 OK Full-text content was found for the given item.
404 Not Found The item wasn't found, or no full-text content was found for the given item.

Setting an item's full-text content

PUT <userOrGroupPrefix>/items/<itemKey>/fulltext
Content-Type: text/plain

<UTF-8—encoded full-text content>

<itemKey> should correspond to an existing attachment item. The request body should contain the raw UTF-8–encoded full-text content.

Common responses
204 No Content The item's full-text content was updated.
404 Not Found The item wasn't found or was not an attachment.
dev/web_api/v2/fulltext_content.1383081218.txt.gz · Last modified: 2013/10/29 17:13 by dstillman