188BET靠谱吗Zotero Web API Documentation

The page documents read requests available in the188BET靠谱吗Zotero Web API188BET靠谱吗, providing read-only access to online Zotero libraries.

Base URL

The baseURLfor allAPIrequests is

188BET靠谱吗https://api.zotero.org

All requests must use HTTPS.

API Versioning

Multiple versions of theAPIare available, and production code should always request a specific version.This page documentsAPIversion 3, which is currently the default and recommended version.

Clients can request a specific version in one of two ways:

  1. Via the 188BET靠谱吗Zotero-API-VersionHTTP header ( 188BET靠谱吗Zotero-API-Version: 3)
  2. Via the vquery parameter ( v=3)

Use of the188BET靠谱吗Zotero-API-Versionheader is recommended for production code.Thevparameter can be used for easier debugging and sharing ofAPIrequests or in clients that can't pass arbitrary HTTP headers.

TheAPIversion of a response will be returned in the188BET靠谱吗Zotero-API-Versionresponse header.

Version Transitions

At most times,APIchanges are made in a backwards-compatible manner.Occasionally, however, backwards-incompatible changes may need to be made.When this occurs, a newAPIversion will be made available without changing the default version for clients that don't request a specific version.After a transition period, the newAPIversion will become the default.If anAPIversion is discontinued, clients requesting the discontinued version will receive the oldest available version.Announcements regardingAPIversion transitions will always be made ahead of time on188BET靠谱吗zotero-dev.

Authentication

Authentication is not required for read access to public libraries.

Accessing non-public libraries requires use of anAPIkey.Third-party developers shoulduse OAuth to establish credentialsor instruct their users to create dedicated keys for use with their services.End users can createAPIkeys via188BET靠谱吗their Zotero account settings.

APIkeys can be included in requests in one of three ways:

  1. As an HTTP header in the form 188BET靠谱吗Zotero-API-Key: P9NiFoyLeZu2bZNvvuQPDWsd
  2. As an HTTP header in the form Authorization: Bearer P9NiFoyLeZu2bZNvvuQPDWsd
  3. As a URLquery parameter, in the form key=P9NiFoyLeZu2bZNvvuQPDWsd(not recommended)

Use of an HTTP header is recommended, as it allows use of URLs returned from theAPI(e.g., for pagination) without modification.

Authorization: Beareris also the authentication mechanism for OAuth 2.0.188BET靠谱吗While Zotero currently supports only OAuth 1.0a, when support for OAuth 2.0 is added, clients will no longer need to extract theAPIkey from the OAuth response and pass it to theAPIseparately.

Resources

User and Group Library URLs

Requests for data in a specific library begin with/users/ or金博宝世界杯体育赛事/groups/ , referred to below as .User IDs are different from usernames and can be found on theAPI Keyspage and in OAuth responses.Group IDs are different from group names and can be retrieved from/users/ 金博宝世界杯体育赛事/groups .

Collections

URI Description
/collections Collections in the library
/collections/top Top-level collections in the library
/collections/ A specific collection in the library
/collections/ /collections Subcollections within a specific collection in the library

Items

URI Description
/items All items in the library, excluding trashed items
/items/top Top-level items in the library, excluding trashed items
/items/trash Items in the trash
/items/ A specific item in the library
/items/ /children Child items under a specific item
/publications/items Items in My Publications
/collections/ /items Items within a specific collection in the library
/collections/ /items/top Top-level items within a specific collection in the library

Searches

(Note: Only search metadata is currently available, not search results.)

URI Description
/searches All saved searches in the library
/searches/ A specific saved search in the library

Tags

URI Description
/tags All tags in the library
/tags/ Tags of all types matching a specific name
/items/ /tags Tags associated with a specific item
/collections/ /tags Tags within a specific collection in the library
/items/tags All tags in the library, with the ability to filter based on the items
/items/top/tags Tags assigned to top-level items
/items/trash/tags Tags assigned to items in the trash
/collections/ /items/tags Tags assigned to items in a given collection
/collections/ /items/top/tags Tags assigned to top-level items in a given collection
/publications/items/tags Tags assigned to items in My Publications

Other URLs

URI Description
/keys/ The user id and privileges of the givenAPIkey.
Use theDELETEHTTP method to delete the key.This should generally be done only by a client that created the key originally usingOAuth.
/users/ 金博宝世界杯体育赛事/groups 金博宝世界杯体育赛事The set of groups the currentAPI金博宝世界杯体育赛事key has access to, including public groups the key owner belongs to even if the key doesn't have explicit permissions for them.

Read Requests

The following parameters affect the format of data returned from read requests.All parameters are optional.

General Parameters

The following parameters are valid for all read requests:

Parameter Values Default Description
format atom,bib,json,keys,versions,export format json(oratomif theAcceptheader includesapplication/atom+xml) atomwill return an Atom feed suitable for use in feed readers or feed-reading libraries.
bib, valid only for item requests, will return a formatted bibliography as XHTML.bibmode is currently limited to a maximum of 150 items.
jsonwill return a JSON array for multi-object requests and a single JSON object for single-object requests.
keys, valid for multi-object requests, will return a newline-separated list of object keys.keysmode has no default or maximum limit.
versions188BET靠谱吗, valid for multi-object collection, item, and search requests, will return a JSON object with Zotero object keys as keys and object versions as values.Likekeys,versionsmode has no default or maximum limit.
Export formats, valid only for item requests, produce output in the specified format.

Parameters for "format=json"

Parameter Values Default Description
include bib,citation,data,export format
Multiple formats can be specified by using a comma as the delimiter (include=data,bib).
data Formats to include in the response:
bib, valid only for item requests, will return a formatted reference for each item.
citation, valid only for item requests, will return a formatted citation for each item.
data(the default) will include all writeable fields in JSON format, suitable for modifying and sending back to theAPI.
Export formats, valid only for item requests, will return data in the specified format for each item.

Parameters for "format=atom"

Parameter Values Default Description
content bib,citation,html,json,export formats,none
Multiple formats can be specified by using a comma as the delimiter (content=json,bib).
html The format of the Atom response's node:
html(the default) will return an XHTML representation of each object, useful for display in feed readers and for parsing by XML tools.
json, currently valid only for item and collection requests, will return a JSON representation of all the item's fields.
bib, valid only for item requests, will return a formatted reference for each item.
citation, valid only for item requests, will return a formatted citation for each item.
Export formats, valid only for item requests, will return data in the specified format for each item.
If additional data is not required, usenoneto decrease the response size.
If multiple formats are requested, will contain multiple 188BET靠谱吗elements (in the //www.brodersterzo.com/ns/api namespace), each with azapi:typeattribute matching one of the specified content parameters.

Parameters for "format=bib", "include/content=bib", "include/content=citation"

Parameter Values Default Description
style string chicago-note-bibliography Citation style to use for formatted references.Can be either the file name (without the .csl extension) of one of the styles in the188BET靠谱吗Zotero Style Repository(e.g.,apa) or theURLof a remote CSL file.
linkwrap boolean 0 Set to1to return URLs and DOIs as links
locale string en-US Bibliography locale.See theavailable CSL locales.Note that some styles use a fixed locale and cannot be localized.

Note the difference betweenformat=bibandinclude=bib/content=bib.format=bibreturns a formatted bibliography as XHTML, sorted according to the rules of the selected style.include=bib(valid only forformat=json(the default format mode) andformat=atom) returns an individual formatted reference within the JSONdatablock or Atom block for each item, with the results or feed sorted according to the query parameters.format=bibprocesses the entire feed you are requesting without regard for any limit arguments, so it is generally a good idea to use it only with collections or tags.

Item Export Formats

The following bibliographic data formats can be used asformat,include, andcontentparameters for items requests:

Parameter Description
bibtex BibTeX
biblatex BibLaTeX
bookmarks Netscape Bookmark File Format
coins COinS
csljson Citation Style Language data format
csv CSV
mods MODS
refer Refer/BibIX
rdf_bibliontology Bibliographic OntologyRDF
rdf_dc Unqualified Dublin Core RDF
188BET靠谱吗rdf_zotero 188BET靠谱吗Zotero RDF
ris RIS
tei Text Encoding Initiative (TEI)
wikipedia Wikipedia Citation Templates

Searching

Search Parameters

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.
itemType search syntax null Item type search
q string null Quick search.Searches titles and individual creator fields by default.Use theqmodeparameter to change the mode.Currently supports phrase searching only.
since integer 0 Return only objects modified after the specified library version, returned in a previousLast-Modified-Versionheader.SeeSyncingfor more info.
tag search syntax null Tag search

Search Parameters (Items Endpoints)

Parameter Values Default Description
includeTrashed 0,1 0(except in/trash) Include items in the trash
qmode titleCreatorYear,everything titleCreatorYear Quick search mode.To include full-text content, useeverything.Searching of other fields will be possible in the future.

Search Parameters (Tags Endpoints)

Parameter Values Default Description
qmode contains,startsWith contains Quick search mode.To perform a left-bound search, usestartsWith.

Search Parameters (Tags-Within-Items Endpoints)

These parameters can be used to search against items when returning tags within items.In such cases, the main parameters (q,qmode,tag) apply to the tags themselves, as the primary objects of the request.

Parameter Values Default Description
itemQ string null Same asqin anitemsrequest
itemQMode contains,startsWith contains Same asqmodein anitemsrequest
itemTag search syntax null Same astagin anitemsrequest

Search Syntax

itemTypeandtagparameters support Boolean searches:

Examples:

  • itemType=book
  • itemType=book || journalArticle(OR)
  • itemType=-attachment(NOT)
  • tag=foo
  • tag=foo bar(tag with space)
  • tag=foo&tag=bar(AND)
  • tag=foo bar || bar(OR)
  • tag=-foo(NOT)
  • tag=\-foo(literal first-character hyphen)

Be sure toURL-encode search strings if required by your client or library.

Sorting and Pagination

Sorting and Pagination Parameters

The following parameters are valid only for multi-object read requests such as /items , with the exception offormat=bibrequests, which do not support sorting or pagination.

Parameter Values Default Description
sort dateAdded,dateModified,title,creator,itemType,date,publisher,publicationTitle,journalAbbreviation,language,accessDate,libraryCatalog,callNumber,rights,addedBy,numItems(tags) dateModified(dateAddedfor Atom) The name of the field by which entries are sorted
direction asc,desc varies bysort The sorting direction of the field specified in thesortparameter
limit integer 1-100* 25 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.

Total Results

Responses for multi-object read requests will include a custom HTTP header,Total-Results, that provides the total number of results matched by the request.The actual number of results provided in a given response will be no more than 100.

When the total number of results matched by a read request is greater than the current limit, theAPIwill include pagination links in the HTTPLinkheader.Possible values arerel=first,rel=prev,rel=next, andrel=last.For some requests, the header may also include arel=alternate188BET靠谱吗link for the relevant page on the Zotero website.

188BET靠谱吗GET https://api.zotero.org/users/12345/items?limit=30
Link:
        
         !rel="next",
         
          !rel="last",
          
           !rel="alternate"
          
         
        

(Newlines are inserted here for clarity.)

Caching

For efficient usage of theAPI, clients should make conditional GET requests whenever possible.Multi-object requests (e.g.,/users/1/items) return aLast-Modified-Versionheader with the current library version.If aIf-Modified-Since-Version: header is passed with a subsequent multi-object read request and data has not changed in the library since the specified version, theAPIwill return304 Not Modifiedinstead of200.(Single-object conditional requests are not currently supported, but will be supported in the future.)

While a conditional GET request that returns a304188BET靠谱吗should be fast, some clients may wish or need to perform additional caching on their own, using stored data for a period of time before making subsequent conditional requests to the ZoteroAPI.188BET靠谱吗This makes particular sense when the underlying Zotero data is known not to change frequently or when the data will be accessed frequently.188BET靠谱吗For example, a website that displayed a bibliography from a Zotero collection might cache the returned bibliography for an hour, after which time it would make another conditional request to the ZoteroAPI.If theAPIreturned a304, the website would continue to display the cached bibliography for another hour before retrying.188BET靠谱吗This would prevent the website from making a request to the ZoteroAPIevery time a user loaded a page.

188BET靠谱吗In addition to making conditional requests, clients downloading data for entire Zotero libraries should use?since=to request only objects that have changed since the last time data was downloaded.

SeeSyncingfor more information on library and object versioning.

Rate Limiting

[Not all rate limits are currently enforced, but clients should be prepared to handle them.]

188BET靠谱吗Clients accessing the ZoteroAPIshould be prepared to handle two forms of rate limiting: backoff requests and hard limiting.

If theAPIservers are overloaded, theAPImay include aBackoff: HTTP header in responses, indicating that the client should perform the minimum number of requests necessary to maintain data consistency and then refrain from making further requests for the number of seconds indicated.Backoffcan be included in any response, including successful ones.

If a client has made too many requests within a given time period or is making too many concurrent requests, theAPImay return429 Too Many Requestswith aRetry-After: header.Clients receiving a429should wait at least the number of seconds indicated in the header before making further requests.They should also reduce their overall request rate and/or concurrency to avoid repeatedly getting 429s, which may result in stricter throttling or temporary blocks.

Retry-Aftercan also be included with503 Service Unavailableresponses when the server is undergoing maintenance.

Example GET Requests and Responses

HTTP Status Codes

Successful GET requests will return a200 OKstatus code.

Conditional GET requestsmay return304 Not Modified.

For any read or write request, the server may return a400 Bad Request,404 Not Found, or405 Method Not Allowedfor an invalid request and500 Internal Server Erroror503 Service Unavailablefor a server-related issue.Authenticationerrors (e.g., invalidAPIkey or insufficient privileges) will return a403 Forbidden.

Passing anExpectheader, which is unsupported, will result in a417 Expectation Failedresponse.

Library/object versioningor188BET靠谱吗Zotero-Write-Tokenerrors will result in412 Precondition Failedor428 Precondition Required.

429 Too Many Requestsindicates that the client has beenrate-limited.

Additional API Documentation

Baidu
map