Brief Description
Assumptions
References
Object Entry Requirements
Intake Service Description and Assumptions
Intake Service Entity Diagrams
REST-based API
The Intake Service offers a REST-based Application Programming Interface (API) to CRUD (create, read, update, and delete) operations on individual Intakes.
In this API, there is also an operation to retrieve a list with summary information about all Intake records. The IDs returned in that list can be used in the aforementioned CRUD operations.
List All Intakes
Description
Gets summary information about all Intake records. This includes the CollectionSpace ID (csid) of each intake, which can be included in the URIs of subsequent requests in order to read, update, or delete specific intake records.
Authentication
In Release 0.1, no authentication credentials are requested by the service.
The service currently performs its own internal authentication, using HTTP Basic authentication, to Nuxeo's REST-based API. This will change in subsequent service releases.
Arguments
This service call currently does not accept query parameters or other arguments.
Example: Request
Send this HTTP request:
To do this via a web browser:
To do this via the 'curl' command-line utility:
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:
If no Intake records are found, a response with a "200 OK" HTTP status code, followed by an empty list, is returned:
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.
Nearly every HTTP client library or framework will offer a call that allows you to easily examine the status code of the response. In 'curl', you can dump to a file the HTTP headers that you receive in a response, by adding the '-D {filename}' parameter to your request.
Create a Intake
Description
Creates a new Intake record. Assigns a unique, service-specified CollectionSpace ID (csid) to that Intake record.
Authentication
In Release 0.1, no authentication credentials are requested by the service.
The service currently performs its own internal authentication, using HTTP Basic authentication, to Nuxeo's REST-based API. This will change in subsequent service releases.
Arguments
This service call currently does not accept query parameters or other arguments.
Example: Request
Send this HTTP request:
with an entity body containing a valid XML representation of a Intake; e.g.:
To do this via the 'curl' command-line utility:
(The "-T -" parameter above specifies that the body of the request will come from standard input.)
Or, alternately:
(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.)
Where {data} or {filename or path to file containing data} is a valid XML representation of a Intake, provided via standard input or stored in a text file, respectively.
In both instances, the "-H "Content-Type: application/xml" is required; this adds a "Content-Type: application/xml" header line to the request headers.
Example: Success response
On success, a response with a "201 Created" HTTP status code is returned:
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.
Nearly every HTTP client library or framework will offer a call that allows you to easily examine the status code of the response. In 'curl', you can dump to a file the HTTP headers that you receive in a response, by adding the '-D {filename}' parameter to your request.
Read a Intake
Description
Gets (reads) information about a single Intake record, specified by its CollectionSpace ID (csid).
Authentication
In Release 0.1, no authentication credentials are requested by the service.
The service currently performs its own internal authentication, using HTTP Basic authentication, to Nuxeo's REST-based API. This will change in subsequent service releases.
Arguments
This service call currently does not accept query parameters or other arguments.
Example: Request
Send this HTTP request:
To do this via a web browser:
To do this via the 'curl' command-line utility:
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.
Example: Success response
On success, a response with a "200 OK" HTTP status code and a representation of the requested Intake record is returned:
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.
Nearly every HTTP client library or framework will offer a call that allows you to easily examine the status code of the response. In 'curl', you can dump to a file the HTTP headers that you receive in a response, by adding the '-D {filename}' parameter to your request.
As of 2009-04-14 19:42-700, this call, when used with a non-existent csid, currently returns an empty Intake record element with no child elements and a 200 OK status code, rather than a 404 Not Found status code.
Update a Intake
Description
Updates an individual Intake record, specified by its CollectionSpace ID (csid). Accepts a updated Intake record in the body of the request. Replaces the values of the existing Intake record's fields (elements) with any non-empty values provided in the updated Intake record. Empty fields in the updated Intake record are ignored.
Subsequent releases may provide more intelligent merging during updates, and/or more client control over how merges are performed.
Authentication
In Release 0.1, no authentication credentials are requested by the service.
The service currently performs its own internal authentication, using HTTP Basic authentication, to Nuxeo's REST-based API. This will change in subsequent service releases.
Arguments
This service call currently does not accept query parameters or other arguments.
Example: Request
Send this HTTP request:
with an entity body containing a valid XML representation of a Intake; e.g.:
To do this via the 'curl' command-line utility:
(The "-T -" parameter above specifies that the body of the request will come from standard input.)
Or, alternately:
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.
Where {data} or {filename or path to file containing data} is a valid XML representation of a Intake, provided via standard input or stored in a text file, respectively.
In both instances, the "-H "Content-Type: application/xml" is required; this adds a "Content-Type: application/xml" header line to the request headers.
Example: Success response
On success, a response with a "200 OK" HTTP status code and a representation of the updated Intake record is returned:
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.
Nearly every HTTP client library or framework will offer a call that allows you to easily examine the status code of the response. In 'curl', you can dump to a file the HTTP headers that you receive in a response, by adding the '-D {filename}' parameter to your request.
As of 2009-04-15 19:30-700, this call, when used with a csid that does not match that of any existing Intake record, returns a 200 OK status code. We'll need to verify whether this is desired behavior; it may be the case that a PUT to a non-existent csid does not actually create a new document, using Nuxeo's Restlet-based API.
Delete a Intake
Description
Deletes a single Intake record, specified by its CollectionSpace ID (csid).
Authentication
In Release 0.1, no authentication credentials are requested by the service.
The service currently performs its own internal authentication, using HTTP Basic authentication, to Nuxeo's REST-based API. This will change in subsequent service releases.
Arguments
This service call currently does not accept query parameters or other arguments.
Example: Request
Send this HTTP request:
To do this via the 'curl' command-line utility:
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.
Example: Success response
On success, a response with a "200 OK" HTTP status code is returned:
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.
Nearly every HTTP client library or framework will offer a call that allows you to easily examine the status code of the response. In 'curl', you can dump to a file the HTTP headers that you receive in a response, by adding the '-D {filename}' parameter to your request.
As of 2009-04-14 19:45-700, this call, when used with a non-existent csid, currently returns a 204 No Content status code, rather than a 404 Not Found status code.