Creating Multiple Documents
This example shows you how to create multiple documents. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/DocMgmt/CreateDocuments HTTP/1.1
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Documents": [
{ "Name": "test doc1", "Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:302725')" }
,
{ "Name": "test doc2", "Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:302725')" }
]
}
Example: Creating Multiple Documents with Security Labels
This example shows you how to create two Documents with security labels. In this example, two standard security label attributes, SecrecyLabel and SL10 along with other attributes are specified for each Document object in the request body. Use the following POST URI with the request body.
* 
To set the values of the standard security label attributes which are available in the EDM of the entity, you must specify the internal names of their values in the request body.
You can specify unrestricted (standard and custom) or restricted security label attributes in the request body.
If restricted security label attributes are specified or if the access to an entity is restricted, the request creates the entity object in Windchill, but the response does not contain the entity.
URI
POST /Windchill/servlet/odata/DocMgmt/CreateDocuments HTTP/1.1
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Documents": [
{ "Name": "MultiDocSL1111", "SecrecyLabel": "Secret1", "SL10": "v1", "Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:302725')" }
,
{ "Name": "MultiDocSL2222", "SecrecyLabel": "Secret2", "SL10": "v1", "Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:302725')" }
]
}