Skip to contentSkip to page list

Docs

Update Labels

Point a deploy label, such as production, at one of the evaluator's versions

PUT/api/v1/evaluators/{evaluatorId}/labels/{label}
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/evaluators/<evaluatorId>/labels/<label>"api_key = os.environ["LANGWATCH_API_KEY"]headers = {    "X-Auth-Token": api_key,    "Content-Type": "application/json",}payload = {}​response = requests.put(    origin + path,    headers=headers,    json=payload,)print(response.json())

Success

application/json · Generated from schema

{  "label": "string",  "version": 0,  "versionId": "string"}
api-reference/evaluators-config/update-labels

Authorization

X-Auth-Tokenstringheaderrequired

Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.

Path parameters

evaluatorIdstringrequired

The evaluator id.

At least 1 character
labelstringrequired

The deploy label, for example production.

At least 1 characterUp to 64 characters

Request body

application/json · Required

versionintegerrequired

The version number the label points at.

Maximum 9007199254740991

Responses

200

Success

application/json

labelstringrequired
versionintegerrequired
Maximum 9007199254740991
versionIdstringrequired
400

Bad Request

application/json

errorstringrequired
messagestring
404

Not Found

application/json

errorstringrequired
messagestring

Documentation