Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dev:web_api:v2:read_requests [2013/03/03 14:18] – [Example Requests and Responses] mronkkodev:web_api:v2:read_requests [2017/11/27 04:16] (current) – Remove Zotero 5 warning bwiernik
Line 1: Line 1:
 ====== Zotero Server Read Requests ====== ====== Zotero Server Read Requests ======
  
-**This is not currently the default [[read_requests#api_versioning|version]] of the Zotero API. Include the HTTP header ''Zotero-API-Version: 2'' to access this version.**+**This is version of the Zotero Web API. For new development, use [[:dev/web_api/v3/start|API version 3]].**
  
-The page documents read requests available in the [[start|Zotero Server API]], providing read-only access to online Zotero libraries.+The page documents read requests available in the [[start|Zotero Web API]], providing read-only access to online Zotero libraries.
  
 ===== Base URL ===== ===== Base URL =====
Line 15: Line 15:
 ===== API Versioning ===== ===== API Versioning =====
  
-**To use this version of the API, include the HTTP header ''Zotero-API-Version: 2'' with all requests.** The current default version is [[:dev/server_api/v1/|version 1]], which will be discontinued in the near future.+To use this version of the API, include the HTTP header ''Zotero-API-Version: 2'' with all requests. **The current default version is [[:dev/web_api/v3/|version 3]].**
  
 At most times, there is only one active API version, and changes are made in a backwards-compatible manner. On rare occasions, however, backwards-incompatible changes may need to be made. When this occurs, the new API version will first be made available via an HTTP header, ''Zotero-API-Version: <version>'', while all other clients continue to receive the old version. After a transition period, the new API version will become the default. At that point, the previous API version may be discontinued, with the new API version being returned even to clients requesting the previous version. Announcements regarding API version transitions will always be made ahead of time on [[https://groups.google.com/group/zotero-dev|zotero-dev]]. At most times, there is only one active API version, and changes are made in a backwards-compatible manner. On rare occasions, however, backwards-incompatible changes may need to be made. When this occurs, the new API version will first be made available via an HTTP header, ''Zotero-API-Version: <version>'', while all other clients continue to receive the old version. After a transition period, the new API version will become the default. At that point, the previous API version may be discontinued, with the new API version being returned even to clients requesting the previous version. Announcements regarding API version transitions will always be made ahead of time on [[https://groups.google.com/group/zotero-dev|zotero-dev]].
Line 65: Line 65:
 | newer | integer | 0 | Return only objects modified after the specified library verson. | | newer | integer | 0 | Return only objects modified after the specified library verson. |
 | key | string | null | If a valid API key is provided, the request will be processed with the identity of the key's owner and the authority granted to the key.| | key | string | null | If a valid API key is provided, the request will be processed with the identity of the key's owner and the authority granted to the key.|
 +
 ==== Search Parameters ==== ==== Search Parameters ====
  
 ^ Parameter ^ Values ^ Default ^ Description ^ ^ Parameter ^ Values ^ Default ^ Description ^
 | itemKey | string | null | A comma-separated list of item keys. Valid only for item requests. Up to 50 items can be specified in a single request. | | itemKey | string | null | A comma-separated list of item keys. Valid only for item requests. Up to 50 items can be specified in a single request. |
-| q | string | null | Field search. Currently searches titles and individual creator fields |+| q | string | null | Quick search. Searches titles and individual creator fields by default. Use the ''qmode'' parameter to change the mode. Currently supports phrase searching only. | 
 +| qmode | "titleCreatorYear", "everything" | "titleCreatorYear" | Quick search mode. To include full-text content in the search, use "everything". Searching of other fields will be possible in the future. |
 | itemType | [[#search_syntax|search syntax]] | null | Item type search | | itemType | [[#search_syntax|search syntax]] | null | Item type search |
 | tag | [[#search_syntax|search syntax]] | search syntax | Tag search | | tag | [[#search_syntax|search syntax]] | search syntax | Tag search |
Line 98: Line 100:
 | order | "dateAdded", "dateModified", "title", "creator", "type", "date", "publisher", "publicationTitle", "journalAbbreviation", "language", "accessDate", "libraryCatalog", "callNumber", "rights", "addedBy", "numItems" (tags) | dateAdded | The name of the field by which entries are ordered | | order | "dateAdded", "dateModified", "title", "creator", "type", "date", "publisher", "publicationTitle", "journalAbbreviation", "language", "accessDate", "libraryCatalog", "callNumber", "rights", "addedBy", "numItems" (tags) | dateAdded | The name of the field by which entries are ordered |
 | sort | "asc", "desc" | varies by "order"  | The sorting direction of the field specified in the ''order'' parameter | | sort | "asc", "desc" | varies by "order"  | The sorting direction of the field specified in the ''order'' parameter |
-| limit | integer 1-99* | 50* | The maximum number of results to return with a single request. Required for export formats. |+| limit | integer 1-100* | 50* | The maximum number of results to return with a single request. Required for export formats. |
 | start | integer | 0 | The index of the first result. Combine with the limit parameter to select a slice of the available results. | | start | integer | 0 | The index of the first result. Combine with the limit parameter to select a slice of the available results. |
  
Line 126: Line 128:
 ^ Parameter ^ Description ^ ^ Parameter ^ Description ^
 | bibtex | BibTeX | | bibtex | BibTeX |
-| bookmarks | Netscape Bookmark Format |+| bookmarks | Netscape Bookmark File Format |
 | coins | COinS | | coins | COinS |
 | csljson | [[https://github.com/citation-style-language/schema/blob/master/csl-data.json|Citation Style Language data format]] | | csljson | [[https://github.com/citation-style-language/schema/blob/master/csl-data.json|Citation Style Language data format]] |
Line 156: Line 158:
 ===== Example Requests and Responses ===== ===== Example Requests and Responses =====
  
-Several examples of Read API request URLs and their responses:+Several examples of read request URLs and their responses:
  
 ^ Atom feed - List of items in collection ^^ ^ Atom feed - List of items in collection ^^
Line 180: Line 182:
 | Response | https://gist.github.com/mronkko/77bc2413cce4c219f862 | | Response | https://gist.github.com/mronkko/77bc2413cce4c219f862 |
  
-These requests can be performed on the Unix command line+These requests can be performed from the command line:
  
 <code bash> <code bash>
-wget --no-check-certificate -O- --header="Zotero-API-Version: 2" "https://api.zotero.org/users/475425/collections/9KH9TNSJ/items?format=atom" +curl -H 'Zotero-API-Version: 2' 'https://api.zotero.org/users/475425/collections/9KH9TNSJ/items?format=atom' 
-wget --no-check-certificate -O- --header="Zotero-API-Version: 2" "https://api.zotero.org/users/475425/items/X42A7DEE?format=atom" +curl -H 'Zotero-API-Version: 2' 'https://api.zotero.org/users/475425/items/X42A7DEE?format=atom' 
-wget --no-check-certificate -O- --header="Zotero-API-Version: 2" "https://api.zotero.org/users/475425/items/X42A7DEE?format=atom&content=json,bib,html" +curl -H 'Zotero-API-Version: 2' 'https://api.zotero.org/users/475425/items/X42A7DEE?format=atom&content=json,bib,html' 
-wget --no-check-certificate -O- --header="Zotero-API-Version: 2" "https://api.zotero.org/users/475425/collections?format=atom" +curl -H 'Zotero-API-Version: 2' 'https://api.zotero.org/users/475425/collections?format=atom' 
-wget --no-check-certificate -O- --header="Zotero-API-Version: 2" "https://api.zotero.org/users/475425/collections/9KH9TNSJ/items?format=bib"+curl -H 'Zotero-API-Version: 2' 'https://api.zotero.org/users/475425/collections/9KH9TNSJ/items?format=bib'
 </code> </code>
 ===== Write Requests ===== ===== Write Requests =====
dev/web_api/v2/read_requests.1362338284.txt.gz · Last modified: 2013/03/03 14:18 by mronkko