Skip to content

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)

GET /agents/{agentId}/datasets/user/{userIdentifier}

List all files for a specific user.


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


Request
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);
Response
{
"files": [
"sales_report_q4.csv",
"customer_data.json"
]
}
curl -X GET "https://app.inconvo.ai/api/v1/agents/agt_123/datasets/user/user_123" \
-H "Authorization: Bearer $INCONVO_API_KEY"
Response
{
"files": [
"sales_report_q4.csv",
"customer_data.json"
]
}

GET /agents/{agentId}/datasets/context/{contextKey}/{contextValue}

List all files shared with users matching a context value.


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).


Request
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);
Response
{
"files": [
"shared_pricing.csv",
"org_config.json"
]
}
curl -X GET "https://app.inconvo.ai/api/v1/agents/agt_123/datasets/context/organisationId/1" \
-H "Authorization: Bearer $INCONVO_API_KEY"
Response
{
"files": [
"shared_pricing.csv",
"org_config.json"
]
}