List Dataset Files
Retrieve a list of files from the dataset for a specific user or context scope.
Datasets can be scoped in two ways:
- User-scoped: Files accessible only to a specific user (identified by
userIdentifier) - Context-scoped: Files shared with all users matching a context value (e.g., all users in
orgId=123)
User-Scoped Files
Section titled “User-Scoped Files”GET /datasets/user/{userIdentifier}
List all files for a specific user.
Path Parameters
Section titled “Path Parameters”userIdentifier string Required
The unique identifier for the end-user. This should match the userIdentifier used when uploading files.
Examples: user_123, john.doe@example.com
Request
import Inconvo from "@inconvoai/node";
const inconvo = new Inconvo({ apiKey: process.env.INCONVO_API_KEY});
const files = await inconvo.datasets.user.list({ userIdentifier: "user_123"});
console.log(files);{ "files": [ "sales_report_q4.csv", "customer_data.json" ]}Context-Scoped Files
Section titled “Context-Scoped Files”GET /datasets/context/{contextKey}/{contextValue}
List all files shared with users matching a context value.
Path Parameters
Section titled “Path Parameters”contextKey string Required
The context key used for scoping (e.g., orgId, teamId). This should match a key defined in your userContext configuration.
contextValue string Required
The context value to match (e.g., org_456, team_789).
Request
import Inconvo from "@inconvoai/node";
const inconvo = new Inconvo({ apiKey: process.env.INCONVO_API_KEY});
const files = await inconvo.datasets.context.list({ contextKey: "orgId", contextValue: "org_456"});
console.log(files);{ "files": [ "shared_pricing.csv", "org_config.json" ]}