Skip to main content
API update methods
Lex Kovalenko avatar
Written by Lex Kovalenko
Updated over 2 years ago

The base url for all API calls is:
​https://okr-for-jira-prod.herokuapp.com


Prerequisites

All update methods are POST, and require JSON object with specified properties in body of the request.
Authentication is performed in the same way, as for query methods - using API-Token: {token} header with your authentication token.
Also Content-Type: application/json header is mandatory for server to correctly parse your request.

Update objective

Create update for specified objective with.

POST /api/v2/api-update/objectives

Property

Description

Mandatory

objectiveId

Id of objective to update.

YES

status

New state of the objective. Allowed statuses:
​NOT STARTED, ON TRACK, AT RISK, OFF TRACK

NO

description

A description to appear on created update.

NO

Example request:

POST https://okr-for-jira-prod.herokuapp.com/api/v2/api-update/objectives
Request body:

1{ 2 "objectiveId": "62334eac00ee2b102e34fdb7", 3 "status" : "ON TRACK", 4 "description" : "Spaceship assembly docks are delivering on time" 5}

curl

curl -X POST https://okr-for-jira-prod.herokuapp.com/api/v2/api-update/objectives \
-H 'Content-Type: application/json' \
-H 'API-Token: {token}' \
-d '{"objectiveId":"62334eac00ee2b102e34fdb7", "status":"ON TRACK", "description":"Spaceship assembly docks are delivering on time"}'

Example response

{
"entityId": "62334eac00ee2b102e34fdb7",
"status": "ON TRACK",
"created": "2022-05-20T09:58:09+0000",
"value": null,
"description": "Spaceship assembly docks are delivering on time"
}

Update key result

Create update for specified key result.

POST /api/v2/api-update/keyResults

Property

Description

Mandatory

keyResultId

Id of key result to update.

YES

status

New state of the key result. Allowed statuses:
​NOT STARTED, ON TRACK, AT RISK, OFF TRACK

NO

newValue

Progress value to set in update.
Can not be set for auto key results, as their value comes from JQL query.

In case KR progress unit is currency, value should still be a number, without currency symbol.

NO

description

A description to appear on created update.

NO

Example request:

POST https://okr-for-jira-prod.herokuapp.com/api/v2/api-update/keyResults

Request body:

1{ 2 "keyResultId": "62384a6942adda046598b3bd", 3 "status" : "AT RISK", 4 "newValue" : 13500.5, 5 "description" : "Reduction in ship hull output is caused by Unobtainium supply disruptions." 6}

curl

curl -X POST https://okr-for-jira-prod.herokuapp.com/api/v2/api-update/keyResults \
-H 'Content-Type: application/json' \
-H 'API-Token: {token}' \
-d '{"keyResultId":"62384a6942adda046598b3bd","status":"AT RISK","newValue":13500.5,"description":"Spaceship assembly docks are delivering on time"}'

Example response:

{
"entityId": "62384a6942adda046598b3bd",
"status": "AT RISK",
"created": "2022-05-20T13:01:35+0000",
"value": 13500.5,
"description": "Reduction in ship hull output is caused by Unobtainium supply disruptions."
}

Did this answer your question?