Add Book API

Bug #516937 reported by Anand Chitipothu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Open Library
New
Wishlist
Anand Chitipothu

Bug Description

It will be nice to expose the add book process through an API. It should take title, author, publisher, publish_date and ISBN and return key of the existing edition or new edition. The API can optionally take work_key or author_key.

POST /books/add.json

{"title": "Building Scalable Web Sites", "author": "Cal Henderson", "publisher": "O'Reilly", "publish_date": 2006", "isbn": "0596102356"}

Possible Responses:

{"status": "found", "key": "/books/OL17867197M"}
{"status": "created", "key": "/books/OL17867197M"}
{"status": "ambiguous", "works": ["/works/OL1W", "/works/OL2W"]}
{"status": "error", "reason": "insufficient input"}

Providing this API will allow library hackers to add books to Open Library from various different sources with ease.

Tags: api
Changed in openlibrary:
assignee: nobody → Anand Chitipothu (anandology)
importance: Undecided → Wishlist
Revision history for this message
George (george-archive) wrote :

I LOVE IT. Particularly because of the "insufficient input" error.

Revision history for this message
George (george-archive) wrote :

IMO, we should consider protecting the ability to Add Records using the API with an API key. It will be useful for us to connect new additions with a key in case things go wrong.

Have we considered using API Keys in the past?

Revision history for this message
Anand Chitipothu (anandology) wrote : Re: [Bug 516937] Re: Add Book API

On 05-Feb-10, at 11:41 PM, George wrote:

> IMO, we should consider protecting the ability to Add Records using
> the
> API with an API key. It will be useful for us to connect new additions
> with a key in case things go wrong.
> Have we considered using API Keys in the past?

We are already protecting the write API with login and only registered
bots can use the write API. Marking a user as bot is a manual process
right now and I do it by setting a flag in the database.

We are already associating the change with the author who made the
change (bot in this case). What more will we get by using an API key?

tags: added: api
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.