Collection Resource

URLs and Supported Requests

The Collection Resource supports two operations.

Operation Resource URL HTTP METHOD
Search http://worldcat.org/webservices/kb/rest/collections/search?q={query} GET
Read http://worldcat.org/webservices/kb/rest/collections/{Collection_ID} GET

Response Formats

Parameters

Parameter Required Description

alt

No

Alternate representation type. Alternative means of setting the representation type instead of the Accept header. Supported values include

  • xml - return a application/xml representation
  • json - return a application/json representation

Default value is xml

wskey

Yes

The client key for accessing this service

itemsPerPage

No

Maximum number of results to retrieve. Default value 10

q

No

Full-text query string.

startIndex

No

1-based index of the first result to be retrieved. Default value 1

orderBy

No

Expression for sorting a collection of results. The format is ?order-by= . Ascending / descending order is specified by appending “asc” or “desc”.

Examples:

  • /collection?order-by=title desc
  • /collection?order-by=relevancy

Default value "title asc", possible sorting criteria are: title, relevancy, holdings, preference, issn, isbn, oclcnum

title=Nature

No

title match (keyword)

title="Nature"

No

exact title match

title="Nature%"

No

starts with title match

search-type=

No

"atoz": atoz type of query, it must be used in combination with startswith title search, and the returned result will every title search in combination with "a,b,...z". For example, if Title query is "a%", the result shall include aa, ab,,.. query result.

"search": search only. Default: "search"

provider_uid=

No

Exact provider uid match

collection_uid=

No

Exact collection_uid match

callback=

No

JSON callback when the alt is json. This will be implemented when JSON serialization format is finalized.

institution_id

No This field must be supplied if the client is authorized to multiple institutions, otherwise the value is obtained from the WSKey

Collection Response Fields

The following table lists all the available response options - XML serialization is Atom based and JSON serialization is based on JAXB. Both XML and JSON serialization should use same attribute names defined below.

Field Description

totalResults

Total number of search results for the query (not necessarily all present in results feed)

startIndex

The 1-based index of the first result

itemsPerPage

The maximum number of items that appear in one page. This allows clients to generate direct links to subsequent pages.

Query

Echo the original request

link@rel=atoz/title=aa/length=##

Link to a-z list, the title field indicates the starting letter(s), and length is corresponding result size of each letter.

id

The id of the resource, it should take the URI format like http://worldcat.org/webservices/kb/rest/providers/NPG defined earlier. The ID value is important and must return the canonical format.

title

Provider and collection name, and entry title.

link@rel=self

Same value as id, just to be standard compliant

link@rel=alternate

URI for the HTML representation of the collection

link@rel=parent URI for the global collection this institution entry is built from
link@rel=enclosure URL to download KBART file for this collection

link@rel=via

Identifies a resource that is the source of the information in the link's context.

provider_uid

Identifier for a provider

provider_name

Name of the Provider

available_entries

Number of available entries in a collection

selected_entries

Number of selected entries in a collection

collection_uid

Identifier for a collection

owner_institution

The institution that has their holdings on the collection

source_institution

The institution that originally added the collection to the KB (6569 corresponds to OCLC)

collection_status

Status possible values are raw, copy, select, and empty.

open

 

 

A binary field that indicates whether the collection is available for other libraries to enable. 

 

 

Note: to determine if a collection is open access, see the property collection_type with a value set to "open access".

 

 

collection_type

Some basic attributes of a collection, possible values are: openaccess, browsable...

wcsync_enabled

Worldcat sync_enabled or not

ext

Internal extension defined by Knowledge Base

Example Requests

Returns collection with the ID NPG.journals:

GET http://worldcat.org/webservices/kb/rest/collections/NPG.journals

Search for collections with "Nature" in the name:

GET http://worldcat.org/webservices/kb/rest/collections/search?title=Nature

Returns collection NPG.journals:

GET http://worldcat.org/webservices/kb/rest/collections/NPG.journals

Returns 10537's subscription of NPG.journals collection:

GET http://worldcat.org/webservices/kb/rest/collections/search?institution_id=105357&collection_uid=NPG.journals

We are a worldwide library cooperative, owned, governed and sustained by members since 1967. Our public purpose is a statement of commitment to each other—that we will work together to improve access to the information held in libraries around the globe, and find ways to reduce costs for libraries through collaboration. Learn more »