Item (Java class ItemTarget)

Stores documents in Document Management. Files of type 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 include is omitted or null, then all generated files are stored.

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_ID or ID.
value
The value of the specified attribute to update.
merge

Can be true or false:

  • If merge is true, you can send only one attribute.
  • If merge is false, you must send all the attributes encoded in the itemdatafile base64.
For example, suppose a document type has 10 attributes and in the update call you want to change only one attribute value. If merge is true, you can send only that attribute. If merge is false, you must send all the attributes encoded in the itemdatafile base64.
Note: The unique attribute specified in the name parameter and its value are required regardless of whether merge is true or false.

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
  }
}