Update a KPI
PATCH
/v1/kpis/{id}
const url = 'https://api.varman.io/v1/kpis/example';const options = { method: 'PATCH', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"name":"Security awareness training completion","description":{},"unit":"percent","direction":"higher_better","target":95,"warningThreshold":85,"frequency":"monthly","dataSource":{},"objectiveId":"sobj_abc123","ownerMemberId":"mem_abc123"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.varman.io/v1/kpis/example \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "name": "Security awareness training completion", "description": {}, "unit": "percent", "direction": "higher_better", "target": 95, "warningThreshold": 85, "frequency": "monthly", "dataSource": {}, "objectiveId": "sobj_abc123", "ownerMemberId": "mem_abc123" }'Updates a KPI target, at-risk threshold, frequency, owner, objective or data source. Changing frequency moves the next due date.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Header Parameters
Section titled “Header Parameters”X-Organization-Id
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
string
Example
Security awareness training completiondescription
object
unit
string
direction
string
target
number
Example
95warningThreshold
Value between target and failure that counts as at risk. Null means none.
object
Example
85frequency
string
dataSource
Where the number comes from
object
objectiveId
object
Example
sobj_abc123ownerMemberId
object
Example
mem_abc123