[POST] /objects
/api/dms/objects
Description | General: To insert one or more DMS objects, send the request with metadata and content as multipart request body. The parent object to insert into is specified with the field system:parentId. User tray (min Version 3.1.0): To insert one or more DMS objects to the user tray use for system:parentId the value system:tray.
Moving objects to a new parent (since Version 3.1.0): To move a DMS object from one location to another this endpoint next to the Multipart/POST-Endpoint can be used. The example "Request Example Moving... to a new location" show which system properties must be set. In system:parentId the object id of the new parent (folder or register) must be inserted. Depending if the currently direct parent is a folder or a register it's object id must be inserted into system:FOLDERID or system:REGISTERID like shown in the example below. Moving objects from the user tray to a fix location (since Version 3.1.0): Objects from the user tray can be moved to a fix location by only settings the system:parentId to the object id of the new parent (folder or register). It is not possible to move typeless objects to a fix location. This kind of objects must be updated to a fix type in before. Updating a typeless object to a fixed type and moving it to a new location can be done in one request if system:parentId and system:objectTypeId are combined. Updating typeless objects to typed objects (since Version 3.1.0): The update endpoint can be used to set the type for typeless objects. For this the system property system:objectTypeId must be set to the id of the new object type. Also all required fields must be set within the update request. It is also possible to move the object in the same request to a fix location. In this case the typeless object is first updated to the new type and afterwards moved to the new location. Updating retention date of document objects (since Version 3.1.0): The retention date can be set / adjusted on document objects by adding the property system:OBJECT_RETENTION_PLANNED with a ISO date without time part (e.g. 2020-12-13). Creating reference documents ("green arrow") at a location (since 5.0.0): To create a reference document at a location the following system properties must be send to the DMS service: system:OBJECT_FOREIGNID with the source object Id and system:OBJECT_SYSTEMID with the value "0". Adding an additional location to an existing object (since 5.1.0): To add another location to an already existing document object, specify the new parent with system:parentId and additional in the options part specify that it is a link location ("LINKDOCUMENT": 1). See example below. Moving and Updating a object in one call (since Version 6.5.1): Moving and updating a DMS object in one call can be made if index data fields, which should be updated, are included in the JSON next to the mandatory informations for moving the DMS object (see section for moving). It is not possible to move a document that is located in multiple locations and simultaneously update its index data. When a document has multiple locations, either the REGISTERID or the FOLDERID must be provided to specify which location the document is to be moved from. In this case, due to the presence of multiple locations, it is not feasible to update the index data at the same time as the move operation. If the document has only a single location, there is no need to specify either the REGISTERID or FOLDERID, and in this case, both the move and the update of the index data can be performed simultaneously. |
---|---|
Request | POST |
Request optional Query Parameter |
|
Request Header | Content-Type: multipart/form-data |
Response | JSON |
Response | Success: HTTP 200 |
Minimum Version | 3.0.0 |
Changelog |
|
Request | The request example represents the complete multipart for the import of an e-mail. In addition to the metadata and the e-mail content, a text rendition is imported. POST /api/dms/objects HTTP/1.1
Accept: application/json, application/*+json
Content-Type: multipart/form-data;boundary=Jn3QCX9rHAFQaofW6vsdoz5CsD5_P0PZhH
User-Agent: Java/1.8.0_60
Connection: keep-alive
Content-Length: 83258
Host: 127.0.0.1:7400
--Jn3QCX9rHAFQaofW6vsdoz5CsD5_P0PZhH
Content-Disposition: form-data; name="data"
Content-Type: application/json;charset=UTF-8
{
"objects": [{
"properties": {
"system:objectTypeId": {
"value": "262208"
},
"system:parentId": {
"value": "7308"
},
"from": {
"value": "Garco Meissler <garco@example.de>"
},
"to": {
"value": "Dudreas Annkel <dudreas@example.de>"
},
"cc": {
"value": "Kruedeas Anger <kruedeas@example.de>"
},
"subject": {
"value": "Bewerbungsunterlagen"
}
},
"contentStreams": [{
"mimeType": "message/rfc822",
"fileName": "upload.eml",
"cid": "cid_63apple"
}]
}]
}
--Jn3QCX9rHAFQaofW6vsdoz5CsD5_P0PZhH
Content-Disposition: form-data; name="cid_63apple"; filename="upload.eml"
Content-ID: cid_63apple
Content-Type: message/rfc822
From: Garco Meissler <garco@example.de>
To: Dudreas Annkel <dudreas@example.de>
Cc: Kruedeas Anger <kruedeas@example.de>
Message-ID: <12716821.1.1500391295036.JavaMail.meissler@APGMEISSLER>
Subject: =?UTF-8?Q?Bewerbungsunterlagen?=
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_0_16468615.1500391295024"
------=_Part_0_16468615.1500391295024
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy ei=
rmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam volu=
ptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita k=
asd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lore=
...
en, no sea takimata sanctus est Lore
------=_Part_0_16468615.1500391295024--
|
Request | {
"objects": [{
"properties": {
"system:objectTypeId": {
"value": "262208"
},
"system:parentId": {
"value": "7308"
},
"from": {
"value": "Garco Meissler <garco@example.de>"
},
"to": {
"value": "Dudreas Annkel <dudreas@example.de>"
},
"cc": {
"value": "Kruedeas Anger <kruedeas@example.de>"
},
"subject": {
"value": "Bewerbungsunterlagen"
}
}
}]
} |
Request | {
"objects": [{
"properties": {
"system:objectId": {
"value": "3652354" // The object id of the object to move
},
"system:objectTypeId": {
"value": "6488100" // Optional: The object type id of the object to move
},
"system:parentId": {
"value": "83652" // The osId of the new parent object
},
"system:parentObjectTypeId": {
"value": "6488100" // Optional: The object type id of the new parent object
},
"system:REGISTERID": {
"value": "83665" // The osId of the current parent
}
}
}]
} |
Request | {
"objects": [{
"properties": {
"system:objectId": {
"value": "3652354" // The object id of the object to move
},
"system:objectTypeId": {
"value": "6488100" // Optional: The object type id of the object to move
},
"system:parentId": {
"value": "83652" // The osId of the new parent object
},
"system:parentObjectTypeId": {
"value": "6488100" // Optional: The object type id of the new parent object
},
"system:FOLDERID": {
"value": "83665" // The osId of the current parent
}
}
}]
} |
Request | {
"objects": [{
"properties": {
"system:objectId": {
"value": "123625" // The object id of the object
},
"system:objectTypeId": {
"value": "262125" // Optional: The object type id of the object
}
},
"options": {
"ARCHIVABLE": 1
}
}]
} |
Request | {
"objects": [{
"properties": {
"system:OBJECT_FOREIGNID": {
"value": "123625" // The source object id
},
"system:OBJECT_SYSTEMID": {
"value": "0"
},
"system:objectTypeId": {
"value": "262125" // The object type id of the object to create
},
"system:parentId": {
"value": "8663" // The folder or register object id to insert into
},
// All further mask fields which should be set
}
}]
} |
Request | {
"objects": [{
"properties": {
"system:objectId": {
"value": "41087"
},
"system:objectTypeId": {
"value": "262125"
},
"system:parentId": {
"value": "41080"
}
},
"options": {
"LINKDOCUMENT": 1
}
}]
} |
Request | POST /api/dms/objects HTTP/1.1
Accept: application/json, application/*+json
Content-Type: multipart/form-data;boundary=Jn3QCX9rHAFQaofW6vsdoz5CsD5_P0PZhH
User-Agent: Java/1.8.0_60
Connection: keep-alive
Content-Length: 83258
Host: 127.0.0.1:7400
--Jn3QCX9rHAFQaofW6vsdoz5CsD5_P0PZhH
Content-Disposition: form-data; name="data"
Content-Type: application/json;charset=UTF-8
{
"objects": [{
"properties": {
"system:parentId": {
"value": "system:tray"
},
"system:objectTypeId": {
"value": "system:typeless"
},
"system:mainType": {
"value": "4"
}
},
"contentStreams": [{
"mimeType": "message/rfc822",
"fileName": "upload.eml",
"cid": "cid_63apple"
}]
}]
}
--Jn3QCX9rHAFQaofW6vsdoz5CsD5_P0PZhH
Content-Disposition: form-data; name="cid_63apple"; filename="upload.eml"
Content-ID: cid_63apple
Content-Type: message/rfc822
From: Garco Meissler <garco@example.de>
To: Dudreas Annkel <dudreas@example.de>
Cc: Kruedeas Anger <kruedeas@example.de>
Message-ID: <12716821.1.1500391295036.JavaMail.meissler@APGMEISSLER>
Subject: =?UTF-8?Q?Bewerbungsunterlagen?=
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_0_16468615.1500391295024"
------=_Part_0_16468615.1500391295024
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy ei=
rmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam volu=
ptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita k=
asd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lore=
...
en, no sea takimata sanctus est Lore
------=_Part_0_16468615.1500391295024-- |
Request | POST /api/dms/objects HTTP/1.1
Accept: application/json, application/*+json
Content-Type: multipart/form-data;boundary=Jn3QCX9rHAFQaofW6vsdoz5CsD5_P0PZhH
User-Agent: Java/1.8.0_60
Connection: keep-alive
Content-Length: 83258
Host: 127.0.0.1:7400
--Jn3QCX9rHAFQaofW6vsdoz5CsD5_P0PZhH
Content-Disposition: form-data; name="data"
Content-Type: application/json;charset=UTF-8
{
"objects": [{
"properties": {
"system:parentId": {
"value": "system:workflowtray"
},
"system:objectTypeId": {
"value": "system:typeless"
},
"system:mainType": {
"value": "4"
}
},
"contentStreams": [{
"mimeType": "message/rfc822",
"fileName": "upload.eml",
"cid": "cid_63apple"
}]
}]
}
--Jn3QCX9rHAFQaofW6vsdoz5CsD5_P0PZhH
Content-Disposition: form-data; name="cid_63apple"; filename="upload.eml"
Content-ID: cid_63apple
Content-Type: message/rfc822
From: Garco Meissler <garco@example.de>
To: Dudreas Annkel <dudreas@example.de>
Cc: Kruedeas Anger <kruedeas@example.de>
Message-ID: <12716821.1.1500391295036.JavaMail.meissler@APGMEISSLER>
Subject: =?UTF-8?Q?Bewerbungsunterlagen?=
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_0_16468615.1500391295024"
------=_Part_0_16468615.1500391295024
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy ei=
rmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam volu=
ptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita k=
asd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lore=
...
en, no sea takimata sanctus est Lore
------=_Part_0_16468615.1500391295024-- |
Result |