Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Div
stylefont-weight:bold;font-size:1.2em;
Intake Service Home

Brief Description

Wiki Markup
{multi-excerpt-include:Intake Service Description and Assumptions|name=brief-description|nopanel=true}
For a full desciption, visit the Service Description and Assumptions page.

...

Wiki Markup
{multi-excerpt-include:Intake Service Description and Assumptions|name=brief-assumptions|nopanel=true}
For a complete list of assumptions, visit the Service Description and Assumptions page.

References

Object Entry Requirements
Intake Service Description and Assumptions
Intake Service Entity Diagrams

...

Send this HTTP request:

Code Block

GET /cspace-services/intakes/ HTTP/1.1

To do this via a web browser:

http://demo.collectionspace.org:8180/cspace-services/intakes/
Code Block

To do this via the 'curl' command-line utility:

Code Block

curl http://demo.collectionspace.org:8180/cspace-services/intakes/

Example: Success response

On success, a response with a "200 OK" HTTP status code, followed by a list containing summary information for each of the existing Intake records, if any, is returned:

Code Block

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: nnnn
...
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:intake-list> <intake-list-item> <uri>/default/abf52fbc-0471-4f3b-b1b1-c186bb79c44d</uri> <csid>abf52fbc-0471-4f3b-b1b1-c186bb79c44d</csid> </intake-list-item> <intake-list-item> <uri>/default/9eb9f43e-95fe-417b-aefc-a44d0f38d3cb</uri> <csid>9eb9f43e-95fe-417b-aefc-a44d0f38d3cb</csid> </intake-list-item> <intake-list-item> <uri>/default/78981343-12bb-4a55-ace7-fad6dd8280e0</uri> <csid>78981343-12bb-4a55-ace7-fad6dd8280e0</csid> </intake-list-item> <intake-list-item> <uri>/default/a368c2df-b7c5-47db-99ce-88f1367b7d33</uri> <csid>a368c2df-b7c5-47db-99ce-88f1367b7d33</csid> </intake-list-item> </ns2:intake-list>
Code Block
XML
XML

If no Intake records are found, a response with a "200 OK" HTTP status code, followed by an empty list, is returned:

Code Block

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: nnnn
...
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:intake-list xmlns:ns2="http://services.collectionspace.org/intake"/>
Code Block
XML
XML

Error Codes

To determine if an error occurred, check the HTTP Status Code that is returned in the response's HTTP headers. Any non 2xx status code represents an error condition.

...

Send this HTTP request:

POST /cspace-services/intakes HTTP/1.1 Content-Type: application/xml
Code Block

with an entity body containing a valid XML representation of a Intake; e.g.:

<?xml version="1.0" encoding="utf-8" standalone="yes"?> <ns2:intake xmlns:ns2="http://services.collectionspace.org/intake"> <currentOwner></currentOwner> <depositor></depositor> <depositorsRequirements></depositorsRequirements> <entryDate>updated-entryDate-1246391492901</entryDate> <entryMethod></entryMethod> <entryNote></entryNote> <entryNumber>updated-entryNumber-1246391492901</entryNumber> <entryReason></entryReason> <packingNote></packingNote> <returnDate></returnDate> </ns2:intake>
Code Block

To do this via the 'curl' command-line utility:

curl -X POST -H "Content-Type: application/xml" \ http://demo.collectionspace.org:8180/cspace-services/intakes/ -T - < {data}
Code Block

(The "-T -" parameter above specifies that the body of the request will come from standard input.)

Or, alternately:

curl -X POST -H "Content-Type: application/xml" \ http://demo.collectionspace.org:8180/cspace-services/intakes -T {filename or path to file containing data}
Code Block

(Note that in this alternate request using 'curl', there should not be a closing slash at the end of the name of the container to which the new Intake record is to be added; e.g. end your URL with "intakes', not "intakes/". That is because at least some versions of curl appear to append the name of the file being uploaded to the URL, following a closing slash.)

...

On success, a response with a "201 Created" HTTP status code is returned:

HTTP/1.1 201 Created Content-Type: application/xml Content-Length: nnnn ...
Code Block

Error Codes

To determine if an error occurred, check the HTTP Status Code that is returned in the response's HTTP headers. Any non 2xx status code represents an error condition.

...

Send this HTTP request:

Code Block

GET /cspace-services/intakes/{id} HTTP/1.1

To do this via a web browser:

Code Block
http://demo.collectionspace.org:8180/cspace-services/intakes/{id}

To do this via the 'curl' command-line utility:

Code Block

curl http://demo.collectionspace.org:8180/cspace-services/intakes/{id}

Where {id} is a CollectionSpace ID (csid), such as 59242af0-0463-4fb2-af0d-2467186c28480. To identify the ID of a specific document, List All Intakes or check the response from a request to Create a Intake.

...

On success, a response with a "200 OK" HTTP status code and a representation of the requested Intake record is returned:

HTTP/1.1 200 OK Content-Type: application/xml Content-Length: nnnn ...
Code Block
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:intake xmlns:ns2="http://services.collectionspace.org/intake"> <currentOwner>Ron McDonald</currentOwner> <depositor>Peter Wolf</depositor> <depositorsRequirements>Reserve ownership.</depositorsRequirements> <entryDate>12-02-2009</entryDate> <entryMethod>Manual</entryMethod> <entryNote>Needs restoration</entryNote> <entryNumber>1246391492901</entryNumber> <entryReason>None given</entryReason> <packingNote>None</packingNote> <returnDate>12-30-2009</returnDate> </ns2:intake>
Code Block
XML
XML

Error Codes

To determine if an error occurred, check the HTTP Status Code that is returned in the response's HTTP headers. Any non 2xx status code represents an error condition.

...

Send this HTTP request:

PUT /cspace-services/intakes/{id} HTTP/1.1 Content-Type:application/xml
Code Block

with an entity body containing a valid XML representation of a Intake; e.g.:

<?xml version="1.0" encoding="utf-8" standalone="yes"?> <ns2:intake xmlns:ns2="http://services.collectionspace.org/intake"> <currentOwner>Ron McDonald</currentOwner> <depositor>Peter Wolf</depositor> <depositorsRequirements>Reserve ownership.</depositorsRequirements> <entryDate>12-02-2009</entryDate> <entryMethod>Manual</entryMethod> <entryNote>Needs restoration</entryNote> <entryNumber>1246391492901</entryNumber> <entryReason>None given</entryReason> <packingNote>None</packingNote> <returnDate>12-30-2009</returnDate> </ns2:intake>
Code Block

To do this via the 'curl' command-line utility:

Code Block

curl -X PUT -H "Content-Type: application/xml" \
http://demo.collectionspace.org:8180/cspace-services/intakes/{id} -T - < {data}

(The "-T -" parameter above specifies that the body of the request will come from standard input.)

Or, alternately:

curl -X PUT -H "Content-Type: application/xml" \ http://demo.collectionspace.org:8180/cspace-services/intakes/{id} \ -T {filename or path to file containing data}
Code Block

Where {id} is a CollectionSpace ID (csid), such as 59242af0-0463-4fb2-af0d-2467186c28480. To identify the ID of a specific document, List All Intakes or check the response from a request to Create a Intake.

...

On success, a response with a "200 OK" HTTP status code and a representation of the updated Intake record is returned:

Code Block

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: nnnn
...
Code Block

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<ns2:intake xmlns:ns2="http://services.collectionspace.org/intake">
    <currentOwner>Ron McDonald</currentOwner>
    <depositor>Peter Wolf</depositor>
    <depositorsRequirements>Reserve ownership.</depositorsRequirements>
    <entryDate>12-02-2009</entryDate>
    <entryMethod>Manual</entryMethod>
    <entryNote>Needs restoration</entryNote>
    <entryNumber>1246391492901</entryNumber>
    <entryReason>None given</entryReason>
    <packingNote>None</packingNote>
    <returnDate>12-30-2009</returnDate>
</ns2:intake>

Error Codes

To determine if an error occurred, check the HTTP Status Code that is returned in the response's HTTP headers. Any non 2xx status code represents an error condition.

...

Send this HTTP request:

Code Block

DELETE /cspace-services/intakes/{id} HTTP/1.1

To do this via the 'curl' command-line utility:

curl -X DELETE http://demo.collectionspace.org:8180/cspace-services/intakes/{id}
Code Block

Where {id} is a CollectionSpace ID (csid), such as 59242af0-0463-4fb2-af0d-2467186c28480. To identify the ID of a specific document, List All Intakes or check the response from a request to Create a Intake.

...

On success, a response with a "200 OK" HTTP status code is returned:

HTTP/1.1 200 OK Content-Type: application/xml Content-Length: nnnn ...
Code Block

Error Codes

To determine if an error occurred, check the HTTP Status Code that is returned in the response's HTTP headers. Any non 2xx status code represents an error condition.

...