Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Brief Description

For a full description, visit the Service Description and Assumptions page.

Assumptions

For a complete list of assumptions, visit the Service Description and Assumptions page.

References

Object Entry Requirements
CollectionObject Stories
CollectionObject Service Description and Assumptions
CollectionObject Service Entity Diagrams
CollectionObject Schema

REST-based API

The CollectionObject Service offers a REST-based Application Programming Interface (API) to CRUD (create, read, update, and delete) operations on individual CollectionObject instances, plus list operations on multiple CollectionObject instances. These follow the Common model for CollectionSpace REST services.

CollectionObject CRUD+L services

Create an CollectionObject

Creates a new CollectionObject record. Assigns a unique, service-specified CollectionSpace ID (CSID) to that CollectionObject record. Follows standard Create model. See the documentation of the CollectionObject schema, below. Example:

POST /cspace-services/collectionobjects HTTP/1.1
Read an CollectionObject

Reads an existing CollectionObject record, specified by its CollectionSpace ID (CSID). Follows standard Read model. See the documentation of the CollectionObject schema, below. Example:

GET /cspace-services/collectionobjects/{id} HTTP/1.1
Update an CollectionObject

Updates an existing CollectionObject record, specified by its CollectionSpace ID (CSID). Follows standard Update model. See the documentation of the CollectionObject schema, below. Example:

PUT /cspace-services/collectionobjects/{id} HTTP/1.1
Delete an CollectionObject

Deletes an existing CollectionObject record, specified by its CollectionSpace ID (CSID). Follows standard Delete model. Example:

DELETE /cspace-services/collectionobjects/{id} HTTP/1.1
List CollectionObject instances

Lists existing CollectionObject records, with summary information for each. Follows standard List model, with pagination support. See the documentation of the CollectionObject schema, below.

Aron to verify pagination support in CollectionObject service

CollectionObject supports the following common parameters for List results, pagination controls and query filters:

  • pgSz for page size
  • pgNum for page size

Examples:

GET /cspace-services/collectionobjects/ HTTP/1.1
GET /cspace-services/collectionobjects/?pgSz=10 HTTP/1.1

CollectionObject REST payload schemas

CollectionObject instance schema

Create and Update should use the following schema.

Aron to verify that this simpler, single namespace attribute works for create and update, and to replace with more full declaration if it does not

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<ns2:collectionobjects-common xmlns:ns2="http://services.collectionspace.org/collectionobject">
    <entryNumber>EV2010.2</entryNumber>
    <depositor>Alfred L. Kroeber</depositor>
    ...
</ns2:collectionobjects-common>

Read will return the above, plus additional fields (uri and csid) for access:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<ns2:collectionobjects_common xmlns:ns2="http://collectionspace.org/services/collectionobject" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://collectionspace.org/services/collectionobject http://services.collectionspace.org/collectionobject/collectionobjects_common.xsd">
  ...
  <uri>/collectionobjects/f0cf4c50-8f8a-4df0-869a</uri>
  <csid>f0cf4c50-8f8a-4df0-869a</csid>
</ns2:collectionobjects-common>
CollectionObject schema

List (and variants) will return the following schema.

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<ns2:collectionobjects-common-list xmlns:ns2="http://collectionspace.org/services/collectionobject">
  <collectionobject-list-item>
    <entryNumber>EV2010.2</entryNumber>
    <depositor>Alfred L. Kroeber</depositor>
    <uri>/collectionobjects/b59d0c6f-08f2-4fb5-b5f7</uri>
    <csid>b59d0c6f-08f2-4fb5-b5f7</csid>
  </collectionobject-list-item>
  ....
</ns2:collectionobjects-common-list>
  • No labels