Update Metric API

Update an existing metric’s configurations.

API Endpoint

MethodEndpoint
PATCHhttps://new-prod.vocera.ai/test_framework/v1/metrics-external/:metric_id

URL Parameters

ParameterTypeRequiredDescription
metric_idstringYesThe unique identifier of the metric to update

Authentication

Include your API key in the request headers:

HeaderDescription
X-VOCERA-API-KEYYour API key obtained from the dashboard

Request Parameters

ParameterTypeRequiredDescription
namestringNoName of the metric
descriptionstringNoDescription of what the metric evaluates
audio_enabledbooleanNoWhether audio analysis is enabled
prompt_enabledbooleanNoWhether to use a custom prompt
promptstringNoCustom evaluation prompt template when prompt_enabled is true
agentintegerNoID of the agent to evaluate
eval_typestringNoType of metric (binary_workflow_adherence, binary_qualitative, continuous_qualitative, numeric, enum)
enum_valuesarrayNoList of possible values when eval_type is “enum”
display_orderintegerNoOrder for displaying the metric

Example Request Body

{

    "name": "Remind to file taxes",

    "description": "Ask if taxes already filed if not remind it",

    "audio_enabled": true,

    "prompt_enabled": false,

    "prompt": "",

    "agent": 1,

    "eval_type": "binary_workflow_adherence",

    "enum_values": [],

    "display_order": 2

}

Response

A successful request returns the updated metric details.

Response Fields

FieldTypeDescription
idintegerUnique identifier for the metric
agentintegerID of the associated agent
namestringName of the metric
descriptionstringDescription of the metric
eval_typestringType of metric
enum_valuesarrayList of possible enum values
audio_enabledbooleanWhether audio analysis is enabled
prompt_enabledbooleanWhether custom prompt is enabled
promptstringCustom evaluation prompt template
display_orderintegerOrder for displaying the metric
overall_scorenumberTotal testsets passed
total_scorenumberReviewed in total testsets

Example Response

{

    "id": 2,

    "agent": 1,

    "name": "Remind to file taxes",

    "description": "Ask if taxes already filed if not remind it",

    "eval_type": "binary_workflow_adherence",

    "enum_values": [],

    "audio_enabled": true,

    "prompt_enabled": false,

    "prompt": "",

    "display_order": 2,

    "overall_score": 12,

    "total_score": 12

}

Code Examples

curl -X PATCH https://new-prod.vocera.ai/test_framework/v1/metrics-external/{metric_id}/ \

  -H "X-VOCERA-API-KEY: <your-api-key-here>" \

  -H "Content-Type: application/json" \

  -d '{

    "name": "<metric-name>",

    "description": "<metric-description>",

    "audio_enabled": true,

    "prompt_enabled": false,

    "prompt": "",

    "agent": "<agent-id>",

    "eval_type": "<eval-type>",

    "enum_values": [],

    "display_order": "<display-order>"

  }'