Skip to content
Last updated

Content create

api-version: 3.0

Create content of an element.

POST /{collectionId}/{storageId}/_api/rest/facets/{facetId}/views/diagram/elements/{elementId}/content

Parameters

NameInRequiredTypeDescription
collectionIdpathtruestringThe ID of the storage collection.
storageIdpathtruestringThe ID of the tenant.
facetIdpathtruestringThe name of the facet.
viewIdpathtruestringThe name of the view.
elementIdpathtruestringThe ID of the element.

Request Body

NameTypeDescription
valuesContentModelA collection of content models.

Responses

Success 200

NameTypeDescription
messagestringThe error message
typeOperationResultTypeThe result type.
outputstring

Error 4xx

NameTypeDescription
messagestringThe error message
typeOperationResultOutputThe result output.
typeOperationResultTypeThe result type.
dataOperationErrorThe list of errors.

Examples

Create new content shapes in an element

Request

POST https://demo.symbioworld.com/pz/showcase/_api/rest/facets/processes/views/diagram/elements/db313e1c-9a5f-400e-add9-6282e3058dca/content

Request Body

{
    "values": [
        {
            "shapeInfo": {
                "index": 0
            },
            "element": {
                "type": "evStart",
                "attributes": {
                    "name": {
                        "1031": "Start"
                    }
                }
            }
        },
        {
            "shapeInfo": {
                "predecessors": [
                    0
                ],
                "index": 1
            },
            "element": {
                "type": "subProcess",
                "attributes": {
                    "name": {
                        "1031": "SubProcess"
                    }
                }
            }
        },
        {
            "shapeInfo": {
                "predecessors": [
                    1
                ],
                "index": 2
            },
            "element": {
                "type": "evEnd",
                "attributes": {
                    "name": {
                        "1031": "End"
                    }
                }
            }
        }
    ]
}

Response (200 OK)

{
    "values":
    [
        {
            "id":"a2c0abae-6fbd-42a8-a7a9-931f41ac187d",
            "index":0
        },
            
        {
            "id":"fb92ff40-a84b-4879-bce0-0aa24982f23e",
            "index":1
        },
        {
            "id":"9807501f-e1da-41cf-9c31-91e4fa38be43",
            "index":2
        }
    ]
}

Create a new content shape as successor of an existing shape

Request

POST https://demo.symbioworld.com/pz/showcase/_api/rest/facets/processes/views/diagram/elements/db313e1c-9a5f-400e-add9-6282e3058dca/content

Request Body

{
    "values": [
        {
            "shapeInfo": {
                "index": 0,
                "id": "a2c0abae-6fbd-42a8-a7a9-931f41ac187d"
            }
        },
        {
            "shapeInfo": {
                "predecessors": [
                    0
                ],
                "index": 1
            },
            "element": {
                "type": "task",
                "attributes": {
                    "name": {
                        "1031": "Task"
                    }
                }
            }
        }
    ]
}

Response (200 OK)

{
    "values":
        [
            {
                "id": "fc1388c1-9956-4028-9603-2954a24a377d",
                "index": 0
            },
            {
                "id": "ec10b6fd-1e47-4c90-9992-f3654166d444",
                "index": 
            }
        ]
}

Create a new content shape and reference an existing SubProcess

Request

POST https://demo.symbioworld.com/pz/showcase/_api/rest/facets/processes/views/diagram/elements/db313e1c-9a5f-400e-add9-6282e3058dca/content

Request Body

{
    "values": [
        {
            "shapeInfo": {
                "index": 0,
                "id": "a2c0abae-6fbd-42a8-a7a9-931f41ac187d"
            }
        },
        {
            "shapeInfo": {
                "predecessors": [
                    0
                ],
                "index": 1
            },
            "element": {
                "type": "subProcess",
                "id": "db313e1c-9a5f-400e-add9-6282e3058dca"
            }
        }
    ]
}

Response (200 OK)

{
    "values":
        [
            {
                "id": "fc1388c1-9956-4028-9603-2954a24a377d",
                "index": 0
            },
            {
                "id": "db313e1c-9a5f-400e-add9-6282e3058dca",
                "index": 
            }
        ]
}

Definitions

Element

NameTypeDescription
idGuid?The identifier of the element.
versionIdGuid?The identifier of the specific version.
statestringThe current state of the element.
stereotypestringThe stereotype of the element.
typestringThe type of the element.
attributesDictionary<string, Dictionary<int, object>>The attributes of the element.
relatedDictionary<string, List<Element>>The list of related elements.
childrenElementThe list of child elements.
contentElementThe list of content elements.
rootPathElementThe list of hierarchical parent elements to the root element.
displayNamesDictionary<int, string>Gets the display names of multiple languages.
expandUristringGets or sets the expand Uri to get full information about element
facetNamestringName of the facet
setReadOnlybool?Gets or sets the read only of the element
versionsElementElement versions of this container

ContentModel

NameTypeDescription
shapeInfoContentShapeInfoInformation about the shape.
elementElementThe element.

ContentShapeInfo

NameTypeDescription
predecessorsintThe predecessor indices of the shape.
indexintThe index of the shape in the context of the current operation.
idstringThe ID of the shape. Optional, can be used to reference existing shapes.

OperationResultOutput

NameType
volatilestring
permanentstring
dialogstring
inlinestring

OperationResultType

NameType
criticalstring
errorstring
warningstring
successstring
unauthorizedstring

OperationError

NameTypeDescription
errorstringThe error message.