Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 1.91 KB

RulesApi.md

File metadata and controls

58 lines (39 loc) · 1.91 KB

asana.RulesApi

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

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

trigger_rule

Trigger a rule

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

(more information)

Example

import asana
from asana.rest import ApiException
from pprint import pprint

configuration = asana.Configuration()
configuration.access_token = '<YOUR_ACCESS_TOKEN>'
api_client = asana.ApiClient(configuration)

# create an instance of the API class
rules_api_instance = asana.RulesApi(api_client)
body = {"data": {"<PARAM_1>": "<VALUE_1>", "<PARAM_2>": "<VALUE_2>",}} # dict | A dictionary of variables accessible from within the rule.
rule_trigger_gid = "12345" # str | The ID of the incoming web request trigger. This value is a path parameter that is automatically generated for the API endpoint.


try:
    # Trigger a rule
    api_response = rules_api_instance.trigger_rule(body, rule_trigger_gid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RulesApi->trigger_rule: %s\n" % e)

Parameters

Name Type Description Notes
body Dict A dictionary of variables accessible from within the rule.
rule_trigger_gid str The ID of the incoming web request trigger. This value is a path parameter that is automatically generated for the API endpoint.

Return type

dict

HTTP request headers

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

[Back to top] [Back to API list] [Back to README]