Skip to content
Imran Ariffin edited this page Oct 2, 2019 · 3 revisions

Goals

Goals Create

Example: valid request

Request

POST /v1/goals/
{
  "text": "some-goals"
}

Response

201 CREATED
{
  "created": "1970-01-01T12:34:56",
  "id": "69c0a292-6c33-4895-9a35-22e4448b187b",
  "text": "some-goals"
}

Goals List

GET /v1/goals/

Response

200 OK
{
  "goals": [
    {
      "created": "2003-01-01T12:34:56",
      "id": "69c0a292-6c33-4895-9a35-22e4448b187b",
      "text": "some-goals-latest"
    },
    {
      "created": "2002-01-01T12:34:56",
      "id": "7f927688-b450-4eb4-aa28-1739102a70d6",
      "text": "some-goals"
    },
    {
      "created": "2001-01-01T12:34:56",
      "id": "68cc1ed9-20b8-485a-ac6c-2566965332ea",
      "text": "some-goals-earliest"
    }
  ]
}

Goals Delete

DELETE /v1/goals/<goal_id>/

Response

200 OK
{
  "datetime_deleted": "1970-01-01T12:34:56",
  "id": "abcde-12345",
}
400 BAD REQUEST
{
  "goal_id": "Goal with id abcde-12345 not found"
}
Clone this wiki locally