POST /api/dms/objects

As of Versionproduct version 1.0 | component version 1.0
Request MethodPOST
Response FormatJSON
Required Permissionaction create
>> Roles and Role Sets
Description

To import one or more DMS objects send the request with metadata and content as multipart request body. The response is a JSON structure containing the metadata of all objects created.

Request Header

Content-Type: multipart/form-data

Request Example

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 also 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": "appEmail:email"
            },
            "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"
        }],

        "renditions": [{
            "mimeType": "text/plain",
            "kind": "text",
            "contentStream": {
                "length": 39939,
                "mimeType": "text/plain",
                "fileName": "content.txt",
                "cid": "rendition_0"
            }
        }],

        "options": {

            "synchronousContentAnalysis": true

        }

    }]
}

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

--Jn3QCX9rHAFQaofW6vsdoz5CsD5_P0PZhH
Content-Disposition: form-data; name="rendition_0"; filename="content.txt"
Content-ID: rendition_0
Content-Type: text/plain
Content-Length: 39939

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua...

--Jn3QCX9rHAFQaofW6vsdoz5CsD5_P0PZhH

PartDescrition
dataThe metadata is passed in JSON format in the data part of the multipart request body.
cid_63apple

The e-mail content is referenced by a content ID ("cid": "cid_63apple") in the contentStreams part of the metadata.

This content ID appears again in the multipart request body below and represents the e-mail content.

rendition_0

The text rendition is represented by a contentStream object in the renditions part of the metadata.

This contentStream object references to a content part of the multipart request body with Content-ID: rendition_0.

options

Optional arguments for steering the processing engine dynamically.

  • synchronousContentAnalysis: true|false (default value: true)
    Skip synchronous processing of the content (no full-text extraction) in the content analyzer service.
    Note: to disable the content analyzer service in general, use the "skip":"true" parameter in the JSON configuration file (Git for configuration, .../system/serviceConfiguration.json) for the "contentanalyzer" service.
Result Example

The result is a JSON structure containing the metadata of the e-mail object created.

{
	"objects": [{
		"properties": {
			"system:objectId": {
				"value": "cdc7095f-a5ce-486d-92a7-6d0955d969ee"
			},
			"system:baseTypeId": {
				"value": "system:document"
			},
			"system:objectTypeId": {
				"value": "appEmail:email"
			},
			"system:createdBy": {
				"value": "0d7fd0be-6a0b-4d3b-933c-25e0c4c5d794"
			},
			"system:creationDate": {
				"value": "2018-01-26T15:21:170Z"
			},
			"system:lastModifiedBy": {
				"value": "0d7fd0be-6a0b-4d3b-933c-25e0c4c5d794"
			},
			"system:lastModificationDate": {
				"value": "2018-01-26T15:21:170Z"
			},
			"system:versionNumber": {
				"value": 1
			},
			"system:tenant": {
				"value": "tenant1"
			},
			"system:traceId": {
				"value": "97a35859dbb4c435"
			},
			"appEmail:from": {
				"value": "Garco Meissler <garco@example.de>"
			},
			"appEmail:to": {
				"value": ["Dudreas Annkel <dudreas@example.de>"]
			},
			"appEmail:cc": {
				"value": ["Kruedeas Anger <kruedeas@example.de>"]
			},
			"appEmail:subject": {
				"value": "Bewerbungsunterlagen"
			}
		},
		"contentStreams": [{
			"contentStreamId": "2B797243-A1F5-11EA-A814-9FABD98CE7A7",
			"length": 173413,
			"mimeType": "message/rfc822",
			"fileName": "upload.eml",
			"digest": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
			"repositoryId": "repo252"
		}]
	}]
}