Skip to content

Commit f47d317

Browse files
committed
Added arcades
1 parent c4d639b commit f47d317

File tree

2 files changed

+277
-2
lines changed

2 files changed

+277
-2
lines changed

docs/resources/projects/settings/project-apis.md

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,13 +351,68 @@ curl -X POST \
351351

352352
Let’s walk through a practical example of updating an app state variable using the Project APIs.
353353

354+
:::info
355+
You can download and use <a href="../../../../static/jsons/FlutterFlow_APIs.postman_collection.json" download><strong>Postman Collection</strong></a> to quickly test all FlutterFlow Project APIs with pre-filled headers, parameters, and sample requests.
356+
:::
357+
358+
359+
354360
First, we use the `/listPartitionedFileNames` endpoint to check if the `app-state` file exists in the project. Once confirmed, we call the `/projectYamls` endpoint to download the YAML file. The API returns a base64-encoded string representing a zip file, which we decode and download using tools like [Base64 to ZIP](https://b64encode.com/tools/base64-to-zip/).
355361

356-
![image]
362+
<div style={{
363+
position: 'relative',
364+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
365+
height: 0,
366+
width: '100%'}}>
367+
<iframe
368+
src="https://demo.arcade.software/w2J3uhp0CbFusSBblbos?embed&show_copy_link=true"
369+
title=""
370+
style={{
371+
position: 'absolute',
372+
top: 0,
373+
left: 0,
374+
width: '100%',
375+
height: '100%',
376+
colorScheme: 'light'
377+
}}
378+
frameborder="0"
379+
loading="lazy"
380+
webkitAllowFullScreen
381+
mozAllowFullScreen
382+
allowFullScreen
383+
allow="clipboard-write">
384+
</iframe>
385+
</div>
386+
<p></p>
357387

358388
Next, we open the `app-state.yaml` file and update the `enableDarkMode` variable by setting its `persisted` value to `true`. We then convert the updated YAML into a properly escaped single line string and validate it using the `/validateProjectYaml` endpoint. If validation succeeds, we send the final update using the `/updateProjectYaml` endpoint.
359389

360-
![image]
390+
391+
<div style={{
392+
position: 'relative',
393+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
394+
height: 0,
395+
width: '100%'}}>
396+
<iframe
397+
src="https://demo.arcade.software/shyaylXuBXG6F97Pv0ir?embed&show_copy_link=true"
398+
title=""
399+
style={{
400+
position: 'absolute',
401+
top: 0,
402+
left: 0,
403+
width: '100%',
404+
height: '100%',
405+
colorScheme: 'light'
406+
}}
407+
frameborder="0"
408+
loading="lazy"
409+
webkitAllowFullScreen
410+
mozAllowFullScreen
411+
allowFullScreen
412+
allow="clipboard-write">
413+
</iframe>
414+
</div>
415+
<p></p>
361416

362417
## Error Handling
363418
This section outlines how the API handles errors, including common HTTP response codes and detailed validation feedback for YAML processing issues.
Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
{
2+
"info": {
3+
"_postman_id": "1dd71b5a-8093-4892-94d3-968c581bb105",
4+
"name": "FlutterFlow APIs",
5+
"description": "The FlutterFlow Project APIs allow you to programmatically read, write, and validate YAML configuration files for FlutterFlow projects through REST endpoints. Using these APIs, you can automate project management tasks, integrate continuous integration and delivery (CI/CD) workflows, and apply bulk configuration updates without manual interactions with the FlutterFlow user interface.",
6+
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
7+
"_exporter_id": "494689"
8+
},
9+
"item": [
10+
{
11+
"name": "List all Files",
12+
"request": {
13+
"auth": {
14+
"type": "bearer",
15+
"bearer": [
16+
{
17+
"key": "token",
18+
"value": "{{api-key}}",
19+
"type": "string"
20+
}
21+
]
22+
},
23+
"method": "GET",
24+
"header": [],
25+
"url": {
26+
"raw": "{{ff-url}}/listPartitionedFileNames?projectId={{project-id}}",
27+
"host": [
28+
"{{ff-url}}"
29+
],
30+
"path": [
31+
"listPartitionedFileNames"
32+
],
33+
"query": [
34+
{
35+
"key": "projectId",
36+
"value": "{{project-id}}"
37+
}
38+
]
39+
}
40+
},
41+
"response": []
42+
},
43+
{
44+
"name": "Download File",
45+
"request": {
46+
"auth": {
47+
"type": "bearer",
48+
"bearer": [
49+
{
50+
"key": "token",
51+
"value": "{{api-key}}",
52+
"type": "string"
53+
}
54+
]
55+
},
56+
"method": "GET",
57+
"header": [],
58+
"url": {
59+
"raw": "{{ff-url}}/projectYamls?projectId={{project-id}}&fileName={{filename}}",
60+
"host": [
61+
"{{ff-url}}"
62+
],
63+
"path": [
64+
"projectYamls"
65+
],
66+
"query": [
67+
{
68+
"key": "projectId",
69+
"value": "{{project-id}}"
70+
},
71+
{
72+
"key": "fileName",
73+
"value": "{{filename}}"
74+
}
75+
]
76+
}
77+
},
78+
"response": []
79+
},
80+
{
81+
"name": "Download Project",
82+
"request": {
83+
"auth": {
84+
"type": "bearer",
85+
"bearer": [
86+
{
87+
"key": "token",
88+
"value": "{{api-key}}",
89+
"type": "string"
90+
}
91+
]
92+
},
93+
"method": "GET",
94+
"header": [],
95+
"url": {
96+
"raw": "{{ff-url}}/projectYamls?projectId={{project-id}}",
97+
"host": [
98+
"{{ff-url}}"
99+
],
100+
"path": [
101+
"projectYamls"
102+
],
103+
"query": [
104+
{
105+
"key": "projectId",
106+
"value": "{{project-id}}"
107+
}
108+
]
109+
}
110+
},
111+
"response": []
112+
},
113+
{
114+
"name": "Validate YAML",
115+
"request": {
116+
"auth": {
117+
"type": "bearer",
118+
"bearer": [
119+
{
120+
"key": "token",
121+
"value": "{{api-key}}",
122+
"type": "string"
123+
}
124+
]
125+
},
126+
"method": "POST",
127+
"header": [
128+
{
129+
"key": "Content-Type",
130+
"value": "application/json",
131+
"type": "text"
132+
}
133+
],
134+
"body": {
135+
"mode": "raw",
136+
"raw": "{\n \"projectId\": \"ecommerce-flow-n0vjps\",\n \"fileKey\": \"app-state\",\n \"fileContent\": \"fields:\\n - parameter:\\n identifier:\\n name: enableDarkMode\\n key: k3xdwhny\\n dataType:\\n scalarType: Boolean\\n description: \\\"\\\"\\n persisted: true\\n - parameter:\\n identifier:\\n name: orders\\n key: hskfzqii\\n dataType:\\n scalarType: String\\n description: \\\"\\\"\\n persisted: true\\n - parameter:\\n identifier:\\n name: totalAmount\\n key: lf9puz1e\\n dataType:\\n scalarType: Double\\n description: \\\"\\\"\\n persisted: false\"\n}",
137+
"options": {
138+
"raw": {
139+
"language": "json"
140+
}
141+
}
142+
},
143+
"url": {
144+
"raw": "{{ff-url}}/validateProjectYaml",
145+
"host": [
146+
"{{ff-url}}"
147+
],
148+
"path": [
149+
"validateProjectYaml"
150+
]
151+
}
152+
},
153+
"response": []
154+
},
155+
{
156+
"name": "Update Project",
157+
"request": {
158+
"auth": {
159+
"type": "bearer",
160+
"bearer": [
161+
{
162+
"key": "token",
163+
"value": "{{api-key}}",
164+
"type": "string"
165+
}
166+
]
167+
},
168+
"method": "POST",
169+
"header": [
170+
{
171+
"key": "Content-Type",
172+
"value": "application/json",
173+
"type": "text"
174+
}
175+
],
176+
"body": {
177+
"mode": "raw",
178+
"raw": "{\n \"projectId\": \"ecommerce-flow-n0vjps\",\n \"fileKeyToContent\": {\n \"app-state\": \"fields:\\n - parameter:\\n identifier:\\n name: enableDarkMode\\n key: k3xdwhny\\n dataType:\\n scalarType: Boolean\\n description: \\\"\\\"\\n persisted: true\\n - parameter:\\n identifier:\\n name: orders\\n key: hskfzqii\\n dataType:\\n scalarType: String\\n description: \\\"\\\"\\n persisted: true\\n - parameter:\\n identifier:\\n name: totalAmount\\n key: lf9puz1e\\n dataType:\\n scalarType: Double\\n description: \\\"\\\"\\n persisted: false\"\n }\n}\n",
179+
"options": {
180+
"raw": {
181+
"language": "json"
182+
}
183+
}
184+
},
185+
"url": {
186+
"raw": "{{ff-url}}/updateProjectYaml",
187+
"host": [
188+
"{{ff-url}}"
189+
],
190+
"path": [
191+
"updateProjectYaml"
192+
]
193+
}
194+
},
195+
"response": []
196+
}
197+
],
198+
"variable": [
199+
{
200+
"key": "ff-url",
201+
"value": "https://api.flutterflow.io/v2",
202+
"type": "default"
203+
},
204+
{
205+
"key": "api-key",
206+
"value": "",
207+
"type": "default"
208+
},
209+
{
210+
"key": "project-id",
211+
"value": "",
212+
"type": "default"
213+
},
214+
{
215+
"key": "filename",
216+
"value": "",
217+
"type": "default"
218+
}
219+
]
220+
}

0 commit comments

Comments
 (0)