Folder Imports
Manage your videos, ask questions, and build applications with the Platform API. Explore the operations below for request details, responses, and examples.
No matching documentation. Try a different search.
Folder Imports
Connect a cloud folder (Google Drive, Dropbox, Box or OneDrive) and new videos in it are imported into the project automatically and processed like uploads. Stored credentials are never returned.
GET/api/v1/projects/:projectId/ingest/connectorsList folder connections
List folder connections
Also returns oauth_providers: the providers you can connect with on this deployment.
{
"data": [
{
"id": "CONNECTOR_ID",
"name": "Store cameras",
"remote_type": "drive",
"remote_path": "Exports/Store 12",
"interval_minutes": 10,
"enabled": true,
"last_sync_at": "2026-10-01T14:10:00Z",
"last_status": "ok",
"last_error": null,
"files_ingested": 37,
"config": { "configured": true, "keys": ["scope", "client_id", "client_secret", "token"] }
}
],
"oauth_providers": ["drive", "dropbox", "box", "onedrive"]
}POST/api/v1/projects/:projectId/ingest/connectors/oauth/startConnect a cloud folder
Connect a cloud folder
Returns an auth_url; open it in a browser so the folder owner can approve access. Once they approve, the connection is created with the settings you sent. provider is one of the oauth_providers from the list call. Requires write access.
curl -X POST https://platform.endlessai.com/api/v1/projects/PROJECT_ID/ingest/connectors/oauth/start \
-H "X-Api-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "drive",
"name": "Store cameras",
"remote_path": "Exports/Store 12",
"interval_minutes": 10
}'import requests
resp = requests.post(
f"{BASE}/projects/{PROJECT_ID}/ingest/connectors/oauth/start",
headers={"X-Api-Key": API_KEY},
json={
"provider": "drive",
"name": "Store cameras",
"remote_path": "Exports/Store 12",
"interval_minutes": 10,
},
)
print(resp.json()["auth_url"]) # open this in a browserconst res = await fetch(
`${BASE}/projects/${projectId}/ingest/connectors/oauth/start`,
{
method: "POST",
headers: { "X-Api-Key": API_KEY, "Content-Type": "application/json" },
body: JSON.stringify({
provider: "drive",
name: "Store cameras",
remote_path: "Exports/Store 12",
interval_minutes: 10,
}),
}
);
const { auth_url } = await res.json();
window.open(auth_url, "_blank");POST/api/v1/projects/:projectId/ingest/connectors/:connectorId/testTest a folder connection
Test a folder connection
Checks the folder can be reached and shows what a sync would import. Nothing is imported. An unreachable folder returns ok: false with the error.
// Response
{
"ok": true,
"video_files_found": 12,
"sample": ["cam1/2026-10-01_0900.mp4", "cam1/2026-10-01_1000.mp4"]
}POST/api/v1/projects/:projectId/ingest/connectors/:connectorId/syncSync now
Sync now
Imports up to 3 new files now instead of waiting for the next interval; the response gives ingested and remaining. A file is never imported twice, even if its video was deleted. A connection also has a daily import allowance; files past it wait for the next day and are counted in waiting. Requires write access.
DELETE/api/v1/projects/:projectId/ingest/connectors/:connectorIdRemove a folder connection
Remove a folder connection
Stops syncing the folder. Videos already imported stay in the project. Requires write access.