GET /jobs
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.

_page

unsigned int

The page of the list to display. For example, 5 will display the fifth page. Each page contains 10 resources.

_limit

unsigned int

The maximum number of resources to return. Default is 10 and maximum is 50.

_offset

unsigned int

The 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.

_fields

partial string

Allows you to specify optional fields and linked objects to include in the response.

_filters

partial string

You 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)

 

manager

Array of number. e.g 13,10,15- Filter out jobs that do not have a manager with supplied manager id.

 

NEWaffiliation

Array of number. e.g. _filters=affiliation(1, 3, 5)

 

standing

Array of standing status strings. For example standing(pending,active)- filter out jobs that do not have the supplied standing.

 

type

Array of type ids, e.g. _filters=type(1,2)

 

modified_by

Array modified staff ids, e.g. _filters=modified_by(1,2)

 

status

Array of status ids, e.g. _filters=status(1,2)

 

rate

Array of rate ids, e.g. _filters=rate(1,2)

 

max_id

Only return jobs with id less or equal to

 

min_id

Only 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.

id

unsigned int

Unique id assigned to the job

title

string

 

against

string

Resource endpoint for the object the job is against. For example, /companies/12

date_created

unix timestamp

 

date_modified

unix timestamp

 

date_started

unix timestamp

 

date_due

unix timestamp

 

date_completed

unix_timestamp

 

standing

string

e.g, pending, active, inactive or complete.

paused

unsigned int

 

rate_charged

decimal

 

type

unsigned int or object

Contains the job's type id or if using parenthesis, the job's rate object.

rate

unsigned int or object

Job's rate id or object.

company

unsigned int or object

Job's company id or object if the against_table is equal to company.

status

unsigned int or object

Job's status id or object.

manager

unsigned int or object

Job's manager (staff) id or object.

modified_by

unsigned int or object

The staff id or object of the last user to modify the job.

against_id

unsigned int

The id of the object the job is against. E.g, 42

against_table

string

The 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.