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.
104
104
105
+
106
+
Migration from Legacy API Integration
107
+
*************************************
108
+
109
+
During the migration from legacy API integration to the new one, the existing API integrations will be automatically migrated. However, there are some differences between these two types of integrations in how they store the data. Here is how the data is stored in all states of the new API integration and how it was stored in the legacy API integration. There is also an example of the stored data in the legacy ORCID API integration.
110
+
111
+
**State A Legacy API integration (ApiLegacyIntegration)**
112
+
113
+
This is how the Legacy API integration stores the data.
114
+
115
+
**What is stored:**
116
+
`IntegrationReply.value` carries:
117
+
118
+
- an ``id`` (the selected item identifier)
119
+
- a ``type``: "IntegrationLegacyType"`
120
+
- a ``value`` (the rendered markdown/text you see in the UI)
121
+
122
+
.. code:: json
123
+
124
+
{
125
+
"type": "IntegrationReply",
126
+
"value": {
127
+
"id": "0000-0003-3856-1682",
128
+
"type": "IntegrationLegacyType",
129
+
"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"
130
+
}
131
+
}
132
+
133
+
134
+
**State B — Migrated to new schema (but still old data/semantics)**
135
+
136
+
After we migrate to the new API integration, the existing data will still have the same semantics as before, but it will be stored in a different way.
137
+
138
+
**What is stored vs legacy:**
139
+
140
+
- ``id`` is **removed**
141
+
- ``type`` becomes `"IntegrationType"` (instead of `"IntegrationLegacyType"`)
142
+
- ``raw`` is **introduced but empty**: `"raw": {}`
143
+
144
+
.. code:: json
145
+
146
+
{
147
+
"type": "IntegrationReply",
148
+
"value": {
149
+
"raw": {},
150
+
"type": "IntegrationType",
151
+
"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"
152
+
}
153
+
}
154
+
155
+
156
+
**State C — New integration (ApiIntegration) with “raw = HTTP response” semantics**
157
+
158
+
If we delete the old answer and fill in a new one, or we are filling a new integration question with the new API integration, the data will be stored in a different way. The semantics of the stored data will also be different, as the `raw` field will now carry the raw HTTP response from the API, which can be used in the answer template.
159
+
160
+
**What is stored**
161
+
162
+
- ``raw`` = **the actual integration HTTP response item/body** (the “source of truth”)
163
+
- ``value`` = **custom text** (if user fills their own text) or **rendered template** (how the answer is presented in the UI, rendered from the ``raw`` data using the answer template)
0 commit comments