Loan In Service RESTful APIs - Release v0.5.2
Brief Description
Assumptions
For a complete list of assumptions, visit the Service Description and Assumptions page.
REST-based API
The Loan In Service offers a REST-based Application Programming Interface (API) to CRUD (create, read, update, and delete) operations on individual Loan In instances, plus list operations on multiple Loan In instances. These follow the Common model for CollectionSpace REST services.
Loan In CRUD+L services
Create an Loan In
Creates a new Loan In record. Assigns a unique, service-specified /wiki/spaces/collectionspace/pages/666274321 to that Loan In record. Follows standard Create model. See the documentation of the Loan In schema, below. Example:
POST /cspace-services/loansin HTTP/1.1
Read an Loan In
Reads an existing Loan In record, specified by its /wiki/spaces/collectionspace/pages/666274321. Follows standard Read model. See the documentation of the Loan In schema, below. Example:
GET /cspace-services/loansin/{id} HTTP/1.1
Update an Loan In
Updates an existing Loan In record, specified by its /wiki/spaces/collectionspace/pages/666274321. Follows standard Update model. See the documentation of the Loan In schema, below. Example:
PUT /cspace-services/loansin/{id} HTTP/1.1
Delete an Loan In
Deletes an existing Loan In record, specified by its /wiki/spaces/collectionspace/pages/666274321. Follows standard Delete model. Example:
DELETE /cspace-services/loansin/{id} HTTP/1.1
List Loan In instances
Lists existing Loan In records, with summary information for each. Follows standard List model. See the documentation of the Loan In list schema, below. Example:
GET /cspace-services/loansin/ HTTP/1.1
Verify whether the Loan In service supports pagination of list results, and if so, add relevant documentation here regarding same.
Loan In REST payload schemas
Loan In instance schema
The schemas below are severely abbreviated, and are thus illustrative. For a full list of the fields that may potentially be present in payloads when creating, updating, or reading individual Loan In records, please see the Loan In record schema for release 0.5.2.
Create and Update should use the following schema:
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <ns2:loansin-common xmlns:ns2="http://services.collectionspace.org/loanin"> <loanInNumber>LI2010.05</loanInNumber> <lenders> <lender>urn:cspace:org.collectionspace.demo:personauthority:name(TestPersonAuth):person:name(Harry Lender)'Harry Lender'</lender> <lender>urn:cspace:org.collectionspace.demo:personauthority:name(TestPersonAuth):person:name(Sally Lender)'Sally Lender'</lender> </lenders> <loanReturnDate>2011-09-23</loanReturnDate> <loanPurpose>To record content from Hellenistic Babylonian legal texts (cuneiform tablets), in conjunction with ongoing research effort.</loanPurpose> ... </ns2:loansin-common>
Read will return the following schema:
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <ns2:loansin_common xmlns:ns2="http://collectionspace.org/services/loanin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://collectionspace.org/services/loanin http://services.collectionspace.org/loanin/loansin_common.xsd"> <loanInNumber>LI2010.05</loanInNumber> <lenders> <lender>urn:cspace:org.collectionspace.demo:personauthority:name(TestPersonAuth):person:name(Harry Lender)'Harry Lender'</lender> <lender>urn:cspace:org.collectionspace.demo:personauthority:name(TestPersonAuth):person:name(Sally Lender)'Sally Lender'</lender> </lenders> <loanReturnDate>2011-09-23</loanReturnDate> <loanPurpose>To record content from Hellenistic Babylonian legal texts (cuneiform tablets), in conjunction with ongoing research effort.</loanPurpose> ... </ns2:loansin-common>
Loan In list schema
List (and variants) will return the following schema. This schema includes the uri and csid fields to help facilitate access to individual records:
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <ns2:loansin-common-list xmlns:ns2="http://collectionspace.org/services/loanin"> <loanin-list-item> <loanInNumber>LI2010.05</loanInNumber> <loanReturnDate>2011-09-23</loanReturnDate> <uri>/loansin/b59d0c6f-08f2-4fb5-b5f7</uri> <csid>b59d0c6f-08f2-4fb5-b5f7</csid> </loanin-list-item> .... </ns2:loansin-common-list>