Content create
api-version: 3.0
Create content of an element.
POST /{collectionId}/{storageId}/_api/rest/facets/{facetId}/views/diagram/elements/{elementId}/content
Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
collectionId | path | true | string | The ID of the storage collection. |
storageId | path | true | string | The ID of the tenant. |
facetId | path | true | string | The name of the facet. |
viewId | path | true | string | The name of the view. |
elementId | path | true | string | The ID of the element. |
Request Body
Name | Type | Description |
---|---|---|
values | ContentModel | A collection of content models. |
Responses
Success 200
Name | Type | Description |
---|---|---|
message | string | The error message |
type | OperationResultType | The result type. |
output | string |
Error 4xx
Name | Type | Description |
---|---|---|
message | string | The error message |
type | OperationResultOutput | The result output. |
type | OperationResultType | The result type. |
data | OperationError | The 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
Name | Type | Description |
---|---|---|
id | Guid? | The identifier of the element. |
versionId | Guid? | The identifier of the specific version. |
state | string | The current state of the element. |
stereotype | string | The stereotype of the element. |
type | string | The type of the element. |
attributes | Dictionary<string, Dictionary<int, object>> | The attributes of the element. |
related | Dictionary<string, List<Element>> | The list of related elements. |
children | Element | The list of child elements. |
content | Element | The list of content elements. |
rootPath | Element | The list of hierarchical parent elements to the root element. |
displayNames | Dictionary<int, string> | Gets the display names of multiple languages. |
expandUri | string | Gets or sets the expand Uri to get full information about element |
facetName | string | Name of the facet |
setReadOnly | bool? | Gets or sets the read only of the element |
versions | Element | Element versions of this container |
ContentModel
Name | Type | Description |
---|---|---|
shapeInfo | ContentShapeInfo | Information about the shape. |
element | Element | The element. |
ContentShapeInfo
Name | Type | Description |
---|---|---|
predecessors | int | The predecessor indices of the shape. |
index | int | The index of the shape in the context of the current operation. |
id | string | The ID of the shape. Optional, can be used to reference existing shapes. |
OperationResultOutput
Name | Type |
---|---|
volatile | string |
permanent | string |
dialog | string |
inline | string |
OperationResultType
Name | Type |
---|---|
critical | string |
error | string |
warning | string |
success | string |
unauthorized | string |
OperationError
Name | Type | Description |
---|---|---|
error | string | The error message. |