Complete Document Processing in a Task Queue
/capture/api/v1.1/steps/{stepId}/tasks/documents/complete
This operation is used by external systems to identify to Capture that supplied documents have been processed. The processing of the task can either be successful or result in a failure, and the request body needs to identify that. Regardless, this indicates that the external system has completed processing of the document.
The request body is an array of document task results that have been completed.
If a document task result in the array fails to complete, other results in the array are not affected. However, the response will indicate an error with the status code of 422 Unprocessable Entity, and will contain an array of results, along with errors, that could not be completed.
Note: The OAuth token used in this request must represent an account that has been granted explict access to the step identified by stepId. It makes no difference if the account represents a Capture Administator or a Capture User.
Request
- application/json
-
stepId: string
The unique identifier of the processing step in Capture.
-
X-Requested-With: string
A header used to prevent Cross-Site Request Forgery (CSRF) attacks. The only supported value is XMLHttpRequest.
array
Document Task Results
This is an array of Document Task Result objects. Each object represent a document task to complete.
-
Array of:
object Document Task Result
Title:
Document Task Result
A Document Task Result is a document task that has completed processing. It can either be a successful completion or a failure completion.
The
taskNumber
is required. Thedocument
is required and must contain, at a mimimum thestateToken
attribute. It may also contain other attributes that are desired to be updated in the document. If the processing result is an error, it must contain a proper error detail.The
document
parameter of each task in the array is a document object and essentially patches the document with the attributes that are both present in the request body and updatable. A merge-patch media sub-type isn't used because the document object contains an array, and that would require the entire contents of the array to be in the request body. RFC 7386, which governs the merge-patch, provides no sematics in which to update elements an array. Even though a merge-patch isn't used, just the desired changes are required in the request body, and therefore, just the fields that are being updated need to be present. The updatable attributes of a document are:title
profile
fields
comment
An update to either the
title
orcomment
is a simple string change. An update to the docment profile (profile
) requires setting its value to a different document profile object. The object must contain either theid
attribute or thename
attribute, or it can contain both. Only one attribute is necessary because the names are unique in the procedure definition. To clear a current document profile, or any of the other attributes, its value in the document object must be set tonull
. Lastly, only those fields that are being set or changed, need to exist in thefields
array.The
document
parameter of each task in the array must contain, at a minimum, itsstateToken
. This is necessary to ensure the object is still the same that is being updated. ThestateToken
will be different if it was was already updated from the last time it was requested. This ensures there aren't concurrent updates, and prevents overwriting of data.If there was a failure during processing, the
error
attribute must contain the error that occurred in processing.
object
Document Task Result
A Document Task Result is a document task that has completed processing. It can either be a successful completion or a failure completion.
The taskNumber
is required. The document
is required and must contain, at a mimimum the stateToken
attribute.
It may also contain other attributes that are desired to be updated in the document. If the processing result is an error, it must contain a proper error detail.
The document
parameter of each task in the array is a document object and essentially
patches the document with the attributes that are both present in the request body and updatable.
A merge-patch media sub-type isn't used because the document object contains an array, and that
would require the entire contents of the array to be in the request body.
RFC 7386, which governs the merge-patch,
provides no sematics in which to update elements an array. Even though a merge-patch isn't used,
just the desired changes are required in the request body, and therefore, just the fields that are being
updated need to be present. The updatable attributes of a document are:
title
profile
fields
comment
An update to either the title
or comment
is a simple string change. An update to the
docment profile (profile
) requires setting its value to a different document profile object. The
object must contain either the id
attribute or the name
attribute, or it can contain both.
Only one attribute is necessary because the names are unique in the procedure definition. To clear a current document
profile, or any of the other attributes, its value in the document object must be set to null
. Lastly,
only those fields that are being set or changed, need to exist in the fields
array.
The document
parameter of each task in the array must contain, at a minimum, its stateToken
.
This is necessary to ensure the object is still the same that is being updated. The stateToken
will be
different if it was was already updated from the last time it was requested. This ensures there aren't concurrent updates,
and prevents overwriting of data.
If there was a failure during processing, the error
attribute must contain the error that occurred in processing.
-
document:
object document
This is the Document to be completed. It can contain attributes of the document that should be updated. At a minimum, it must contain the document's
stateToken
. -
error(optional):
object error
The is an Error Detail that describes any error that occurred during processing.
-
taskNumber:
integer(int64)
An incrementing number that is unique to the document and step task queue. This needs to be the same number that that provided by Content Capture in the
DocumentTask
obtained from the step task queue.
object
This is the Document to be completed. It can contain attributes of the document that should be updated.
At a minimum, it must contain the document's stateToken
.
-
object
Document
Title:
Document
A Document in Capture is a file combined with custom metadata fields. The metadata fields are defined in Capture procedures, and act as holders of information manged within Capture. A Document can also contain attachments. An Attachment is intended to augment the the Document, and there can be numerous attachments of varing types.
object
The is an Error Detail that describes any error that occurred during processing.
-
object
Error Detail
Title:
Error Detail
This represents an error in the system, and is the response object returned.
object
Document
A Document in Capture is a file combined with custom metadata fields. The metadata fields are defined in Capture procedures, and act as holders of information manged within Capture. A Document can also contain attachments. An Attachment is intended to augment the the Document, and there can be numerous attachments of varing types.
-
batch(optional):
object batch
The Capture Batch that contains this document.
-
comment(optional):
string
A general use comment of this document.
-
createdBy(optional):
object createdBy
The user that created the document.
-
createdDate(optional):
string(date-time)
This identifies when the document was created. The date/time in ISO-8601 Date Time format (
yyyy-MM-dd'T'HH:mm:ss.SSSZ
) UTC, governed by RFC 3339. -
fields(optional):
array fields
This is an array of all the field values available for this document.
-
id(optional):
string
The unique identifier of the document in Capture.
-
links(optional):
array links
HATEOS link to related resources and actions or actions on this resource. This will include at least a canonical related link to the resource.
-
mediaType(optional):
string
This represents the media type of the document. That is the two-part identifier for file formats and format contents transmitted on the Internet.
-
profile(optional):
object profile
The document profile that has been assigned to this document.
-
size(optional):
integer(int64)
The size, in bytes, of the document.
-
sourceName(optional):
string
The filename of the document when imported.
-
stateToken(optional):
string
A generated string value that represents a particular state of the document.
In general, it is used to allow modifications of the document to proceed. It is essentially saying ... modify this document if its current
stateToken
matches this value. If the values do not match, the modification is not permitted and the operation results in an error. -
step(optional):
object step
The current processing step, if any, this document is undergoing.
-
title(optional):
string
The title of the document. This is generally the filename used during document import.
-
updatedBy(optional):
object updatedBy
The last user that updated the document.
-
updatedDate(optional):
string(date-time)
This identifies when the last time the document was updated. The date/time in ISO-8601 Date Time format (
yyyy-MM-dd'T'HH:mm:ss.SSSZ
) UTC, governed by RFC 3339.
object
The Capture Batch that contains this document.
-
object
Capture Batch
Title:
Capture Batch
A collection of documents in Capture that represent a unit of work in a procedure.
object
The user that created the document.
-
object
User Information
Title:
User Information
This object contains information about a given user of Capture.
Models use this object to denote some relation between a user and some other object. For instance, a model of the API may define the attribute
updatedBy
that is a user object. This indicates it was last updated by that given user.
array
This is an array of all the field values available for this document.
-
Array of:
object Field Value
Title:
Field Value
A field value is a Capture metadata field that combines the basic field definition and an actual value.
array
HATEOS link to related resources and actions or actions on this resource. This will include at least a canonical related link to the resource.
-
Array of:
object HATEOAS Link
Title:
HATEOAS Link
This is a HATEOAS link and related metadata. If responses provide links (for example, a
self
link to the resource itself) the links provided will include one or more of the properties defined on this link structure.Internet Assigned Numbers Authority (IANA) maintains a registry of link relations for use in a HATEOAS link. These are well known relations and have specific meanings. If they are applicale in Capture, they are used. For instance, canonical is well known relation, and Capture does use it.
Capture does define its own link relations in certain cases because none of the registered relations provided the proper meaning. As defined in RFC for Web Linking (RFC 8288) the relation needs to be a URI. The following link relations are defined by Capture:
urn:oce:capture:document-content
- Represents the link used to obtain a document's contenturn:oce:capture:document-complete
- Represents the link used to complete processing a document in a Step task queueurn:oce:capture:attachment-content
- Represents the link used to obtain an attachment's content
object
The document profile that has been assigned to this document.
-
object
Document Profile
Title:
Document Profile
A Document Profile associates a collection of custom metadata fields defined in a Capture procedure with a document. Additionally, it can have associated attachment types.
These are used in Capture to help categorize and process documents. While a document profile does relate custom metadata fields and attachment types from the procedure to a document, it does not restrict metadata to just those fields or attachments to just those types. It they are used for display/management within the Capture Client.
object
The current processing step, if any, this document is undergoing.
-
object
Procedure Step
Title:
Procedure Step
A step in a procedure flow.
object
The last user that updated the document.
-
object
User Information
Title:
User Information
This object contains information about a given user of Capture.
Models use this object to denote some relation between a user and some other object. For instance, a model of the API may define the attribute
updatedBy
that is a user object. This indicates it was last updated by that given user.
object
Capture Batch
A collection of documents in Capture that represent a unit of work in a procedure.
-
createdBy(optional):
object createdBy
The user that created the batch.
-
createdDate(optional):
string(date-time)
This identifies when the batch was created. The date/time in ISO-8601 Date Time format (
yyyy-MM-dd'T'HH:mm:ss.SSSZ
) UTC, governed by RFC 3339. -
error(optional):
string
The current error message of the batch, if any.
If the batch is in the ERROR
state
, this will contain the error message detailing why the batch failed processing. This message will remain until the batch re-enters processing. -
id(optional):
string
The unique identifier of the batch.
-
links(optional):
array links
HATEOS link to related resources and actions or actions on this resource. This will include at least a canonical related link to the resource.
-
lock(optional):
object lock
If the batch is locked (by a user creating/editing the batch or if Capture is currently processing the batch), this object will contain information about the lock. The
state
of the batch determines if this object exists. -
name(optional):
string
The name given to the batch.
When Capture creates a batch, the name is some defined prefix and a sequence number. For example, inv_4781
-
notes(optional):
string
User supplied general notes associated with a batch.
-
priority(optional):
integer(int32)
Minimum Value:
0
Maximum Value:10
Default Value:0
A user specified priority of the batch.
This value is used prioritize the batch for a user's attention. Its used to filter and sort batches for viewing in the client.
-
procedure(optional):
object procedure
The Capture Procedure associated with this batch.
-
state(optional):
string
Default Value:
READY
The current state of the batch.
READY
- The standard resting state of a batch. It is available to be locked by a client.LOCKED
- The batch is locked by a client for editing, such as adding/removing documents and setting metadata field values.ERROR
- An error occurred during processing. It is available to be locked by a client for edits to correct processing errors.PROCESSING
- Capture is presently processing the batch. The batch is in one of the jobs defined in the Capture procedure.
-
status(optional):
string
The current status assigned to the batch.
The status values are defined in the procedure and can be assigned during batch creation, and during transitions between processing jobs.
-
updatedBy(optional):
object updatedBy
The last user that updated the batch. This can be the Capture system.
-
updatedDate(optional):
string(date-time)
This identifies when the last time the batch was updated. The date/time in ISO-8601 Date Time format (
yyyy-MM-dd'T'HH:mm:ss.SSSZ
) UTC, governed by RFC 3339.
object
The user that created the batch.
-
object
User Information
Title:
User Information
This object contains information about a given user of Capture.
Models use this object to denote some relation between a user and some other object. For instance, a model of the API may define the attribute
updatedBy
that is a user object. This indicates it was last updated by that given user.
array
HATEOS link to related resources and actions or actions on this resource. This will include at least a canonical related link to the resource.
-
Array of:
object HATEOAS Link
Title:
HATEOAS Link
This is a HATEOAS link and related metadata. If responses provide links (for example, a
self
link to the resource itself) the links provided will include one or more of the properties defined on this link structure.Internet Assigned Numbers Authority (IANA) maintains a registry of link relations for use in a HATEOAS link. These are well known relations and have specific meanings. If they are applicale in Capture, they are used. For instance, canonical is well known relation, and Capture does use it.
Capture does define its own link relations in certain cases because none of the registered relations provided the proper meaning. As defined in RFC for Web Linking (RFC 8288) the relation needs to be a URI. The following link relations are defined by Capture:
urn:oce:capture:document-content
- Represents the link used to obtain a document's contenturn:oce:capture:document-complete
- Represents the link used to complete processing a document in a Step task queueurn:oce:capture:attachment-content
- Represents the link used to obtain an attachment's content
object
If the batch is locked (by a user creating/editing the batch or if Capture is currently processing the batch), this object will
contain information about the lock. The state
of the batch determines if this object exists.
-
lockedBy(optional):
object lockedBy
If the batch is locked within a Capture Client instance, this attribute will contain the user that locked the batch.
-
lockedDate(optional):
string(date-time)
This identifies when the batch was locked. The date/time in ISO-8601 Date Time format (
yyyy-MM-dd'T'HH:mm:ss.SSSZ
) UTC, governed by RFC 3339. -
step(optional):
object step
If Capture is currently processing the batch, this object will contain current processing step the batch is undergoing.
-
workstation(optional):
string
If the batch is locked within a Capture Client instance, this attribute will contain the computer name where the Capture Client instance locked the batch.
object
The Capture Procedure associated with this batch.
-
object
Capture Procedure
Title:
Capture Procedure
A Capture Procedure defines metadata and procesing steps of a flow.
object
The last user that updated the batch. This can be the Capture system.
-
object
User Information
Title:
User Information
This object contains information about a given user of Capture.
Models use this object to denote some relation between a user and some other object. For instance, a model of the API may define the attribute
updatedBy
that is a user object. This indicates it was last updated by that given user.
object
User Information
This object contains information about a given user of Capture.
Models use this object to denote some relation between a user and some other object. For instance, a
model of the API may define the attribute updatedBy
that is a user object. This indicates it
was last updated by that given user.
-
name:
string
The user's name.
object
HATEOAS Link
This is a HATEOAS link and related metadata. If responses provide links
(for example, a self
link to the resource itself) the links provided will include one or more of the
properties defined on this link structure.
Internet Assigned Numbers Authority (IANA) maintains a registry of link relations for use in a HATEOAS link. These are well known relations and have specific meanings. If they are applicale in Capture, they are used. For instance, canonical is well known relation, and Capture does use it.
Capture does define its own link relations in certain cases because none of the registered relations provided the proper meaning. As defined in RFC for Web Linking (RFC 8288) the relation needs to be a URI. The following link relations are defined by Capture:
urn:oce:capture:document-content
- Represents the link used to obtain a document's contenturn:oce:capture:document-complete
- Represents the link used to complete processing a document in a Step task queueurn:oce:capture:attachment-content
- Represents the link used to obtain an attachment's content
- href(optional): string
-
mediaType(optional):
string
Default Value:
application/json
Media type, as defined by RFC 2046, describing the link target. The property can be assumed to be
application/json
if the property is not present. -
method(optional):
string
Default Value:
GET
HTTP method for requesting the target of the link.
Valid values are:
OPTIONS
- HTTP OPTIONSHEAD
- HTTP HEADGET
- HTTP GETPOST
- HTTP POSTPUT
- HTTP PUTPATCH
- HTTP PATCHDELETE
- HTTP DELETE
The property can be assumed to be
GET
if the property is not present. -
profile(optional):
string(uri)
Link to the metadata of the resource, such as JSON-schema, that describes the resource expected when dereferencing the target resource. If not available, this property will not be present.
-
rel(optional):
string
Name of the link relation that, in addition to the type property, can be used to retrieve link details.
-
templated(optional):
boolean
Default Value:
false
Boolean flag that specifies the
href
property is a URI or URI Template. The property can be assumed to befalse
if the property is not present.
object
If the batch is locked within a Capture Client instance, this attribute will contain the user that locked the batch.
-
object
User Information
Title:
User Information
This object contains information about a given user of Capture.
Models use this object to denote some relation between a user and some other object. For instance, a model of the API may define the attribute
updatedBy
that is a user object. This indicates it was last updated by that given user.
object
If Capture is currently processing the batch, this object will contain current processing step the batch is undergoing.
-
object
Procedure Step
Title:
Procedure Step
A step in a procedure flow.
object
Procedure Step
A step in a procedure flow.
-
id(optional):
string
The unique identifier of the step within the procedure.
-
name(optional):
string
The name given to the step when created. For instance, the name of the processing job or commit profile.
-
type(optional):
string
The type of step. Some example include: External Processor, TIFF Conversion Processor, Asset Lookup Processor, etc.
object
Capture Procedure
A Capture Procedure defines metadata and procesing steps of a flow.
-
id(optional):
string
The unique identifier of the procedure in Capture.
-
name(optional):
string
The name given to the procedure when created
object
Field Value
A field value is a Capture metadata field that combines the basic field definition and an actual value.
-
dataType(optional):
string
Default Value:
ALPHA_NUMERIC
The data type of the field. Capture supports the following six data types:
NUMERIC
- Integer based number valueALPHA_NUMERIC
- Any general text or string valueDATE
- A date/time value in the form of ISO-8601 Date Time format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
), as governed by RFC 3339FLOAT
- Floating point number valuesITEM_REFERENCE
- A pointer to a content item in Oracle Content ManagementASSET_REFERENCE
- A pointer to a digital asset in Oracle Content ManagementCATEGORY_REFERENCE
- A pointer to a taxonomy category in Oracle Content ManagementLANGUAGE
- A language code as defined by RFC 4647.
-
name(optional):
string
The name of the field.
-
value(optional):
string
The actual value of this metadata field as it pertains to the given Capture document.
Fields do not initially have values. They must be set. This is either done through a default value in the metadata field definition, user supplied in Capture Client, or some Capture processing job.
The fields in Capture do not have a concept of a null value. The fields either have a value or do not have a value. Blank means there is no value.
object
Document Profile
A Document Profile associates a collection of custom metadata fields defined in a Capture procedure with a document. Additionally, it can have associated attachment types.
These are used in Capture to help categorize and process documents. While a document profile does relate custom metadata fields and attachment types from the procedure to a document, it does not restrict metadata to just those fields or attachments to just those types. It they are used for display/management within the Capture Client.
-
id(optional):
string
The unique identifier of the document profile.
-
name(optional):
string
The name given to the document profile.
object
Error Detail
This represents an error in the system, and is the response object returned.
-
detail(optional):
string
Description specific to this occurrence of the problem. The human-readable, potentially multi-line, description the problem in more details.
-
instance(optional):
string(URI)
URI to the link that provides more detail about the error.
-
o:errorCode(optional):
string
Application error code, which is different from HTTP error code. This code should be used to check for specific errors, rather than comparing fields such as the
title
ordetail
. -
o:errorDetails(optional):
array Error Details
Title:
Error Details
-
o:errorPath(optional):
string
XPath or JSON path to indicate where the error occurs.
-
status(optional):
integer(int32)
Corresponding HTTP status code for the error.
-
title:
string
Short, human-readable summary of the problem. It is not advisable to use the title as a way of checking for specific errors, use the
o:errorCode
for this purpose. -
type:
string(URI)
Absolute URI that identifies the problem type. When this URI dereferenced, it should provide a human-readable summary of the problem, for example, as a HTML page.
array
Error Details
-
Array of:
object Error Detail
Title:
Error Detail
This represents an error in the system, and is the response object returned.
Response
- application/json
204 Response
No Content
400 Response
Bad Request
The request could not be processed because it contains missing or invalid information, such as a validation error on an input field or a missing required value. The response will be an Error Detail object.
403 Response
Forbidden
The request was valid and was understood, but the server is refusing action. This may be due to the account not having the necessary permissions for a resource, or attempting a prohibited action (e.g. creating a duplicate item where only one is allowed). The response will be an Error Detail object.
404 Response
Not Found
The request includes a resource URI that does not exist. The response will be an Error Detail object.
422 Response
Unprocessable Entity
The request was well-formed, but the server was unable to process the contained resources/instructions.
The response is an array of Document Task Error objects. There will be an entry in the array for each document task that failed to complete. It will be in ascending order by taskNumber of the Document Task Error object. Each Document Task Error in the array will contain an Error Detail object that provides details on the underlying cause.
array
Document Task Errors
This is an array of Document Task Error objects. Each object identifies a document that failed to complete.
-
Array of:
object Document Task Error
Title:
Document Task Error
A Document Task Error is a document that failed to be completed for some reason, which is identified by the error.
The Document object is the same object that part of the request body for the complete operation. The Error Detail object will contain information that identifies why the document task failed to complete.
object
Document Task Error
A Document Task Error is a document that failed to be completed for some reason, which is identified by the error.
The Document object is the same object that part of the request body for the complete operation. The Error Detail object will contain information that identifies why the document task failed to complete.
-
document:
object document
This is the Document object that was in the request body of the complete operation for this task.
-
error:
object error
The is the Error Detail that describes the reason the complete operation failed for this task.
-
taskNumber:
integer(int64)
That task number that failed to be completed. This needs to be the same number that that provided by Content Capture in the
DocumentTask
obtained from the step task queue.
object
This is the Document object that was in the request body of the complete operation for this task.
-
object
Document
Title:
Document
A Document in Capture is a file combined with custom metadata fields. The metadata fields are defined in Capture procedures, and act as holders of information manged within Capture. A Document can also contain attachments. An Attachment is intended to augment the the Document, and there can be numerous attachments of varing types.
object
The is the Error Detail that describes the reason the complete operation failed for this task.
-
object
Error Detail
Title:
Error Detail
This represents an error in the system, and is the response object returned.
object
Document
A Document in Capture is a file combined with custom metadata fields. The metadata fields are defined in Capture procedures, and act as holders of information manged within Capture. A Document can also contain attachments. An Attachment is intended to augment the the Document, and there can be numerous attachments of varing types.
-
batch(optional):
object batch
The Capture Batch that contains this document.
-
comment(optional):
string
A general use comment of this document.
-
createdBy(optional):
object createdBy
The user that created the document.
-
createdDate(optional):
string(date-time)
This identifies when the document was created. The date/time in ISO-8601 Date Time format (
yyyy-MM-dd'T'HH:mm:ss.SSSZ
) UTC, governed by RFC 3339. -
fields(optional):
array fields
This is an array of all the field values available for this document.
-
id(optional):
string
The unique identifier of the document in Capture.
-
links(optional):
array links
HATEOS link to related resources and actions or actions on this resource. This will include at least a canonical related link to the resource.
-
mediaType(optional):
string
This represents the media type of the document. That is the two-part identifier for file formats and format contents transmitted on the Internet.
-
profile(optional):
object profile
The document profile that has been assigned to this document.
-
size(optional):
integer(int64)
The size, in bytes, of the document.
-
sourceName(optional):
string
The filename of the document when imported.
-
stateToken(optional):
string
A generated string value that represents a particular state of the document.
In general, it is used to allow modifications of the document to proceed. It is essentially saying ... modify this document if its current
stateToken
matches this value. If the values do not match, the modification is not permitted and the operation results in an error. -
step(optional):
object step
The current processing step, if any, this document is undergoing.
-
title(optional):
string
The title of the document. This is generally the filename used during document import.
-
updatedBy(optional):
object updatedBy
The last user that updated the document.
-
updatedDate(optional):
string(date-time)
This identifies when the last time the document was updated. The date/time in ISO-8601 Date Time format (
yyyy-MM-dd'T'HH:mm:ss.SSSZ
) UTC, governed by RFC 3339.
object
The Capture Batch that contains this document.
-
object
Capture Batch
Title:
Capture Batch
A collection of documents in Capture that represent a unit of work in a procedure.
object
The user that created the document.
-
object
User Information
Title:
User Information
This object contains information about a given user of Capture.
Models use this object to denote some relation between a user and some other object. For instance, a model of the API may define the attribute
updatedBy
that is a user object. This indicates it was last updated by that given user.
array
This is an array of all the field values available for this document.
-
Array of:
object Field Value
Title:
Field Value
A field value is a Capture metadata field that combines the basic field definition and an actual value.
array
HATEOS link to related resources and actions or actions on this resource. This will include at least a canonical related link to the resource.
-
Array of:
object HATEOAS Link
Title:
HATEOAS Link
This is a HATEOAS link and related metadata. If responses provide links (for example, a
self
link to the resource itself) the links provided will include one or more of the properties defined on this link structure.Internet Assigned Numbers Authority (IANA) maintains a registry of link relations for use in a HATEOAS link. These are well known relations and have specific meanings. If they are applicale in Capture, they are used. For instance, canonical is well known relation, and Capture does use it.
Capture does define its own link relations in certain cases because none of the registered relations provided the proper meaning. As defined in RFC for Web Linking (RFC 8288) the relation needs to be a URI. The following link relations are defined by Capture:
urn:oce:capture:document-content
- Represents the link used to obtain a document's contenturn:oce:capture:document-complete
- Represents the link used to complete processing a document in a Step task queueurn:oce:capture:attachment-content
- Represents the link used to obtain an attachment's content
object
The document profile that has been assigned to this document.
-
object
Document Profile
Title:
Document Profile
A Document Profile associates a collection of custom metadata fields defined in a Capture procedure with a document. Additionally, it can have associated attachment types.
These are used in Capture to help categorize and process documents. While a document profile does relate custom metadata fields and attachment types from the procedure to a document, it does not restrict metadata to just those fields or attachments to just those types. It they are used for display/management within the Capture Client.
object
The current processing step, if any, this document is undergoing.
-
object
Procedure Step
Title:
Procedure Step
A step in a procedure flow.
object
The last user that updated the document.
-
object
User Information
Title:
User Information
This object contains information about a given user of Capture.
Models use this object to denote some relation between a user and some other object. For instance, a model of the API may define the attribute
updatedBy
that is a user object. This indicates it was last updated by that given user.
object
Capture Batch
A collection of documents in Capture that represent a unit of work in a procedure.
-
createdBy(optional):
object createdBy
The user that created the batch.
-
createdDate(optional):
string(date-time)
This identifies when the batch was created. The date/time in ISO-8601 Date Time format (
yyyy-MM-dd'T'HH:mm:ss.SSSZ
) UTC, governed by RFC 3339. -
error(optional):
string
The current error message of the batch, if any.
If the batch is in the ERROR
state
, this will contain the error message detailing why the batch failed processing. This message will remain until the batch re-enters processing. -
id(optional):
string
The unique identifier of the batch.
-
links(optional):
array links
HATEOS link to related resources and actions or actions on this resource. This will include at least a canonical related link to the resource.
-
lock(optional):
object lock
If the batch is locked (by a user creating/editing the batch or if Capture is currently processing the batch), this object will contain information about the lock. The
state
of the batch determines if this object exists. -
name(optional):
string
The name given to the batch.
When Capture creates a batch, the name is some defined prefix and a sequence number. For example, inv_4781
-
notes(optional):
string
User supplied general notes associated with a batch.
-
priority(optional):
integer(int32)
Minimum Value:
0
Maximum Value:10
Default Value:0
A user specified priority of the batch.
This value is used prioritize the batch for a user's attention. Its used to filter and sort batches for viewing in the client.
-
procedure(optional):
object procedure
The Capture Procedure associated with this batch.
-
state(optional):
string
Default Value:
READY
The current state of the batch.
READY
- The standard resting state of a batch. It is available to be locked by a client.LOCKED
- The batch is locked by a client for editing, such as adding/removing documents and setting metadata field values.ERROR
- An error occurred during processing. It is available to be locked by a client for edits to correct processing errors.PROCESSING
- Capture is presently processing the batch. The batch is in one of the jobs defined in the Capture procedure.
-
status(optional):
string
The current status assigned to the batch.
The status values are defined in the procedure and can be assigned during batch creation, and during transitions between processing jobs.
-
updatedBy(optional):
object updatedBy
The last user that updated the batch. This can be the Capture system.
-
updatedDate(optional):
string(date-time)
This identifies when the last time the batch was updated. The date/time in ISO-8601 Date Time format (
yyyy-MM-dd'T'HH:mm:ss.SSSZ
) UTC, governed by RFC 3339.
object
The user that created the batch.
-
object
User Information
Title:
User Information
This object contains information about a given user of Capture.
Models use this object to denote some relation between a user and some other object. For instance, a model of the API may define the attribute
updatedBy
that is a user object. This indicates it was last updated by that given user.
array
HATEOS link to related resources and actions or actions on this resource. This will include at least a canonical related link to the resource.
-
Array of:
object HATEOAS Link
Title:
HATEOAS Link
This is a HATEOAS link and related metadata. If responses provide links (for example, a
self
link to the resource itself) the links provided will include one or more of the properties defined on this link structure.Internet Assigned Numbers Authority (IANA) maintains a registry of link relations for use in a HATEOAS link. These are well known relations and have specific meanings. If they are applicale in Capture, they are used. For instance, canonical is well known relation, and Capture does use it.
Capture does define its own link relations in certain cases because none of the registered relations provided the proper meaning. As defined in RFC for Web Linking (RFC 8288) the relation needs to be a URI. The following link relations are defined by Capture:
urn:oce:capture:document-content
- Represents the link used to obtain a document's contenturn:oce:capture:document-complete
- Represents the link used to complete processing a document in a Step task queueurn:oce:capture:attachment-content
- Represents the link used to obtain an attachment's content
object
If the batch is locked (by a user creating/editing the batch or if Capture is currently processing the batch), this object will
contain information about the lock. The state
of the batch determines if this object exists.
-
lockedBy(optional):
object lockedBy
If the batch is locked within a Capture Client instance, this attribute will contain the user that locked the batch.
-
lockedDate(optional):
string(date-time)
This identifies when the batch was locked. The date/time in ISO-8601 Date Time format (
yyyy-MM-dd'T'HH:mm:ss.SSSZ
) UTC, governed by RFC 3339. -
step(optional):
object step
If Capture is currently processing the batch, this object will contain current processing step the batch is undergoing.
-
workstation(optional):
string
If the batch is locked within a Capture Client instance, this attribute will contain the computer name where the Capture Client instance locked the batch.
object
The Capture Procedure associated with this batch.
-
object
Capture Procedure
Title:
Capture Procedure
A Capture Procedure defines metadata and procesing steps of a flow.
object
The last user that updated the batch. This can be the Capture system.
-
object
User Information
Title:
User Information
This object contains information about a given user of Capture.
Models use this object to denote some relation between a user and some other object. For instance, a model of the API may define the attribute
updatedBy
that is a user object. This indicates it was last updated by that given user.
object
User Information
This object contains information about a given user of Capture.
Models use this object to denote some relation between a user and some other object. For instance, a
model of the API may define the attribute updatedBy
that is a user object. This indicates it
was last updated by that given user.
-
name:
string
The user's name.
object
HATEOAS Link
This is a HATEOAS link and related metadata. If responses provide links
(for example, a self
link to the resource itself) the links provided will include one or more of the
properties defined on this link structure.
Internet Assigned Numbers Authority (IANA) maintains a registry of link relations for use in a HATEOAS link. These are well known relations and have specific meanings. If they are applicale in Capture, they are used. For instance, canonical is well known relation, and Capture does use it.
Capture does define its own link relations in certain cases because none of the registered relations provided the proper meaning. As defined in RFC for Web Linking (RFC 8288) the relation needs to be a URI. The following link relations are defined by Capture:
urn:oce:capture:document-content
- Represents the link used to obtain a document's contenturn:oce:capture:document-complete
- Represents the link used to complete processing a document in a Step task queueurn:oce:capture:attachment-content
- Represents the link used to obtain an attachment's content
- href(optional): string
-
mediaType(optional):
string
Default Value:
application/json
Media type, as defined by RFC 2046, describing the link target. The property can be assumed to be
application/json
if the property is not present. -
method(optional):
string
Default Value:
GET
HTTP method for requesting the target of the link.
Valid values are:
OPTIONS
- HTTP OPTIONSHEAD
- HTTP HEADGET
- HTTP GETPOST
- HTTP POSTPUT
- HTTP PUTPATCH
- HTTP PATCHDELETE
- HTTP DELETE
The property can be assumed to be
GET
if the property is not present. -
profile(optional):
string(uri)
Link to the metadata of the resource, such as JSON-schema, that describes the resource expected when dereferencing the target resource. If not available, this property will not be present.
-
rel(optional):
string
Name of the link relation that, in addition to the type property, can be used to retrieve link details.
-
templated(optional):
boolean
Default Value:
false
Boolean flag that specifies the
href
property is a URI or URI Template. The property can be assumed to befalse
if the property is not present.
object
If the batch is locked within a Capture Client instance, this attribute will contain the user that locked the batch.
-
object
User Information
Title:
User Information
This object contains information about a given user of Capture.
Models use this object to denote some relation between a user and some other object. For instance, a model of the API may define the attribute
updatedBy
that is a user object. This indicates it was last updated by that given user.
object
If Capture is currently processing the batch, this object will contain current processing step the batch is undergoing.
-
object
Procedure Step
Title:
Procedure Step
A step in a procedure flow.
object
Procedure Step
A step in a procedure flow.
-
id(optional):
string
The unique identifier of the step within the procedure.
-
name(optional):
string
The name given to the step when created. For instance, the name of the processing job or commit profile.
-
type(optional):
string
The type of step. Some example include: External Processor, TIFF Conversion Processor, Asset Lookup Processor, etc.
object
Capture Procedure
A Capture Procedure defines metadata and procesing steps of a flow.
-
id(optional):
string
The unique identifier of the procedure in Capture.
-
name(optional):
string
The name given to the procedure when created
object
Field Value
A field value is a Capture metadata field that combines the basic field definition and an actual value.
-
dataType(optional):
string
Default Value:
ALPHA_NUMERIC
The data type of the field. Capture supports the following six data types:
NUMERIC
- Integer based number valueALPHA_NUMERIC
- Any general text or string valueDATE
- A date/time value in the form of ISO-8601 Date Time format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
), as governed by RFC 3339FLOAT
- Floating point number valuesITEM_REFERENCE
- A pointer to a content item in Oracle Content ManagementASSET_REFERENCE
- A pointer to a digital asset in Oracle Content ManagementCATEGORY_REFERENCE
- A pointer to a taxonomy category in Oracle Content ManagementLANGUAGE
- A language code as defined by RFC 4647.
-
name(optional):
string
The name of the field.
-
value(optional):
string
The actual value of this metadata field as it pertains to the given Capture document.
Fields do not initially have values. They must be set. This is either done through a default value in the metadata field definition, user supplied in Capture Client, or some Capture processing job.
The fields in Capture do not have a concept of a null value. The fields either have a value or do not have a value. Blank means there is no value.
object
Document Profile
A Document Profile associates a collection of custom metadata fields defined in a Capture procedure with a document. Additionally, it can have associated attachment types.
These are used in Capture to help categorize and process documents. While a document profile does relate custom metadata fields and attachment types from the procedure to a document, it does not restrict metadata to just those fields or attachments to just those types. It they are used for display/management within the Capture Client.
-
id(optional):
string
The unique identifier of the document profile.
-
name(optional):
string
The name given to the document profile.
object
Error Detail
This represents an error in the system, and is the response object returned.
-
detail(optional):
string
Description specific to this occurrence of the problem. The human-readable, potentially multi-line, description the problem in more details.
-
instance(optional):
string(URI)
URI to the link that provides more detail about the error.
-
o:errorCode(optional):
string
Application error code, which is different from HTTP error code. This code should be used to check for specific errors, rather than comparing fields such as the
title
ordetail
. -
o:errorDetails(optional):
array Error Details
Title:
Error Details
-
o:errorPath(optional):
string
XPath or JSON path to indicate where the error occurs.
-
status(optional):
integer(int32)
Corresponding HTTP status code for the error.
-
title:
string
Short, human-readable summary of the problem. It is not advisable to use the title as a way of checking for specific errors, use the
o:errorCode
for this purpose. -
type:
string(URI)
Absolute URI that identifies the problem type. When this URI dereferenced, it should provide a human-readable summary of the problem, for example, as a HTML page.
array
Error Details
-
Array of:
object Error Detail
Title:
Error Detail
This represents an error in the system, and is the response object returned.
500 Response
Internal Server Error
The server encountered an unexpected condition that prevented it from fulfilling the request. The response will be an Error Detail object.
Examples
Example 1:
The following example shows how to complete document processing in a task queue.
curl -X PUT -H 'Accept: application/json' 'https://host:port/content/capture/api/v1/steps/a82321c2-f288-4545-8795-e3c0f035f7ba/tasks/documents/complete'
This shows how to complete document processing while setting an attribute value. There is no response body on a successful completion of this operation.
Request Body
[ { "taskNumber": 177, "document": { "stateToken": "340f804ff4118f2f419bc3ca87ef1213", "fields": [ { "name": "Invoice Date", "dataType": "DATE", "value": "2021-09-15" } ] } } ]
Example 2:
This shows how to complete multiple document processing while setting an attribute value. There is no response body on a successful completion of this operation.
curl -X PUT -H 'Accept: application/json' 'https://host:port/content/capture/api/v1/steps/a82321c2-f288-4545-8795-e3c0f035f7ba/tasks/documents/complete'
Request Body
[ { "taskNumber": 177, "document": { "stateToken": "340f804ff4118f2f419bc3ca87ef1213", "fields": [ { "name": "Invoice Date", "dataType": "DATE", "value": "2021-09-06" } ] } }, { "taskNumber": 178, "document": { "stateToken": "d732c7864c45b405900d086dc54efd09", "fields": [ { "name": "Invoice Date", "dataType": "DATE", "value": "2021-09-08" } ] } } ]
Example 3:
This shows how to complete document processing as an error. There is no response body on a successful completion of this operation.
curl -X PUT -H 'Accept: application/json' 'https://host:port/content/capture/api/v1/steps/a82321c2-f288-4545-8795-e3c0f035f7ba/tasks/documents/complete'
Request Body
[ { "taskNumber": 177, "document": { "stateToken": "340f804ff4118f2f419bc3ca87ef1213" }, "error": { "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1", "title": "Bad Request", "status": 400, "detail": "The metadata field named 'Invoice Total' is not of the required 'FLOAT' data type." } } ]
Example 4:
This shows trying to complete a document with the wrong state token value.
curl -X PUT -H 'Accept: application/json' 'https://host:port/content/capture/api/v1/steps/a82321c2-f288-4545-8795-e3c0f035f7ba/tasks/documents/complete'
Request Body
[ { "taskNumber": 177, "document": { "stateToken": "2f439d75eb148384a034732e8ec77f59", "fields": [ { "name": "Invoice Date", "dataType": "DATE", "value": "2021-09-15" } ] } } ]
Response Body
[ { "taskNumber": 177, "document": { "stateToken": "2f439d75eb148384a034732e8ec77f59", "fields": [ { "name": "Invoice Date", "dataType": "DATE", "value": "2021-09-15" } ] }, "error": { "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.13", "title": "Precondition Failed", "status": 412, "detail": "The state tokens do not match [provided: 2f439d75eb148384a034732e8ec77f59, current: 340f804ff4118f2f419bc3ca87ef1213]" } } ]