LibraryResource Resource

GET /libraries

Returns all libraries optionally filtered by one or more available filtering options.

Request Parameters
name type description
libraryIds query a String holding one or more ids (separated by comma) for which corresponding libraries are to be returned.
territoryId query
Response Codes
code condition
200 Libraries were returned.
500 An error occured.
Response Body
media type data type description
application/xml;charset=utf-8 (custom) zero or more SerialLibrary.

Example

Request
GET /libraries
Content-Type: */*
Accept: application/xml;charset=utf-8

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/xml;charset=utf-8

                
...
                
              

POST /libraries

Creates a library. Regardless of the provided state of the fields id and updated, these fields will be automatically populated upon creation.

Request Body
media type data type description
application/xml MTLibrary (XML) the SerialLibrary which is to be created.
Response Codes
code condition
200 The library was created.
500 An error occured.
Response Body
media type data type description
application/xml;charset=utf-8 (custom) the created SerialLibrary.

Example

Request
POST /libraries
Content-Type: application/xml
Accept: application/xml;charset=utf-8

                
<library>
  <code>...</code>
  <country>...</country>
  <id>...</id>
  <name>...</name>
  <owner>
    <name>...</name>
    <id>...</id>
    <updated>...</updated>
  </owner>
  <status>...</status>
  <updated>...</updated>
</library>

                
              
Response
HTTP/1.1 200 OK
Content-Type: application/xml;charset=utf-8

                
...
                
              

DELETE /libraries/{libraryId}

Deletes a library.

Request Parameters
name type description
libraryId path a String holding an id which represents the library which is to be deleted.
Response Codes
code condition
204 The library was deleted.
404 The library does not exist.
500 An error occured.

Example

Request
DELETE /libraries/{libraryId}
Content-Type: */*

                
...
                
              
Response
HTTP/1.1 204 No Content

              

PUT /libraries/{libraryId}

Updates a library.

Request Parameters
name type description
libraryId path a String holding an id which represents the library which is to be updated.
Request Body
media type data type description
application/xml MTLibrary (XML) the SerialLibrary which is to be updated.
Response Codes
code condition
200 The library was updated.
400 The resource ID does not match the payload ID.
404 The library does not exist.
409 The library has been updated or deleted by another process.
500 An error occured.
Response Body
media type data type description
application/xml;charset=utf-8 (custom) the updated SerialLibrary.

Example

Request
PUT /libraries/{libraryId}
Content-Type: application/xml
Accept: application/xml;charset=utf-8

                
<library>
  <code>...</code>
  <country>...</country>
  <id>...</id>
  <name>...</name>
  <owner>
    <name>...</name>
    <id>...</id>
    <updated>...</updated>
  </owner>
  <status>...</status>
  <updated>...</updated>
</library>

                
              
Response
HTTP/1.1 200 OK
Content-Type: application/xml;charset=utf-8

                
...