Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Some REST API questions
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dan Stillman  
View profile  
 More options Mar 1 2011, 2:33 pm
From: Dan Stillman <dstill...@zotero.org>
Date: Tue, 01 Mar 2011 14:33:00 -0500
Subject: Re: Some REST API questions
On 3/1/11 1:37 PM, urschrei wrote:

> Hello.
> Having spent a day messing about the Zotero server REST API, and
> implementing some of the API methods in Python (https://github.com/
> urschrei/pyzotero), I have some questions regarding it (and its
> future, if anyone can comment):

> 1. Are there plans afoot to update the format of the returned Atom
> doc? At the moment, it works, but it's slightly awkward to work with;
> for example, the primary use case for the API (as I see it) is to
> retrieve a set of items, and work with their data (title, author,
> publisher&c.), but the format actually makes this more difficult than
> it ought to be, by returning some of that information within the
> 'content' field. It's pretty simple to grab some items and display
> their titles, but in order to display their authors (as opposed to the
> 'metadata' authors, I have to additionally parse an XHTML fragment. I
> understand that item data and metadata must be separate, but this
> seems unnecessarily convoluted.

If you're already parsing the XML, what does it matter where it is in
the response? We're using Atom+XHTML so that any API URL works in a feed
reader as well, but the XHTML should be pretty trivial to parse.

> 2. Are there any plans afoot to offer the data in other formats. I was
> thinking specifically of JSON. I haven't yet checked to see whether a
> Zotero item can be completely mapped onto a JSON object (it's not easy
> to find even a documented Atom representation. Shouldn't it be on the
> same page as the REST API docs?), but again, it seems like an ideal
> choice for at least a subset of an item's data.

The write API which we're currently putting the finishing touches
on uses JSON, so item responses, at least, will be returnable as JSON
(i.e., content=json, as an alternative to the default content=html for
an XHTML 'content' block). We'll have to see if this makes sense for
other types of responses as well, but it's pretty easy to support if so.

Eventually the API will probably support returning items in various
bibliography formats at least BIBO RDF but that requires server-side
translation support, which is a little ways off.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.