This endpoint requires authentication. Include your API key in the request headers as X-API-Key.
Description
Updates an existing variable’s properties. You can modify the name, units, and description of a variable.
Path Parameters
The ID of the variable to update
Request Body
The new name of the variable. If not provided, the existing name will be kept.
The new units of measurement for the variable. If not provided, the existing units will be kept.
The new description of what the variable represents. If not provided, the existing description will be kept.
All fields in the request body are optional. Only the fields you want to update need to be included. Any fields not included in the request will retain their existing values.
Example Request
{
"name": "Blood Pressure (Updated)",
"units": "mmHg",
"description": "Updated description for blood pressure measurements"
}
Example Response
{
"id": 1,
"name": "Blood Pressure (Updated)",
"units": "mmHg",
"description": "Updated description for blood pressure measurements",
"patient_values_count": 150
}
Error Responses
Invalid request data. The response will include an error message explaining what went wrong.
Authentication required. Make sure you’ve included a valid API key in the request headers.
Variable not found. The specified variable ID does not exist.
ID of the variable to update
Description of the variable
Variable updated successfully