The following macros are not currently supported in the header:
  • style

GET /jobs

Resource URL

Returns an array of jobs.

GET /jobs

Parameters

Table of allowed parameters.

_pageunsigned intThe page of the list to display. For example, 5 will display the fifth page. Each page contains 10 resources.
_limitunsigned intThe maximum number of resources to return. Default is 10 and maximum is 50.
_offsetunsigned intThe position in the list of resources to return from. For example, if you had 20 resources and requested an offset of 10. Resources 10 to 19 would be returned. Offset cannot be used in conjunction with _page.
_fieldspartial stringAllows you to specify optional fields and linked objects to include in the response.
_filterspartial stringYou can filter jobs using this parameter.

Filters

Job filters can be used to filter through lists of jobs. You can defined filters in the _filter parameter.

date_type_before (unix timestamp)Accepts a unix timestamp. It will then filter milestones that have a timestamp before the supplied one. This supports types: created, modified, started, commenced, due and completed. For example, date_completed_before(<todays timestamp>) would only return milestones completed before today. 
date_type_after (unix timestamp)Accepts a unix timestamp. It will then filter milestones that have a timestamp after the supplied one. This supports types: created, modified, started, commenced, due and completed. For example, date_due_after(<todays timestamp>) would only return milestones due in the future (hopefully this is all of your jobs) 
managerArray of number. e.g 13,10,15- Filter out jobs that do not have a manager with supplied manager id. 
NEWaffiliationArray of number. e.g. _filters=affiliation(1, 3, 5) 
standingArray of standing status strings. For example standing(pending,active)- filter out jobs that do not have the supplied standing. 
typeArray of type ids, e.g. _filters=type(1,2) 
modified_byArray modified staff ids, e.g. _filters=modified_by(1,2) 
statusArray of status ids, e.g. _filters=status(1,2) 
rateArray of rate ids, e.g. _filters=rate(1,2) 
max_idOnly return jobs with id less or equal to 
min_idOnly return jobs with id greater or equal to 
against_type(...) or against_type_not(...)_filters=against_type(company, site)Only return jobs that are against a specific object type. Available object types include: company, and site.
against_id(...) or against_id_not(...)_filters=against_id(1,32)Only return jobs against an object with id
against(type1(...),typeN(...))_filters=against(company(1,4),site(4,5))Only return jobs with the matching against values. The example will only return jobs against company 1 and 4 or jobs against site 4 and 5.
order_by_asc<type>, order_by_desc<type>

Accepts: id, date_started, date_created, date_commenced, date_due and date_completed.

NEW date_modified, date_last_interacted, title, standing and status

 

NEW

<field_name>_greater_than(<value>),

<field_name>_less_than(<value>),

<field_name>_greater_than_or_equal(<value>),

<field_name>_less_than_or_equal(<value>)

e.g. _filters=id_greater_than(5)

Available fields:

id
type
manager
against_id
affiliation
modified_by
status
rate
rate_charged
contract
plan_modified_by

 

Using the _not suffix (e.g, id_not) on standard in filters will return results not in.

 

The following sample will return jobs created before Tue, 03 Jul 2012 02:07:26 GMT< that have a manager with an id 10, 11 or 100 and are currently "pending". 

/jobs?_filter=date_created_before(1341281246),manager_id(10,11,100),standing(pending)

Handling the response

Below is a table of available response fields and objects that are returned within the response object of the returned object. The optional fields and objects can be requested in the _fields parameter; see included examples. Underlined values are default.

idunsigned intUnique id assigned to the job
titlestring 
againststringResource endpoint for the object the job is against. For example, /companies/12
date_createdunix timestamp 
date_modifiedunix timestamp 
date_startedunix timestamp 
date_dueunix timestamp 
date_completedunix_timestamp 
standingstringe.g, pending, active, inactive or complete.
pausedunsigned int 
rate_chargeddecimal 
typeunsigned int or objectContains the job's type id or if using parenthesis, the job's rate object.
rateunsigned int or objectJob's rate id or object.
companyunsigned int or objectJob's company id or object if the against_table is equal to company.
statusunsigned int or objectJob's status id or object.
managerunsigned int or objectJob's manager (staff) id or object.
modified_byunsigned int or objectThe staff id or object of the last user to modify the job.
against_idunsigned intThe id of the object the job is against. E.g, 42
against_tablestringThe name of the object the job is against. E.g, companies.

 

Fields that can be object indicate the field can be requested as a resource. For example.

GET /jobs.json?_fields=manager

would return the manager's staff id. Where as,

GET /jobs.json?_fields=manager()

would return the manager's staff object, including any optional fields or objects within the parenthesis.