Div | style |
---|---|
Wiki Markup | |
{div:style=font-weight:bold;font-size:1.2em; | }[Intake ServiceHome |
Brief Description
Home]{div} h3. Brief Description {excerpt-include |
...
:Intake Service Description and |
...
Assumptions|name=brief-description |
...
|nopanel |
...
=true |
...
} For a full description, visit the [Service Description and Assumptions|Intake Service Description and Assumptions] page. |
...
Assumptions
For a complete list of assumptions, visit the Service Description and Assumptions page.
References
Object Entry Requirements
Intake Stories
Intake Service Description and Assumptions
Intake Service Entity Diagrams
Intake Schema
REST-based API
The Intake Service offers a REST-based Application Programming Interface (API) to CRUD (create, read, update, and delete) operations on individual Intake instances, plus list operations on multiple Intake instances. These follow the Common model for CollectionSpace REST services.
Intake CRUD+L services
Create an Intake
Creates a new Intake record. Assigns a unique, service-specified CollectionSpace ID (CSID) to that Intake record. Follows standard Create model. See the documentation of the Intake schema, below. Example:
Code Block |
---|
h3. Assumptions
For a complete list of assumptions, visit the [Service Description and Assumptions|Intake Service Description and Assumptions] page.
h3. References
[Object Entry Requirements]
[Intake Stories]
[Intake Service Description and Assumptions]
[Intake Service Entity Diagrams]
[Intake Schema]
h1. REST-based API
The Intake Service offers a REST-based Application Programming Interface (API) to CRUD (create, read, update, and delete) operations on individual Intake instances, plus list operations on multiple Intake instances. These follow the [Common model for CollectionSpace REST services|Common Services REST API documentation].
* [Intake CRUD+L services|#Intake CRUD+L services]
* [Intake REST payload schemas|#Intake REST payload schemas]
h3. Intake CRUD+L services
h5. Create an Intake
Creates a new Intake record. Assigns a unique, service-specified [CollectionSpace ID (CSID)|CollectionSpace ID (CSID)] to that Intake record. Follows standard [Create|Common Services REST API documentation#Create an object/procedure/record instance] model. See the documentation of the Intake schema, below. Example:
{code}POST /cspace-services/intakes HTTP/1.1
|
Read an Intake
Reads an existing Intake record, specified by its CollectionSpace ID (CSID). Follows standard Read model. See the documentation of the Intake schema, below. Example:
Code Block |
---|
{code} h5. Read an Intake Reads an existing Intake record, specified by its [CollectionSpace ID (CSID)|CollectionSpace ID (CSID)]. Follows standard [Read|Common Services REST API documentation#Read an object/procedure/record instance] model. See the documentation of the Intake schema, below. Example: {code}GET /cspace-services/intakes/{id} HTTP/1.1 {code} h5. Update an Intake |
...
Updates an existing Intake record, specified by its [CollectionSpace ID (CSID)|CollectionSpace ID (CSID)]. Follows standard [Update|Common Services REST API documentation#Update an object/procedure/record instance] model. See the documentation of the Intake schema, below. Example: |
...
{code |
}PUT /cspace-services/intakes/{id} HTTP/1.1
|
Delete an Intake
Deletes an existing Intake record, specified by its CollectionSpace ID (CSID). Follows standard Delete model. Example:
Code Block |
---|
{code} h5. Delete an Intake Deletes an existing Intake record, specified by its [CollectionSpace ID (CSID)|CollectionSpace ID (CSID)]. Follows standard [Delete|Common Services REST API documentation#Delete an object/procedure/record instance] model. Example: {code}DELETE /cspace-services/intakes/{id} HTTP/1.1 |
List Intake instances
Lists existing Intake records, with summary information for each. Follows standard List model. See the documentation of the Intake list schema, below. Example:
Code Block |
---|
{code} h5. List Intake instances Lists existing Intake records, with summary information for each. Follows standard [List|collectionspace:Common Services REST API documentation#List All object/procedure/record instance] model. See the documentation of the Intake list schema, below. Example: {code} GET /cspace-services/intakes/ HTTP/1.1 |
Note |
---|
The Intake service does not currently support pagination of list results; restore relevant wording from version 10 of this document when that support is added. |
Intake REST payload schemas
Intake instance schema
Info |
---|
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 Intake records, please see the Intake record schema for release 0.5. |
Create and Update should use the following schema:
Code Block |
---|
{code} List supports query parameters for customizing list results, such as [pagination controls, query filters, and sorting options|collectionspace:Common Services REST API documentation#lists]. For example: {code } GET /cspace-services/intakes?pgSz=10 HTTP/1.1 {code } List also supports query parameters for [searching for matching records|collectionspace:Common Services REST API documentation#search], including keyword search. For example: {code } GET /cspace-services/intakes?kw=foo&pgSz=10 HTTP/1.1 {code } h3. Intake REST payload schemas h5. Intake instance schema {info}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 Intake records, please see [the Intake record schema for release 0.5|http://fisheye.collectionspace.org/browse/~raw,r=1442/collectionspace/src/services/trunk/services/intake/jaxb/src/main/resources/intakes-common.xsd].{info} Create and Update should use the following schema: {code}<?xml version="1.0" encoding="utf-8" standalone="yes"?> <ns2:intakes_common xmlns:ns2="http://collectionspace.org/services/intake" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://collectionspace.org/services/intake http://services.collectionspace.org/intake/intakes_common.xsd"> <entryNumber>IN2010.2</entryNumber> <depositor>urn:cspace:org.collectionspace.demo:personauthority:name(TestPersonAuth):person:name(Alfred L. Kroeber)'Alfred L. Kroeber'</depositor> ... </ns2:intakes_common> {code} Read will return the following schema: |
...
{code |
}<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<ns2:intakes_common xmlns:ns2="http://collectionspace.org/services/intake" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://collectionspace.org/services/intake http://services.collectionspace.org/intake/intakes_common.xsd">
<entryNumber>IN2010.2</entryNumber>
<depositor>urn:cspace:org.collectionspace.demo:personauthority:name(TestPersonAuth):person:name(Alfred L. Kroeber)'Alfred L. Kroeber'</depositor>
...
</ns2:intakes_common>
|
Intake schema
List (and variants) will return the following schema. This schema includes the uri and csid fields to help facilitate access to individual records:
Code Block |
---|
{code} h5. Intake schema List (and variants) will return the following schema. This schema includes the _uri_ and _csid_ fields to help facilitate access to individual records: {code}<?xml version="1.0" encoding="utf-8" standalone="yes"?> <ns2:intakes-common-list xmlns:ns2="http://collectionspace.org/services/intake"> <intake-list-item> <entryNumber>IN2010.2</entryNumber> <depositor>Alfred L. Kroeber</depositor> <uri>/intakes/b59d0c6f-08f2-4fb5-b5f7</uri> <csid>b59d0c6f-08f2-4fb5-b5f7</csid> </intake-list-item> .... </ns2:intakes-common-list> {code} |