Movement Service RESTful APIs - Release v0.7
Brief Description
Assumptions
For a complete list of assumptions, visit the Service Description and Assumptions page.
REST-based API
The Movement Service offers a REST-based Application Programming Interface (API) to CRUD (create, read, update, and delete) operations on individual Movement instances, plus list operations on multiple Movement instances. These follow the Common model for CollectionSpace REST services.
Movement CRUD+L services
Create an Movement
Creates a new Movement record. Assigns a unique, service-specified CollectionSpace ID (CSID) to that Movement record. Follows standard Create model. See the documentation of the Movement schema, below. Example:
POST /cspace-services/movements HTTP/1.1
Read an Movement
Reads an existing Movement record, specified by its CollectionSpace ID (CSID). Follows standard Read model. See the documentation of the Movement schema, below. Example:
GET /cspace-services/movements/{id} HTTP/1.1
Update an Movement
Updates an existing Movement record, specified by its CollectionSpace ID (CSID). Follows standard Update model. See the documentation of the Movement schema, below. Example:
PUT /cspace-services/movements/{id} HTTP/1.1
Delete an Movement
Deletes an existing Movement record, specified by its CollectionSpace ID (CSID). Follows standard Delete model. Example:
DELETE /cspace-services/movements/{id} HTTP/1.1
List Movement instances
Lists existing Movement records, with summary information for each. Follows standard List model. See the documentation of the Movement list schema, below. Example:
GET /cspace-services/movements HTTP/1.1
List supports query parameters for customizing list results, such as pagination controls, query filters, and sorting options. For example:
GET /cspace-services/movements?pgSz=10 HTTP/1.1
List also supports query parameters for searching for matching records, including keyword search. For example:
GET /cspace-services/movements?kw=foo&pgSz=10 HTTP/1.1
Movement REST payload schemas
Movement 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 Movement records, please see the Movement record schema for release 0.7.
Create and Update should use the following schema:
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <ns2:movements-common xmlns:ns2="http://services.collectionspace.org/movement"> <movementReferenceNumber>MV2010.56</movementReferenceNumber> <locationDate>2012-01-29</locationDate> ... </ns2:movements-common>
Read will return the following schema:
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <ns2:movements_common xmlns:ns2="http://collectionspace.org/services/movement" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://collectionspace.org/services/movement http://services.collectionspace.org/movement/movements_common.xsd"> <movementReferenceNumber>MV2010.56</movementReferenceNumber> <locationDate>2012-01-29</locationDate> ... </ns2:movements-common>
Movement 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:movements-common-list xmlns:ns2="http://collectionspace.org/services/movement"> <movement-list-item> <movementReferenceNumber>MV2010.56</movementReferenceNumber> <locationDate>2012-01-29</locationDate> <uri>/movements/b59d0c6f-08f2-4fb5-b5f7</uri> <csid>b59d0c6f-08f2-4fb5-b5f7</csid> </movement-list-item> .... </ns2:movements-common-list>