Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.77 KB

RulesApi.md

File metadata and controls

53 lines (35 loc) · 1.77 KB

Asana.RulesApi

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

Method HTTP request Description
triggerRule POST /rule_triggers/{rule_trigger_gid}/run Trigger a rule

triggerRule

Trigger a rule

Trigger a rule which uses an "incoming web request" trigger.

(more information)

Example

const Asana = require('asana');

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

let rulesApiInstance = new Asana.RulesApi();
let body = {"data": {"<PARAM_1>": "<VALUE_1>", "<PARAM_2>": "<VALUE_2>",}}; // Object | A dictionary of variables accessible from within the rule.
let rule_trigger_gid = "12345"; // String | The ID of the incoming web request trigger. This value is a path parameter that is automatically generated for the API endpoint.

rulesApiInstance.triggerRule(body, rule_trigger_gid).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
body Object A dictionary of variables accessible from within the rule.
rule_trigger_gid String The ID of the incoming web request trigger. This value is a path parameter that is automatically generated for the API endpoint.

Return type

object

HTTP request headers

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