/api/v2/bpm/editor/nodes
Метод создает ноду любого типа. Кроме создания нод, метод помогает создать двухуровневую структуру вложенности из нод
- application/json
Request Body
- nodeType int64 required
Тип ноды. Основное свойство каждой ноды, определяющее уровень абстракции
- name string
Possible values:
non-empty
and<= 255 characters
Уникальное имя ноды. В рамках одного типа ноды имена всегда уникальны, при попытке создания элемента с одинаковым именем произойдет перезапись предыдущего элемента
- title string
Possible values:
non-empty
and<= 255 characters
Не уникальное имя элемента, использующееся для отображения в интерфейсах
- description string
Possible values:
non-empty
Описание ноды
- properties object
Объект содержащий свойства элемента. Указанные здесь настройки будут использоваться как дефолтные при использовании данного элемента без их переопределения
- nodeFieldname string
Possible values:
non-empty
and<= 255 characters
Шаблон ID переменной связанной с нодой типа 'поле', либо имя этой переменной. Значение для этой переменной можно получить с экрана пользователя
- childrenNodes array
Дочерние элементы (вложенные ноды с более низким уровнем уровнем абстракции). Для использования дочернего элемента обязательно указание его id
- 200
- 400
- 401
OK
- application/json
- Schema
- Example (from schema)
- example-0
- example-1
- example-2
- example-3
- example-4
- example-5
- example-6
- example-7
- example-8
- example-9
- example-10
Schema
- object
{}
200_node
{
"status": 1,
"message": "",
"response": {
"id": 1247365,
"name": "correct_node_for_qa_test_10",
"title": "correct_node_10",
"nodeType": "node",
"properties": {
"color": "#010101"
},
"screens": [
{
"id": 1247366,
"name": "testScreenTest",
"title": "test screen 6",
"nodeType": "screen",
"properties": {},
"nodeFields": []
}
]
},
"preparingsTime": 5.064
}
200_screen
{
"status": 1,
"message": "",
"response": {
"id": 1257439,
"name": "correct_screeen_for_qa_test_99",
"title": "correct_screen_99",
"nodeType": "screen",
"properties": {
"fontText": "Default value"
},
"nodeFields": []
},
"preparingsTime": 6.898
}
200_preset
{
"status": 1,
"message": "",
"response": {
"id": 1247882,
"name": "correct_preset_for_qa_test_13",
"title": "correct_preset_13",
"nodeType": "preset",
"properties": {},
"screens": [
{
"id": 1247883,
"name": "screen_for_qa_test_1",
"title": "screen_for_qa_test_1",
"nodeType": "screen",
"properties": {},
"nodeFields": []
}
]
},
"preparingsTime": 1.815
}
200_processes
{
"status": 1,
"message": "",
"response": {
"id": 1144612,
"name": "for test actions",
"title": "for test actions",
"nodeType": "process",
"properties": {}
},
"preparingsTime": 2.985
}
200_field
{
"status": 1,
"message": "",
"response": {
"id": 1249435,
"name": "qa.field.test.correct21",
"nodeType": "correct_field_for_qa_test_21",
"properties": {}
},
"preparingsTime": 1.923
}
200_wrapper
{
"status": 1,
"message": "",
"response": {
"id": 1247886,
"name": "correct_wrapper_for_qa_test_15",
"title": "correct_wrapper_15",
"nodeType": "widget",
"properties": {},
"nodeFields": [
{
"id": 1247887,
"name": "widget_for_qa_test_1",
"title": "widget_for_qa_test_1",
"nodeType": "widget",
"properties": {},
"nodeFields": []
}
]
},
"preparingsTime": 1.871
}
200_function_node
{
"status": 1,
"message": "",
"response": {
"id": 1173024,
"name": "node_function_for_qa_test_1",
"title": "node_fuction_for_qa_test_1",
"nodeType": "function",
"properties": {},
"screens": []
},
"preparingsTime": 1.149
}
200_collection
{
"status": 1,
"message": "",
"response": {
"id": 1173025,
"name": "collection_for_qa_test_1",
"title": "collection_for_qa_test_1",
"nodeType": "collection",
"properties": {}
},
"preparingsTime": 1.656
}
200_group
{
"status": 1,
"message": "",
"response": {
"id": 1173028,
"name": "group_for_qa_test_3",
"title": "group_for_qa_test_3",
"nodeType": "group",
"properties": {}
},
"preparingsTime": 1.27
}
200_widget
{
"status": 1,
"message": "",
"response": {
"id": 1247888,
"name": "correct_widget_for_qa_test_16",
"title": "correct_widget_16",
"nodeType": "wrapper",
"properties": {},
"nodeFields": [
{
"id": 1247889,
"name": "wrapper",
"title": "wrapper",
"nodeType": "wrapper",
"properties": {},
"nodeFields": []
}
]
},
"preparingsTime": 1.839
}
matreshka
{
"status": 1,
"message": "",
"response": {
"id": 1249446,
"name": "correct_node_for_qa_test_9000",
"title": "correct_node_9000",
"nodeType": "node",
"properties": {
"color": "#010101"
},
"presets": [
{
"id": 1249447,
"name": "testPresetNewFormat",
"title": "testPresetNewFormat",
"nodeType": "preset",
"properties": {
"id": 198,
"name": "backgroundСolor",
"parentId": "7",
"typeId": "5",
"type": "string",
"isGlobal": "False",
"isGroup": "True",
"tableReference": "ref_universal",
"description": "random desc",
"defaultValue": "gladious",
"order": 1
},
"screens": [
{
"id": 1249448,
"name": "testScreen1NewFormat",
"title": "testScreen1NewFormat",
"nodeType": "screen",
"properties": {},
"nodeFields": []
}
]
}
]
},
"preparingsTime": 2.205
}
Bad Request
- application/json
- Schema
- Example (from schema)
- example-0
- example-1
- example-2
- example-3
Schema
- object
{}
400
{
"status": 0,
"message": "Node type required",
"response": {},
"preparingsTime": 0.037
}
400_2
{
"status": 0,
"message": "This field may not be null.",
"response": {
"nodeType": [
"This field may not be null."
],
"name": [
"This field may not be blank."
],
"description": [
"This field may not be blank."
],
"nodeFieldname": [
"This field may not be blank."
]
},
"preparingsTime": 0.502
}
400_3
{
"status": 0,
"message": "This field may not be null.",
"response": {
"nodeType": [
"This field may not be null."
],
"name": [
"This field may not be null."
],
"title": [
"This field may not be null."
],
"description": [
"This field may not be null."
],
"properties": [
"This field may not be null."
],
"nodeFieldname": [
"This field may not be null."
],
"childrenNodes": [
"This field may not be null."
]
},
"preparingsTime": 0.254
}
400_parent_id=null
{
"status": 0,
"message": "Wrong type at `correct_node_for_qa_test_1` in `parentId` property - None. Allowed types: ['str', 'bool', 'int'] (current type is <class 'NoneType'>",
"response": {},
"preparingsTime": 0.468
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
- object
{}
{
"status": 0,
"message": "Authentication credentials were not provided.",
"response": {
"detail": "Authentication credentials were not provided."
},
"preparingsTime": 0.002
}