You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Advance response configuration allows to set **Response Item Template for Selection** which can be used to define how the selection of items from the integration will be presented before selection.
108
108
109
-
110
-
Migration from Legacy API Integration
111
-
*************************************
112
-
113
-
To migrate a knowledge model from API Integration Legacy to API Integration v2, we need to recreate the integration and connect it to the respective questions. To do that, open the knowledge model Editor. There, navigate to the existing integrations. The best practice is to create the integration from scratch. You can follow this :ref:`configuration guide<integration-api-configuration>`.
114
-
115
-
We recommend recreating the integration to keep the original one as a reference. This allows you to copy the configuration from it and identify which questions are using the legacy integration so you can connect them to the new one.
116
-
117
-
Once the new API Integration v2 instances are successfully created and the integration questions are connected to them, you can delete the old integrations and release the knowledge model. Then you can migrate projects.
118
-
119
-
.. NOTE::
120
-
121
-
If you somehow manage to lose the content of the integrations before they are recreated, you can always create a new knowledge model editor.
122
-
123
-
During the migration from API Integration Legacy to API Integration v2, the existing integration replies in projects are migrated automatically. However, there are differences in how the data is stored. The following sections describe how the data is handled in each state:
124
-
- Legacy API Integration
125
-
- Migrated to API Integration v2 (legacy data)
126
-
- New API Integration v2 with “raw = HTTP response”
127
-
128
-
**State A — Legacy API Integration (ApiLegacyIntegration)**
129
-
130
-
This is how API Integration Legacy stores the data.
131
-
132
-
**What is stored:**
133
-
134
-
``IntegrationReply.value`` contains:
135
-
136
-
- an ``id`` (the selected item identifier)
137
-
- a ``type``: ``IntegrationLegacyType``
138
-
- a ``value`` (the rendered markdown or text displayed in the UI)
139
-
140
-
.. code:: json
141
-
142
-
{
143
-
"type": "IntegrationReply",
144
-
"value": {
145
-
"id": "0000-0003-3856-1682",
146
-
"type": "IntegrationLegacyType",
147
-
"value": "**Kryštof** **Komanec** \nORCID: **0000-0003-3856-1682** \n\n\n*Czech Technical University in Prague* \n*Prague University of Economics and Business* \n"
148
-
}
149
-
}
150
-
151
-
152
-
**State B — Migrated to API Integration v2 (existing data)**
153
-
154
-
After migrating to API Integration v2, the existing data is stored differently.
155
-
156
-
**What changes compared to Legacy:**
157
-
158
-
- ``id`` is **removed**
159
-
- ``raw`` is introduced but remains empty: ``"raw": {}``
160
-
- ``type`` becomes ``IntegrationType`` instead of ``IntegrationLegacyType``
161
-
- ``value`` remains the same (the markdown reply rendered in the UI)
162
-
163
-
.. code:: json
164
-
165
-
{
166
-
"type": "IntegrationReply",
167
-
"value": {
168
-
"raw": {},
169
-
"type": "IntegrationType",
170
-
"value": "**Kryštof** **Komanec** \nORCID: **0000-0003-3856-1682** \n\n\n*Czech Technical University in Prague* \n*Prague University of Economics and Business* \n"
171
-
}
172
-
}
173
-
174
-
175
-
**State C — New API Integration v2 with IntegrationType reply**
176
-
177
-
If you delete the old answer and provide a new one, or if you answer a new integration question using API Integration v2, the data is stored differently. The semantics of the stored data also change. The ``raw`` field now contains the raw HTTP response from the API, which can be used in the answer template.
178
-
179
-
**What is stored:**
180
-
181
-
- ``raw`` = the actual integration HTTP response item or body, which serves as the source of truth
182
-
- ``type`` = ``IntegrationType``
183
-
- ``value`` = custom text entered by the user or rendered template output, generated from the ``raw`` data using the answer template
**State D - New API Integration v2 with PlainType reply**
209
-
210
-
If custom reply is enabled in the integration configuration, the answer to an integration question can also be a plain text. In that case, the data is stored as follows.
211
-
212
-
**What is stored:**
213
-
214
-
- ``type`` = ``PlainType``
215
-
- ``value`` = the plain text answer provided by the user.
To migrate a knowledge model from API Integration Legacy to API Integration v2, we need to recreate the integration and connect it to the respective questions. To do that, open the knowledge model Editor. There, navigate to the existing integrations. The best practice is to create the integration from scratch. You can follow this :ref:`configuration guide<integration-api-configuration>`.
7
+
8
+
We recommend recreating the integration to keep the original one as a reference. This allows you to copy the configuration from it and identify which questions are using the legacy integration so you can connect them to the new one.
9
+
10
+
Once the new API Integration v2 instances are successfully created and the integration questions are connected to them, you can delete the old integrations and release the knowledge model. Then you can migrate projects.
11
+
12
+
.. NOTE::
13
+
14
+
If you somehow manage to lose the content of the integrations before they are recreated, you can always create a new knowledge model editor.
15
+
16
+
During the migration from API Integration Legacy to API Integration v2, the existing integration replies in projects are migrated automatically. However, there are differences in how the data is stored. The following sections describe how the data is handled in each state:
17
+
- Legacy API Integration
18
+
- Migrated to API Integration v2 (legacy data)
19
+
- New API Integration v2 with “raw = HTTP response”
20
+
21
+
**State A — Legacy API Integration (ApiLegacyIntegration)**
22
+
23
+
This is how API Integration Legacy stores the data.
24
+
25
+
**What is stored:**
26
+
27
+
- an ``id`` (the selected item identifier)
28
+
- a ``type``: ``IntegrationLegacyType``
29
+
- a ``value`` (the rendered markdown or text displayed in the UI)
30
+
31
+
.. code:: json
32
+
33
+
{
34
+
"type": "IntegrationReply",
35
+
"value": {
36
+
"id": "0000-0003-3856-1682",
37
+
"type": "IntegrationLegacyType",
38
+
"value": "**Kryštof** **Komanec** \nORCID: **0000-0003-3856-1682** \n\n\n*Czech Technical University in Prague* \n*Prague University of Economics and Business* \n"
39
+
}
40
+
}
41
+
42
+
43
+
**State B — Migrated to API Integration v2 (existing data)**
44
+
45
+
After migrating to API Integration v2, the existing data is stored differently.
46
+
47
+
**What changes compared to Legacy:**
48
+
49
+
- ``id`` is **removed**
50
+
- ``raw`` is introduced but remains empty: ``"raw": {}``
51
+
- ``type`` becomes ``IntegrationType`` instead of ``IntegrationLegacyType``
52
+
- ``value`` remains the same (the markdown reply rendered in the UI)
53
+
54
+
.. code:: json
55
+
56
+
{
57
+
"type": "IntegrationReply",
58
+
"value": {
59
+
"raw": {},
60
+
"type": "IntegrationType",
61
+
"value": "**Kryštof** **Komanec** \nORCID: **0000-0003-3856-1682** \n\n\n*Czech Technical University in Prague* \n*Prague University of Economics and Business* \n"
62
+
}
63
+
}
64
+
65
+
66
+
**State C — New API Integration v2 with IntegrationType reply**
67
+
68
+
If you delete the old answer and provide a new one, or if you answer a new integration question using API Integration v2, the data is stored differently. The semantics of the stored data also change. The ``raw`` field now contains the raw HTTP response from the API, which can be used in the answer template.
69
+
70
+
**What is stored:**
71
+
72
+
- ``raw`` = the actual integration HTTP response item or body, which serves as the source of truth
73
+
- ``type`` = ``IntegrationType``
74
+
- ``value`` = custom text entered by the user or rendered template output, generated from the ``raw`` data using the answer template
**State D - New API Integration v2 with PlainType reply**
100
+
101
+
If custom reply is enabled in the integration configuration, the answer to an integration question can also be a plain text. In that case, the data is stored as follows.
102
+
103
+
**What is stored:**
104
+
105
+
- ``type`` = ``PlainType``
106
+
- ``value`` = the plain text answer provided by the user.
0 commit comments