Skip to content

Commit 191529c

Browse files
authored
Merge pull request #416 from FlutterFlow/feature/add-project-apis
Add endpoint for listing projects
2 parents f954d87 + a4ca41d commit 191529c

File tree

1 file changed

+81
-4
lines changed

1 file changed

+81
-4
lines changed

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

Lines changed: 81 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,11 @@ Below is a list of available API endpoints with their methods and usage descript
105105

106106
| Endpoint | Method | Purpose |
107107
| --------------------------- | ------ | --------------------------------------------- |
108-
| `/listPartitionedFileNames` | GET | List available YAML file names for a project |
109-
| `/projectYamls` | GET | Export/download YAML files from a project |
110-
| `/validateProjectYaml` | POST | Validate YAML content before applying changes |
111-
| `/updateProjectYaml` | POST | Update project configuration via YAML |
108+
| `/listPartitionedFileNames` | GET | List available YAML file names for a project. |
109+
| `/l/listProjects` | POST | Retrieve metadata for all projects. |
110+
| `/projectYamls` | GET | Export/download YAML files from a project. |
111+
| `/validateProjectYaml` | POST | Validate YAML content before applying changes. |
112+
| `/updateProjectYaml` | POST | Update project configuration via YAML. |
112113

113114

114115
### List File Names
@@ -152,7 +153,83 @@ curl -X GET \
152153
-H 'Authorization: Bearer YOUR_API_TOKEN'
153154
```
154155

156+
### List Projects
155157

158+
This endpoint retrieves a list of FlutterFlow projects associated with your account, including detailed metadata such as project name, owner email, team info, collaboration settings, and versioning data.
159+
160+
#### Endpoint
161+
162+
`POST /l/listProjects`
163+
164+
#### Request Body
165+
166+
```jsx
167+
{
168+
"project_type": "ALL",
169+
"deserialize_response": true
170+
}
171+
```
172+
- **`project_type: "ALL"`**: Use "ALL" to include personal, team, and shared projects, or "TEAM_RESOURCE" to include only team-associated projects.
173+
174+
- **`deserialize_response: true`**: Ensures the response is returned as human-readable JSON instead of a base64-encoded protobuf.
175+
176+
:::tip
177+
It’s recommended to use the default options: `"ALL"` for `project_type` and `true` for `deserialize_response` for the most complete and readable results.
178+
:::
179+
180+
#### Response
181+
182+
Returns a JSON object containing an array of projects under the `entries` key. Each entry contains the project ID and rich metadata, including collaborators, app icons, sessions, and branching information.
183+
184+
```jsx
185+
{
186+
"success": true,
187+
"reason": null,
188+
"value": {
189+
"entries": [
190+
{
191+
"id": "XXXXXXXXXXXXXXX",
192+
"project": {
193+
"name": "Sample Project A",
194+
"ownerEmail": "[email protected]",
195+
"createdAt": "2024-08-08T11:01:12.427Z",
196+
"updatedAt": "2024-08-08T11:01:18.669Z",
197+
"teamRef": {
198+
"path": "teams/TEAM_ID_1"
199+
},
200+
"mainBranchRef": {
201+
"path": "projects/sample-project-id"
202+
},
203+
"numBranches": 2,
204+
"otherMembers": {
205+
"USER_XYZ": {
206+
"email": "[email protected]",
207+
"accessLevel": "EDITOR"
208+
}
209+
},
210+
"activeSessions": {
211+
"SESSION_ID_1": {
212+
"lastSuccessfulUpdate": "2024-08-06T18:41:56.569Z"
213+
}
214+
},
215+
"totalNumUpdates": 2177
216+
}
217+
}
218+
]
219+
}
220+
}
221+
```
222+
223+
#### Example Usage
224+
225+
```jsx
226+
curl 'https://api.flutterflow.io/v2/l/listProjects' \
227+
-H 'authorization: Bearer YOUR_API_TOKEN' \
228+
--data-raw '{
229+
"project_type": "ALL",
230+
"deserialize_response": true
231+
}'
232+
```
156233

157234
### Download Project YAML
158235

0 commit comments

Comments
 (0)