Tasks

The Task Object

You can save task categories for reuse in statements.

EXAMPLE OBJECT

{
  "task_category": {
    "id": 12,
    "name": "Development",
    "rate": "10.0",
    "formatted_rate": "10.00",
    "created_at": "2014-07-21T11:04:58Z"
  }
}

Attributes

Attribute Description
id integer ID
name string Task name
rate string Task rate

Create a New Task

DEFINITION
POST https://[subdomain].hiveage.com/api/categories/tasks

EXAMPLE JSON REQUEST
$ curl https://[subdomain].hiveage.com/api/categories/tasks\
  -H "Accept: application/json" \
  -u 6ZQHxidcLHnkcsnDbfM5: \
  -d task_category[name]="Development" \
  -d task_category[rate]="10.00" \


EXAMPLE RESPONSE
{
  "task_category": {
    "id": 12,
    "name": "Development",
    "rate": "10.0",
    "formatted_rate": "10.00",
    "created_at": "2014-07-21T11:04:58Z"
  }
}

Attributes

Parameter Description
name required
rate string Task rate

Return

Returns the task object.

Retrieve a Task

Retrieve an expense object with a specified ID.

DEFINITION
GET https://[subdomain].hiveage.com/api/categories/tasks/[id]

EXAMPLE JSON REQUEST
$ curl https://[subdomain].hiveage.com/api/categories/tasks/[id]\
  -H "Accept: application/json" \
  -u 6ZQHxidcLHnkcsnDbfM5: \

EXAMPLE RESPONSE
{
  "task_category": {
  "id": 12,
  "name": "Development",
  "rate": "10.0",
  "formatted_rate": "10.00",
  "created_at": "2014-07-21T11:04:58Z"
}

Arguments

Parameter Description
id required The id of task category object.

Returns

Returns a task JSON object if a valid expense category ID was provided. Returns an error otherwise.

Update a Task

Update a task category.

DEFINITION
PUT https://[subdomain].hiveage.com/api/categories/tasks/[id]

EXAMPLE JSON REQUEST
$ curl https://[subdomain].hiveage.com/api/categories/tasks/[id]\
  -H "Accept: application/json" \
  -u 6ZQHxidcLHnkcsnDbfM5: \
  -d task_category[name]="Development" \
  -d task_category[rate]="20.0" \

EXAMPLE RESPONSE
{
  "task_category": {
    "id": 12,
    "name": "Development",
    "rate": "20.0",
    "formatted_rate": "10.00",
    "created_at": "2014-07-21T11:04:58Z"
  }
}

Arguments

Arguments Description
name required
rate string Task rate

Returns

Returns a updated task JSON object if a valid task ID was provided. Returns an error otherwise.

Delete a Task

Delete a task object permanently.

DEFINITION
DELETE https://[subdomain].hiveage.com/api/categories/tasks/[id]

EXAMPLE REQUEST
$ curl https://[subdomain].hiveage.com/api/categories/tasks/[id]\
  -H "Accept: application/json" \
  -u 6ZQHxidcLHnkcsnDbfM5: \

SAMPLE JSON RESPONSE
{
  "task_category": {
    "deleted": true,
    "id": "13"
  }
}

Arguments

Parameter Description
id required The ID of the task to be deleted.

Returns an object with a deleted parameter on success.

List All Tasks

Return list of tasks. The tasks are returned sorted alphabetically.

DEFINITION
GET https://[subdomain].hiveage.com/api/categories/tasks

EXAMPLE REQUEST
$ curl https://[subdomain].hiveage.com/api/categories/tasks\
  -H "Accept: application/json" \
  -u 6ZQHxidcLHnkcsnDbfM5: \

SAMPLE JSON RESPONSE
{
  "task_categories": [{
    "id": 13,
    "name": "Development",
    "rate": "20.0",
    "formatted_rate": "10.00",
    "created_at": "2014-07-21T11:04:58Z"
  }
  {...},
  {...}]
}

The results will be paginated. You can use the following optional parameters to traverse the results.

Arguments

Parameter Description
per_page optional Number of results per page (default: 20). Available per page: 20, 60 and 100.
page optional Page in results set
order optional The list has been ordered by name, and can be ordered by desc or asc. The defaul value is asc.