Check File Usage
Check which agents are using a specific file.curl -X GET "https://api.example.com/api/v1/agent_files/1/usage" \
-H "X-API-Key: your-api-key-here"
const fileId = 1;
const response = await fetch(`https://api.example.com/api/v1/agent_files/${fileId}/usage`, {
method: 'GET',
headers: {
'X-API-Key': 'your-api-key-here'
}
});
const data = await response.json();
import requests
file_id = 1
headers = {
'X-API-Key': 'your-api-key-here'
}
response = requests.get(
f'https://api.example.com/api/v1/agent_files/{file_id}/usage',
headers=headers
)
data = response.json()
{
"status": {
"code": 200,
"message": "File usage retrieved successfully"
},
"data": {
"file_id": 1,
"file_name": "product-catalog.pdf",
"agents": [
{
"id": "123",
"name": "Customer Support Agent"
},
{
"id": "456",
"name": "Sales Agent"
}
]
}
}
