(Quick Reference) Service: Show an objective

Description: Returns the requested objective in json format when successful. Returns a json response, describing the failure condition when unsuccessful.

URL:

https://BASE_URL/api/VERSION/objectives/{id}

Method: GET

Parameters:

NameDescriptionTypeRequiredExample values
idThe numerical ID of the desired objectiveLongYes777

Success Output

Success case: response.status=200
{
  "id": 2,
  "employeeReference": "emp-04",
  "employee": {
    "id": 4,
    "reference": "emp-04",
    "href": "/api/v1.0/users/4"
  },
  "itemReference": "bracelet-GRP09062",
  "item": {
    "id": 497,
    "reference": "bracelet-GRP09062",
    "name": "Knot Band Bracelet",
    "href": "/api/v1.0/items/497"
  },
  "year": 2016,
  "type": "4",
  "januaryValue": 40,
  "februaryValue": 40,
  "marchValue": 40,
  "aprilValue": 45,
  "mayValue": 45,
  "juneValue": 45,
  "julyValue": 50,
  "augustValue": 50,
  "septemberValue": 50,
  "octoberValue": 50,
  "novemberValue": 50,
  "decemberValue": 55,
  "organization": "entity1",
  "dateCreated": "2016-02-01T13:39:01Z",
  "lastUpdated": "2016-02-01T13:39:01Z"
}

Failure Output

Failure case:response.status = 404
{
  "error": "not_found",
  "error_description": "The objective with the id 1000 doesn't exist."
}

Failure case:response.status = 400
{
    "error": "invalid_param_type",
    "error_description": "The type of parameter id you provided is not valid for this request."
}