Skip to main content

Tasks

Information pertaining to retrieving, creating, editing, and deleting tasks. Admin permissions required.

Link to documentation

List all tasks

Returns a list of your tasks. The tasks are returned sorted by creation date, with the most recently created tasks appearing first.

The response contains an object with a tasks property that contains an array of up to per_page tasks. Each entry in the array is a separate task object. If no more tasks are available, the resulting array will be empty. Several additional pagination properties are included in the response to simplify paginating your tasks.

Link to documentation

hrvst tasks list
OptionDescriptionRequired
--is_activePass true to only return active tasks and false to return inactive tasks.false
--updated_sinceOnly return tasks that have been updated since the given date and time.false
--pageThe page number to use in pagination. Use all to retrieve all pages.false
--per_pageThe number of records to return per page. Can range between 1 and 2000.false
--fieldsComma separated list of fields to display in the output.false
--outputThe output format: json, tablefalse

Retrieve a specific task

Retrieves the task with the given ID. Returns a task object and a 200 OK response code if a valid identifier was provided.

Link to documentation

hrvst tasks get
OptionDescriptionRequired
--task_idThe ID of the task you're retrieving.true
--fieldsComma separated list of fields to display in the output.false
--outputThe output format: json, tablefalse

Create a task

Creates a new task object. Returns a task object and a 201 Created response code if the call succeeded.

Link to documentation

hrvst tasks create
OptionDescriptionRequired
--nameThe name of the task.true
--billable_by_defaultUsed in determining whether default tasks should be marked billable when creating a new project. Defaults to truefalse
--default_hourly_rateThe default hourly rate to use for this task when it is added to a project. Defaults to 0.false
--is_defaultWhether this task should be automatically added to future projects. Defaults to false.false
--is_activeWhether this task is active or archived. Defaults to true.false
--fieldsComma separated list of fields to display in the output.false
--outputThe output format: json, tablefalse

Update a task

Updates the specific task by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Returns a task object and a 200 OK response code if the call succeeded.

Link to documentation

hrvst tasks update
OptionDescriptionRequired
--task_idThe ID of the task you're updating.true
--nameThe name of the task.false
--billable_by_defaultUsed in determining whether default tasks should be marked billable when creating a new project.false
--default_hourly_rateThe default hourly rate to use for this task when it is added to a project.false
--is_defaultWhether this task should be automatically added to future projects.false
--is_activeWhether this task is active or archived.false
--fieldsComma separated list of fields to display in the output.false
--outputThe output format: json, tablefalse

Delete a task

Delete a task. Deleting a task is only possible if it has no time entries associated with it. Returns a 200 OK response code if the call succeeded.

Link to documentation

hrvst tasks delete
OptionDescriptionRequired
--task_idThe ID of the task you're deleting.true
--fieldsComma separated list of fields to display in the output.false
--outputThe output format: json, tablefalse