Item (Java class ItemTarget)
pid, xquery, and template are ignored
and are not stored back to .Document Management| Attribute name | Value | Type | Description |
|---|---|---|---|
| type | "item" | string | The target object type. |
| itemdatafile | DataFile object | Data file object containing a base64-encoded item xml. | |
| include |
Optional Example: ["Myfile.pdf", "AnotherFile.pdf"] |
array of string |
List of file names to be included to the target. In this case, the files are stored in Document Management. If If some of the generated documents should not be included to the target, then the include list must only contain the names of the generated documents that should be added to Document Management. Note that HTML files cannot be stored in Document Management. If any HTML document has been generated, then use this attribute to specify only those files that should be stored in Document Management. Available from 12.0.24. |
This is an example of this target type in JSon:
{
"type": "item",
"itemdatafile": {
"type": "data",
"base64": "sdfdsf=",
"filename": "MyItem.xml"
}
}
Versioning documents
You can version documents using the Submit API in Document Output. To do this, you must
use the updateVersion object.
To use updateVersion, you must specify some parameters. If a document
is found that matches the specified criteria, then that document is updated and
versioned. If not, the original functionality of the submit job is used to add a new
document.
To use updateVersion, you must specify these parameters:
- name
- The UNIQUE attribute which is specified in the itemdatafile, such as
MDS_IDorID. - value
- The value of the specified attribute to update.
- merge
-
Can be
trueorfalse:- If
mergeistrue, you can send only one attribute. - If
mergeisfalse, you must send all the attributes encoded in theitemdatafilebase64.
For example, suppose a document type has 10 attributes and in the update call you want to change only one attribute value. Ifmergeistrue, you can send only that attribute. Ifmergeisfalse, you must send all the attributes encoded in theitemdatafilebase64.Note: The unique attribute specified in thenameparameter and itsvalueare required regardless of whethermergeistrueorfalse. - If
This code shows an example of an updateVersion
call:
{
"type": "item",
"itemdatafile": {
"type": "data",
"base64": "sdfdsf=",
"filename": "MyItem.xml"
}
"updateVersion": {
"name": "uniqueAtributeName",
"value": "abcdefg",
"merge": true
}
}