Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 1.66 KB

JobsApi.md

File metadata and controls

54 lines (37 loc) · 1.66 KB

Asana.JobsApi

All URIs are relative to https://app.asana.com/api/1.0

Method HTTP request Description
getJob GET /jobs/{job_gid} Get a job by id

getJob

Get a job by id

Returns the full record for a job.

(more information)

Example

const Asana = require('asana');

let client = Asana.ApiClient.instance;
let token = client.authentications['token'];
token.accessToken = '<YOUR_ACCESS_TOKEN>';

let jobsApiInstance = new Asana.JobsApi();
let job_gid = "12345"; // String | Globally unique identifier for the job.
let opts = { 
    'opt_fields': "new_project,new_project.name,new_project_template,new_project_template.name,new_task,new_task.created_by,new_task.name,new_task.resource_subtype,resource_subtype,status"
};
jobsApiInstance.getJob(job_gid, opts).then((result) => {
    console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
}, (error) => {
    console.error(error.response.body);
});

Parameters

Name Type Description Notes
job_gid String Globally unique identifier for the job.
opt_fields Object This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. [optional]

Return type

object

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json; charset=UTF-8