Skip to main content
POST
/
api
/
public
/
v2
/
dataset-versions
/
add-request-log
Add Request Log to Draft Dataset
curl --request POST \
  --url https://api.promptlayer.com/api/public/v2/dataset-versions/add-request-log \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "dataset_group_id": 123,
  "request_log_id": 98765
}
'
{
  "success": true,
  "message": "Request log added to draft dataset",
  "draft_dataset_id": 789
}

Documentation Index

Fetch the complete documentation index at: https://docs.promptlayer.com/llms.txt

Use this file to discover all available pages before exploring further.

Add a request log as a row in the draft dataset version for a dataset group. PromptLayer extracts request inputs, metadata, scores, tags, prompt data, and response data into dataset columns.

Behavior Notes

  • A draft dataset version must already exist for the dataset group.
  • The request log and dataset group must belong to the same workspace.
  • New columns are automatically added from the request log’s available data fields.
  • If no draft exists, the endpoint returns 404.

Authorizations

X-API-KEY
string
header
required

Body

application/json
dataset_group_id
integer
required

ID of the dataset group containing the draft.

Required range: x >= 1
request_log_id
integer
required

ID of the request log to add as a dataset row.

Required range: x >= 1

Response

Request log added to draft dataset.

success
enum<boolean>
required
Available options:
true
message
string
required
draft_dataset_id
integer
required

ID of the draft dataset.