43 lines
2.5 KiB
JSON
43 lines
2.5 KiB
JSON
{
|
|
"type": "API Response Schema",
|
|
"definition": {
|
|
"text": "This node represents the mapping of the JSON response of the API into a data structure built by API Response Field nodes.",
|
|
"updated": 1621021486718
|
|
},
|
|
"paragraphs": [
|
|
{
|
|
"style": "Text",
|
|
"text": "The API Map assumes the API Server will respond with string formatted in JSON. This means that the response will be a data structure of nestled objects and arrays. Users will need to map the response format into an API Response Schema by adding children to this node and to this node's children. All these descendants are of the same Node Type API Response Field.",
|
|
"updated": 1622312357188
|
|
},
|
|
{
|
|
"style": "Title",
|
|
"text": "Configuration"
|
|
},
|
|
{
|
|
"style": "List",
|
|
"text": "nodePath: the response from the server might include some header type of data and the actual data requested. Since the response is a JSON object, then the actual data might be located somewhere within the structure of that object. This property allows you to declare the path to the actual data requested, so as to jump the header-like information."
|
|
},
|
|
{
|
|
"style": "Subtitle",
|
|
"text": "Why do we need to jump the header?"
|
|
},
|
|
{
|
|
"style": "Text",
|
|
"text": "In many cases it will be necesary to make several queries to the API Server in order to fetch all the data (think of pagination). Each page of data arrives at a certain location within the reponse data structure. That location is the one considered the Data Root. "
|
|
},
|
|
{
|
|
"style": "Text",
|
|
"text": "If you Endpoint does not support pagination, it is still a good practice to define which is the Data Root."
|
|
},
|
|
{
|
|
"style": "Important",
|
|
"text": "Most Record Properties will be referencing API Response Field nodes that are under the Data Root you defined, but there might be one or two that are not there, but under the response data structure in general, or at a section that could be considered a header. In that case, there is some special step you need to follow. At the API Response Field Reference node cofing, you will need to set up a nodePath property as explained below."
|
|
},
|
|
{
|
|
"style": "Text",
|
|
"text": "Check the API Response Field Reference node for details on how to setup this property.",
|
|
"updated": 1621971441459
|
|
}
|
|
]
|
|
} |