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 /agents/{agentId}/datasets/user/{userIdentifier}
List all files for a specific user.
Path Parameters
Section titled “Path Parameters”agentId string Required
The agent id
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
import Inconvo from "@inconvoai/node";
const inconvo = new Inconvo({ apiKey: process.env.INCONVO_API_KEY});
const files = await inconvo.agents.datasets.user.list( "user_123", { agentId: "agt_123" });
console.log(files);{ "files": [ "sales_report_q4.csv", "customer_data.json" ]}Context-Scoped Files
Section titled “Context-Scoped Files”GET /agents/{agentId}/datasets/context/{contextKey}/{contextValue}
List all files shared with users matching a context value.
Path Parameters
Section titled “Path Parameters”agentId string Required
The agent id
contextKey string Required
The context key used for scoping (e.g., organisationId, teamId). This should match a key defined in your userContext configuration.
contextValue string | number Required
The context value to match (e.g., 1, org_456, team_789).
import Inconvo from "@inconvoai/node";
const inconvo = new Inconvo({ apiKey: process.env.INCONVO_API_KEY});
const files = await inconvo.agents.datasets.context.list( 1, { agentId: "agt_123", contextKey: "organisationId" });
console.log(files);{ "files": [ "shared_pricing.csv", "org_config.json" ]}