Send Requests
Use the following guidelines when sending requests using the REST API for Content Capture.
URL Structure
https://subdomain.domain.com[:port]/capture/api/version/resourcePath
Where:
-
subdomain.domain.com[:port]
- Host and port where Oracle Content Management is running. -
version
- Version of the REST API; for example:v1
. -
resource-path
- Relative path that defines the resource. For a complete list of resources, see "All Rest Endpoints" under Table of Contents.
Supported Methods
You can perform basic CRUD operations (create, read, update, and delete) on using standard HTTP method requests, as summarized in the following table:
HTTP Method | Description |
GET |
Get information about a document or attachments, or download content. |
POST |
Create attachments to documents. |
PUT |
Update or edit a document or attachment. |
DELETE |
Remove a document or attachment. |
Media Types
The media type application/json
is supported by the REST API for Content Capture.
A request must use the media type of application/json
. The simple example of updating a document is shown below.
PUT.../documents/42b81066-2c66-472a-b655-67cf99dc784a
{ "title": "A New Document Title", "profile": { "name": "A Different Profile" }, "stateToken": "d15e87f9db5c63a350f8a5307770f942" }
JSON Response:
{ "id": "42b81066-2c66-472a-b655-67cf99dc784a", "title": "Invoice1.tiff", "batch": { "id": "2", "name": "inv_253" }, "step": { "id": "06ed7cb1-6b1b-4828-b4ba-c8ab31a45903", "name": "Merging TIFF Files", "type": "TIFF Conversion Processor" }, "profile": { "id": "0a8a547f-a382-4935-819d-c1864afef9b4", "name": "A Different Profile" }, "stateToken": "7fca978ada4788b88b82d3acc463108c", "mediaType": "image/tiff", "sourceName": "Invoice1.tiff", "size": 305418, "fields": [{ "name": "Company Code", "dataType": "ALPHA_NUMERIC", "value": "" }, { "name": "Total Tax", "dataType": "FLOAT", "value": "" }, { "name": "Company Code", "dataType": "FLOAT", "value": "" }], "createdBy": { name: "ssvrint.mtadmin" }, "createdDate": "2021-01-19T20:05:14.126Z", "updatedBy": { name: "ssvrint.mtadmin" }, "updatedDate": "2021-01-19T20:05:14.126Z", "links": [{ "rel": "canonical", "href": "http://server.example.com/documents/42b81066-2c66-472a-b655-67cf99dc784a", "method": "GET", "mediaType": "application/json" }, { "rel": "urn:oce:capture:document-content", "href": "http://server.example.com/documents/42b81066-2c66-472a-b655-67cf99dc784a/content", "method": "GET", "mediaType": "image/tiff" }] }
Common Request Headers
The following table lists some common request headers.
Header | Description | Example |
---|---|---|
Accept | The media type that you prefer for the response body. |
|
Authorization | How to validate the user. See Authorization. |
|
Content-Length | The size of the request body in bytes. | 540 |
Content-Type | The media type of the request body. This header is required for Note that unless an operation specifies otherwise, the media type for a request body is |
application/json |
Accept-Language | Set the language to be used for any error messages that are returned. This will not change the language of any text in a valid response. | fr |