KPI

Upsert Target Values

This endpoint upserts target values. The date value is used as a key.

  • If a record is found for a the specific date then, the value is updated with the new one.
  • If no record is found for the specific date then, a new record is created.
post/kpis/{id}/targets

Request

  • Base URL: https://connect.workpath.com/api/v3
  • URL: https://connect.workpath.com/api/v3/kpis/{id}/targets
  • Auth: HTTP bearer

Path parameters

idstring required

Unique identifier for the KPI

Headers

Content-Typestring required

application/json

Request body

Example request

{
  "targets": [
    {
      "value": 1.5,
      "date": "2019-08-24"
    }
  ]
}

Response

OK

valuenumber required

A numerical goal for the KPI to achieve by the accompanying date.

datestring date required

The date by which the target should be reached. A KPI has at most one target per date.

Example response

[
  {
    "value": 40,
    "date": "2024-11-20"
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.