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
Copy file name to clipboardExpand all lines: docs/resources/control-flow/backend-logic/api/rest-api.md
+75-23Lines changed: 75 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -569,38 +569,70 @@ Learn more about **[JSONPath](https://www.rfc-editor.org/rfc/rfc9535.html)** and
569
569
:::
570
570
571
571
### Adding JSON Path
572
+
You can effortlessly define and manage **JSON Paths** for your API calls in FlutterFlow to parse and extract the data you need. Once added you can [use](#using-json-path) them as **Predefined Path** while accessing the **JSON Body**.
572
573
573
-
To add JSON path:
574
+
First, [create and test](../api/create-test-api-calls.md) your API call. Inside the **JSON Paths** section, click **+ Add JSON Path**, enter your **JSON Path**, and assign it a name. If the expression is valid, a preview of the response appears under **Response Preview**. Click the **Preview** icon to see the full response. If the response contains a list of items, the **Is List** option will be enabled automatically.
574
575
575
-
1. First, [create and test](../api/create-test-api-calls.md) your API call.
576
-
577
-
2. Inside the **JSON Paths** section, click on the **+ Add JSON Path**.
578
-
3. Enter your **JSON Path** and give it a **Name**.
579
-
4. If you entered the valid expression, you'll see the starting part of the response under the **Response Preview** column. To see the complete response, click on the **Preview** icon.
580
-
5. If the returned response is a list of items, by default, **Is List** will be checked; however, if you want to convert the response into the list explicitly, checkmark it.
581
-
6. We also recommend all the possible JSON paths (under the **Recommended** tab) that might include what you are looking for.
582
-
583
-
1. To add the recommended JSON path, checkmark the **Selected**, open the **Selected** tab,
While accessing values from an API Call, you can either enter the custom JSON path or use the already created JSON path.
594
-
595
-
To use the already added JSON path:
607
+
While accessing values from an API Call, you can either enter the custom JSON path or use the [predefined JSON path](#adding-json-path).
596
608
597
-
1. Select your API response.
598
-
2. Set the **API response Options** to **JSON Body**.
599
-
3. Set the **Available Options** to **JSON Path**.
600
-
4. Set the **JSON Path Name** to the one that you created earlier.
609
+
To use a predefined JSON Path, first, select your API response. Then, set the **API Response Options** to **JSON Body** and the **Available Options** to **JSON Path** or **Predefined Path**. Finally, specify the JSON Path Name or select from the predefined JSON Path to map the extracted data for use in your app.
Why is my Predefined Path not showing any options?
780
+
</summary>
781
+
<p>
782
+
This often happens if you added the Predefined Path but forgot to save the API call in FlutterFlow. Ensure you click Save after making any changes to your API call so FlutterFlow can properly recognize and display your predefined paths.
783
+
</p>
784
+
</details>
785
+
786
+
<details>
787
+
<summary>
788
+
Why am I getting a “Current variable is not valid” error?
789
+
</summary>
790
+
<p>
791
+
This error typically indicates that the widget isn’t receiving the data type it expects. For example, passing a list of colors directly to a text widget will trigger the error. In such cases, convert or supply the data as a string (or another compatible type) so the widget can properly display it.
0 commit comments