Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
313 changes: 313 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ tags:
description: Create and manage workspace members.
- name: Api-Keys
description: Create, List, Retrieve, Update, and Delete your Portkey Api keys.
- name: Logs Export
description: Exports logs service .
x-codeSamples: false
paths:
# Note: When adding an endpoint, make sure you also add it in the `groups` section, in the end of this file,
Expand Down Expand Up @@ -9118,6 +9120,159 @@ paths:
schema:
$ref: "#/components/schemas/WorkspaceWithUsers"

/logs/exports/{exportId}:
get:
tags:
- Logs Export
summary: Get a specific logs export
parameters:
- name: exportId
in: path
required: true
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/ExportItem"
put:
tags:
- Logs Export
summary: Update a logs export
parameters:
- name: exportId
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
workspace_id:
type: string
filters:
$ref: "#/components/schemas/FilterSchema"
required:
- workspace_id
- filters
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateExportResponse"

/logs/exports:
get:
tags:
- Logs Export
summary: Get all logs exports
parameters:
- name: workspace_id
in: query
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/ExportListResponse"
post:
tags:
- Logs Export
summary: Create log export
requestBody:
content:
application/json:
schema:
type: object
properties:
workspace_id:
type: string
filters:
$ref: "#/components/schemas/FilterSchema"
requested_data:
type: array
items:
type: string
required:
- workspace_id
- filters
- requested_data
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateExportResponse"

/logs/exports/{exportId}/start:
post:
tags:
- Logs Export
summary: Start log export
parameters:
- name: exportId
in: path
required: true
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/ExportTaskResponse"

/logs/exports/{exportId}/cancel:
post:
tags:
- Logs Export
summary: Cancel log export
parameters:
- name: exportId
in: path
required: true
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/ExportTaskResponse"

/logs/exports/{exportId}/download:
get:
tags:
- Logs Export
summary: Download log export
parameters:
- name: exportId
in: path
required: true
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/DownloadLogsResponse"

/api-keys/{type}/{sub-type}:
post:
tags:
Expand Down Expand Up @@ -15959,6 +16114,164 @@ components:
items:
type: object
$ref: '#/components/schemas/WorkspaceMember'
ExportListResponse:
type: object
properties:
object:
type: string
enum: [list]
total:
type: integer
data:
type: array
items:
$ref: '#/components/schemas/ExportItem'
ExportItem:
type: object
properties:
id:
type: string
format: uuid
organisation_id:
type: string
format: uuid
filters:
$ref: '#/components/schemas/FilterSchema'
requested_data:
type: array
items:
type: string
status:
type: string
enum: [draft]
description:
type: string
created_at:
type: string
format: date-time
last_updated_at:
type: string
format: date-time
created_by:
type: string
format: uuid
workspace_id:
type: string
format: uuid
object:
type: string
enum: [export]
required:
- id
- organisation_id
- filters
- requested_data
- status
- description
- created_at
- last_updated_at
- created_by
- workspace_id
- object
UpdateExportResponse:
type: object
properties:
id:
type: string
format: uuid
description: The unique identifier of the updated export
total:
type: integer
description: The total number of items in the export
object:
type: string
enum: [export]
description: The type of the object
required:
- id
- total
- object
ExportTaskResponse:
type: object
properties:
message:
type: string
description: A message indicating the status of the export task
object:
type: string
enum: [export]
description: The type of the object
required:
- message
- object
DownloadLogsResponse:
type: object
properties:
signed_url:
type: string
format: uri
description: A pre-signed URL for downloading the exported logs
required:
- signed_url
FilterSchema:
type: object
properties:
organisation_id:
type: string
time_of_generation_min:
type: string
format: date-time
time_of_generation_max:
type: string
format: date-time
external_user:
type: string
total_units_min:
type: integer
total_units_max:
type: integer
cost_min:
type: number
cost_max:
type: number
prompt:
type: string
ai_model:
type: string
prompt_token_min:
type: integer
prompt_token_max:
type: integer
completion_token_min:
type: integer
completion_token_max:
type: integer
status_code:
type: string
environment:
type: string
metadata_user:
type: string
metadata:
type: object
additionalProperties: true
prompt_id:
type: string
ai_org_model:
Comment thread
csgulati09 marked this conversation as resolved.
type: string
weighted_feedback_min:
type: number
weighted_feedback_max:
type: number
virtual_keys:
type: string
trace_id:
type: string
configs:
type: string
workspace_slug:
type: string


ApiKeyObject:
type: object
Expand Down