Retrieve a Log Export
Last updated
Was this helpful?
Last updated
Was this helpful?
from portkey_ai import Portkey
portkey = Portkey(
api_key="PORTKEY_API_KEY"
)
res = portkey.logs.exports.retrieve(
export_id="EXPORT_ID"
)
print(res)
Successful response
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"organisation_id": "123e4567-e89b-12d3-a456-426614174000",
"filters": {
"time_of_generation_min": "2025-04-24T06:13:44.844Z",
"time_of_generation_max": "2025-04-24T06:13:44.844Z",
"total_units_min": 1,
"total_units_max": 1,
"cost_min": 1,
"cost_max": 1,
"ai_model": "text",
"prompt_token_min": 1,
"prompt_token_max": 1,
"completion_token_min": 1,
"completion_token_max": 1,
"status_code": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"ai_org_model": "openai__gpt-3.5-turbo, anthropic__claude-2.1",
"weighted_feedback_min": 1,
"weighted_feedback_max": 1,
"virtual_keys": "text",
"trace_id": "text",
"configs": "text",
"workspace_slug": "text",
"prompt_slug": "text"
},
"requested_data": [
"id"
],
"status": "draft",
"description": "text",
"created_at": "2025-04-24T06:13:44.844Z",
"last_updated_at": "2025-04-24T06:13:44.844Z",
"created_by": "123e4567-e89b-12d3-a456-426614174000",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"object": "export"
}