GET
/
logs
/
exports
/
{exportId}
from portkey_ai import Portkey

portkey = Portkey(
  api_key="PORTKEY_API_KEY"
)

res = portkey.logs.exports.retrieve(
  export_id="EXPORT_ID"
)

print(res)
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "filters": {
    "time_of_generation_min": "2023-11-07T05:31:56Z",
    "time_of_generation_max": "2023-11-07T05:31:56Z",
    "total_units_min": 123,
    "total_units_max": 123,
    "cost_min": 123,
    "cost_max": 123,
    "ai_model": "<string>",
    "prompt_token_min": 123,
    "prompt_token_max": 123,
    "completion_token_min": 123,
    "completion_token_max": 123,
    "status_code": "<string>",
    "metadata": {},
    "ai_org_model": "openai__gpt-3.5-turbo, anthropic__claude-2.1",
    "weighted_feedback_min": 123,
    "weighted_feedback_max": 123,
    "virtual_keys": "<string>",
    "trace_id": "<string>",
    "configs": "<string>",
    "workspace_slug": "<string>",
    "prompt_slug": "<string>"
  },
  "requested_data": [
    "id"
  ],
  "status": "draft",
  "description": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "last_updated_at": "2023-11-07T05:31:56Z",
  "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "object": "export"
}

Authorizations

x-portkey-api-key
string
header
required

Path Parameters

exportId
string
required

Response

200 - application/json
Successful response
id
string
required
organisation_id
string
required
filters
object
required
requested_data
enum<string>[]
required
Available options:
id,
trace_id,
created_at,
request,
response,
is_success,
ai_org,
ai_model,
req_units,
res_units,
total_units,
request_url,
cost,
cost_currency,
response_time,
response_status_code,
mode,
config,
prompt_slug,
metadata
status
enum<string>
required
Available options:
draft,
in_progress,
success,
failed,
stopped
description
string
required
created_at
string
required
last_updated_at
string
required
created_by
string
required
workspace_id
string
required
object
enum<string>
required
Available options:
export