POST
/
v0
/
logs
/
rename_field
curl --request POST \
  --url 'https://api.unify.ai/v0/logs/rename_field' \
  --header "Authorization: Bearer $UNIFY_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "project": "eval-project",
    "context": "test-context",
    "old_field_name": "score",
    "new_field_name": "score_new"
}'
{
    "info": "Field renamed successfully from 'old_name' to 'new_name'"
}

Renames a field across all logs in a project. This includes:

  • Updating the field type record
  • Renaming the field in all logs (regular and history)

The operation is atomic - either all renames succeed or none do.

Authorizations

Authorization
string
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

project
string
required

Name of the project the field belongs to.

context
string | null
default:
"default"

The context of the field to rename.

old_field_name
string
required

The current name of the field to rename.

new_field_name
string
required

The new name for the field.

curl --request POST \
  --url 'https://api.unify.ai/v0/logs/rename_field' \
  --header "Authorization: Bearer $UNIFY_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "project": "eval-project",
    "context": "test-context",
    "old_field_name": "score",
    "new_field_name": "score_new"
}'
{
    "info": "Field renamed successfully from 'old_name' to 'new_name'"
}