Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The response will then echo the post body, URL, and triggered integrations. This is recommended for dev mode when setting things up. 

Action Response:

A rule can be configured to "wait" for its triggered action and return the action response. 

This is setup from the Rule. Open Incoming, select to edit a rule and under the section Rule HTTP Response select:

  • Triggered Action(s) Response

This rule will now wait for its action to complete before returning a response. By default, due to backward compatibility, the response is returned as a single object (if the request matches one rule) , if more rules are triggered in the same request an array of responses will be returned. If you wish to always return an array of objects (one or more) this can be set up under the “Settings” menu.

Make sure this is set to On.

  • Response Rule 2. Always return response as an array, response rule 1 needs to be disabled to make this apply.

Note: Debug must be switched off


Sample of response:

Code Block
languagejs
titleIncoming Rule With Action Response
[
    {
        "actionId": 3,
        "actionName": "Create Issue",
        "httpStatusCode": 201,
        "responseData": {
            "id": "10000",
            "key": "SEAG-1",
            "self": "http://localhost:2990/jira/rest/api/2/issue/10000"
        },
        "requestData": {
            "headers": {
                "Authorization": "*******",
                "Accept": "application/json",
                "Content-Type": "application/json"
            },
            "body": "{\n    \"fields\": {\n        \"project\": {\n            \"id\": \"10000\"\n        },\n        \"summary\": \"this is the issue header\",\n        \"issuetype\": {\n            \"id\": \"10002\"\n        },\n        \"labels\": [\n            \"from_sf\"\n        ],\n        \"description\": \"this was created from an incoming rule\"\n    }\n}",
            "url": "http://localhost:2990/jira/rest/api/2/issue",
            "method": "POST",
            "formVars": {}
        }
    }
]


Incoming requests with files (multipart data)

...