Skip to main content
PUT
JavaScript

Authorizations

Authorization
string
header
required

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

Path Parameters

idOrSlug
string
required

Metric definition UUID or its stable slug.

variantId
string<uuid>
required

Variant UUID.

Body

application/json

Change a variant's name, its configuration, or both. Every configuration change creates a new immutable version and advances versionId.

Editing Roark's own variant forks it for your organization first: the response carries the new variant's id, and other organizations keep the original. Delete that variant to go back to Roark's version.

name
string

Rename the variant. Does not change its configuration, so versionId is unaffected. Default is reserved.

Required string length: 1 - 100
llmPrompt
string

The rubric this variant applies. LLM judge metrics only.

Maximum string length: 2000
scaleMin
integer

Scale minimum. SCALE output only.

Required range: 0 <= x <= 100
scaleMax
integer

Scale maximum. SCALE output only.

Required range: 0 <= x <= 100
booleanTrueLabel
string

What a true value means. Given to the judge as its polarity rule, so keep it accurate.

Maximum string length: 200
booleanFalseLabel
string

What a false value means. Given to the judge as its polarity rule, so keep it accurate.

Maximum string length: 200
maxClassifications
integer

Maximum classifications returned. CLASSIFICATION output only.

Required range: x >= 1
changeReason
string

Free-text audit note recorded on the new version.

Maximum string length: 500

Response

The updated variant, or your organization’s fork of it

data
object
required

One named configuration of a metric.