List workspace security project inventory
Changed onPlan: Enterprise
Scope: workspaces:read
Returns workspace projects with review priorities, security finding counts, activity counts, and publishing details. Use GET /v1/projects/{project_id}/security-scans/{scan_id}/findings for individual findings. Supports search and filters. By default, projects are ordered by most recently edited, or search relevance when query is set. Project and membership data is eventually consistent and may not immediately reflect recent changes.
Request
- Base URLhttps://api.lovable.dev
- Auth
- API key in header Lovable-API-Key
- or HTTP bearer
Path parameters
Workspace ID.
Query parameters
Maximum number of items to return per page.
Pass pagination.next_cursor from the previous response to fetch the next page. Omit for the first page; keep the same filters and sort order across pages.
Free-text search across project name and owner. Terms shorter than 3 characters are ignored. A full project ID matches that project exactly.
Sort field. Omit for the default order: most recently edited first, or best matches first when query is set. Ties break by project id unless noted. review_priority: unscored projects last in both directions, ties by risk score. name: projects without a name first ascending and last descending. publish_audience: ranks not published, then workspace, custom, public. last_edited_at: falls back to the last update time. risk_factor_count, open_pii_finding_count, external_access_rank: missing counts as 0, ties by name; external_access_rank ranks external collaborators above shared users, publicly published apps, then none; open_pii_finding_count returns 402 when personal data detection is not available on the workspace plan. edits_* and visitors_*: missing counts as 0. last_security_scan_at: never scanned last in both directions. relevance: requires query, ties by last update time.
Direction for sort_by. Defaults to descending. Requires sort_by.
Filter by the activity_group field: time since the last edit, or last update for projects never edited, using 14-day and 60-day boundaries. Repeat to match any value. Omit for no filter.
[ "last_14_days" ]
Filter by whether the project is published. Omit for no filter.
Filter by the visibility field. Repeat to match any of the values. Omit for no filter.
[ "workspace_edit" ]
Filter by the has_pii signal. false selects projects without detected personal data. Omit for no filter. Returns 402 when personal data detection is not available on the workspace plan.
Filter by whether the project has a connected service. false selects projects without one. Omit for no filter.
Filter published projects by the publish_audience field. Repeat to match any value. Omit for no filter. Requires is_published to be true or omitted.
[ "workspace" ]
Filter by Security Center review priority. Repeat to match any selected priority; unscored matches projects not yet scored. Omit to include every project.
[ "needs_review" ]
Finding type IDs returned by GET /v1/workspaces/{workspace_id}/security-center/insights. Finding filters use the same category rules as project_count in that response. A project matching a more specific related type is excluded from the broader type. Repeat to match any selected type. Unknown IDs return 400. Types that depend on personal data detection return 402 when that feature is not available on the workspace plan.
[ "public_security_exposure" ]
Filter by the folder_id field: projects placed directly in the folder, not those in folders nested inside it. Repeat to match any of the folders, for example a folder and its children from GET /v1/workspaces/{workspace_id}/folders. Omit for no filter.
[ "fold_01jw3k9m2xq8r5v0c7d4e6f2gh" ]
Filter by whether the project is in a folder. false selects projects whose folder_id is null. Omit for no filter. Cannot be false when folder_id is set.
Headers
Stable API version to serve, as a YYYY-MM-DD date. Omit for the oldest supported stable version, currently 2026-09-11.
Comma-separated beta revision strings to enable on top of the stable version.
Response
OK
Example response
{
"activity_as_of": {
"edits_as_of": "2026-01-15T09:30:00Z",
"visitors_as_of": "2026-01-15T09:30:00Z"
},
"applied_finding": {
"category": "exposure",
"description": "Publicly published projects with error-level security findings.",
"id": "public_security_exposure",
"project_count": 12,
"review_priority": "needs_review",
"title": "Public app with security errors"
},
"as_of": "2026-01-15T09:30:00Z",
"data": [
{
"activity_group": "last_14_days",
"connectors": [
"supabase",
"stripe"
],
"description": "A single-page marketing site with a hero, feature grid, and signup form.",
"edge_functions": [
{
"name": "send-welcome-email"
}
],
"edit_count": 128,
"edits_24h": 4,
"edits_30d": 67,
"edits_7d": 21,
"folder_id": "fold_01jw3k9m2xq8r5v0c7d4e6f2gh",
"id": "prj_01jw3k9m2xq8r5v0c7d4e6f2gh",
"is_published": true,
"last_edited_at": "2026-01-15T09:30:00Z",
"last_security_scan_at": "2026-01-15T09:30:00Z",
"matched_reason": {
"category": "data",
"detail": "A public table exposes personal data to anonymous callers.",
"id": "public_pii_exposure",
"label": "Public PII exposure",
"review_priority": "needs_review",
"values": {
"connector_count": 2,
"edge_function_count": 3,
"error_count": 2,
"info_count": 8,
"open_pii_finding_count": 3,
"secret_count": 4,
"shared_user_count": 6,
"warning_count": 5
}
},
"message_count": 56,
"name": "Acme Landing Page",
"owner": {
"display_name": "Jane Cooper"
},
"publish_audience": "public",
"review_priority": "needs_review",
"review_priority_explanation": [
{
"category": "data",
"detail": "A public table exposes personal data to anonymous callers.",
"id": "public_pii_exposure",
"label": "Public PII exposure",
"review_priority": "needs_review"
}
],
"url": "https://acme-landing-page.lovable.app",
"visibility": "workspace_edit",
"visitors_24h": 35,
"visitors_30d": 840,
"visitors_7d": 210
}
],
"pagination": {
"has_more": true,
"next_cursor": "eyJ2IjoxLCJpZCI6InByal8wMWp3M2s5In0"
},
"total": 42
}Changes
- info
added the new optional
queryrequest parameterfolder_id - info
added the new optional
queryrequest parameteris_in_folder - info
added the required property
//to the response with the status
- info
- breaking
removed the required property
/////from the response with the status - breaking
removed the required property
///////from the response with the status - breaking
removed the required property
////from the response with the status - info
for the
headerrequest parameterLovable-Version, the format was generalized fromdateto no format - info
added the non-success response with the status
- info
added the required property
/////to the response with the status - info
added the required property
///////to the response with the status - info
added the required property
////to the response with the status
- breaking