Skip to main content

Managing Provider Items

Storage Operations

Provider Items are files and folders stored in your connected providers. This guide covers all CRUD operations on these items. To discover your providers first, see Browsing Providers.

No Automatic Indexation

Operating on provider items (uploading, creating folders, renaming, deleting) does not trigger document indexation. To index a file, you must explicitly create an EliseFile from it.

The key Concept

All provider item operations identify files and folders using a single key string — the full path within the provider:

Item typeKey formatExample
File"path/to/file.pdf""reports/research-paper.pdf"
Folder"path/to/folder/" (trailing /)"reports/2024/"
Root"" (empty string)""

Listing Items

Browse the contents of a provider directory. Results use cursor-based pagination, which is different from the page-based pagination used by other endpoints.

curl -s "https://<api-domain>/api/core/providers/${PROVIDER_ID}/items?key=reports/&limit=50" \
-H "Authorization: Bearer <your-pat>"

Query Parameters

ParameterTypeDefaultDescription
keystring""Directory key to list (must end with / or be empty)
qstring--Filter items by name
cursorstring--Pagination cursor from a previous response
limitinteger50Maximum number of items to return

Paginating Through Results

When nextCursor is non-null, more items are available. Pass it as the cursor parameter to fetch the next page.

def list_all_items(provider_id: str, key: str = "") -> list[ProviderItem]:
all_items: list[ProviderItem] = []
cursor = None

while True:
params: dict = {"key": key, "limit": 50}
if cursor:
params["cursor"] = cursor

response = client.get(f"/providers/{provider_id}/items", params=params)
response.raise_for_status()
result = ListItemsResponse.model_validate(response.json())

all_items.extend(result.items)

if not result.next_cursor:
break
cursor = result.next_cursor

return all_items

Uploading a File

Upload a file to a provider directory using multipart form data. This stores the file in the provider but does not trigger indexation.

curl -X POST "https://<api-domain>/api/core/providers/${PROVIDER_ID}/items?key=reports/" \
-H "Authorization: Bearer <your-pat>" \
-F "file=@document.pdf"
Large Files

For files larger than a few megabytes, use the presigned upload flow instead. See Common Patterns -- Large File Upload.

Creating a Folder

curl -X POST "https://<api-domain>/api/core/providers/${PROVIDER_ID}/items" \
-H "Authorization: Bearer <your-pat>" \
-H "Content-Type: application/json" \
-d '{"type": "FOLDER", "key": "reports/new-project/"}'

Renaming an Item

curl -X PATCH "https://<api-domain>/api/core/providers/${PROVIDER_ID}/items?newName=renamed-file.pdf" \
-H "Authorization: Bearer <your-pat>" \
-H "Content-Type: application/json" \
-d '{"key": "reports/old-file.pdf", "type": "FILE"}'

Deleting an Item

curl -X DELETE "https://<api-domain>/api/core/providers/${PROVIDER_ID}/items" \
-H "Authorization: Bearer <your-pat>" \
-H "Content-Type: application/json" \
-d '{"key": "reports/old-file.pdf", "type": "FILE"}'

Downloading a File

There are two ways to download a file depending on whether the provider supports presigned URLs.

Getting a Download URL

Request a download URL for a file. If the provider supports presigned URLs (S3, Azure, GCS), you get a time-limited direct link. Otherwise, the API returns a proxy URL that streams the content through the server.

ParameterRequiredDescription
keyYesFull file key
expirationMinutesNoCustom expiry duration in minutes for presigned URLs (provider default if omitted)
curl -s "https://<api-domain>/api/core/providers/${PROVIDER_ID}/items/download-url?key=reports/document.pdf&expirationMinutes=60" \
-H "Authorization: Bearer <your-pat>"

Direct Content Download

For providers that do not support presigned URLs, you can also stream file content directly through the API proxy endpoint:

curl -s "https://<api-domain>/api/core/providers/${PROVIDER_ID}/items/content?key=reports/document.pdf" \
-H "Authorization: Bearer <your-pat>" \
-o document.pdf

Next Steps

Now that you can manage files in your storage providers:

  1. Index files to create EliseFiles and trigger AI-powered analysis
  2. Organize into collections for structured workflows
  3. Large file uploads for efficient upload of big files
API Reference

See the Provider Items endpoints in the API Reference for complete request/response schemas.