Call Scenario via REST API

When calling a Scenario via the REST API is it possible to return a custom JSON response?

When using a webhook this can be accomplished with a Webhook Response. Is there an equivalent when call via the REST API?

Thanks

Hmmm 3 days no reply to what seems to be straightforward question.

1 This forum is only viewed by Make users and no one uses the REST API.
or
2 As a noob, I have broken some question etiquette that I am unaware of.

Feedback in either case would be appreciated.
Thanks

Hello there @James_Moring welcome to the community :wave:

Let me assure you that you did not break any question etiquette. Thanks a lot for checking, though!

Please understand that this is a community of Make users who participate in the discussion on a voluntary basis and in their free time. Despite the passion Make users have for the product, it might sometimes happen that it takes a bit of time for someone to jump in and offer their oh-so-valuable assistance. You can always come back in and bump up your question. Just like you did now :slight_smile:

The etiquette thing was a bit of a joke. :wink: This forum is not monitored by Make staff? Only Users? I suspect that the REST API is not widely used. Is there another way that I might direct my question to an audience with more knowledge of the REST API?

Any guidance would be appreciated.
Thanks you so much!
Jim

Hi James, when executing a scenario via API in the response it returns the execution ID, you can see an example below.
Documentation: https://www.make.com/en/api-documentation/scenarios-scenarioId-run-post

 {
   "executionId": "9c4874979d974c3ebdef1e8aaa7dc452"
 }

Then, with the execution ID you can consult the scenario log, I share an example of the output of the call and the documentation.

Documentation: https://www.make.com/en/api-documentation/scenarios-scenarioId-logs-executionId-get

{
    "scenarioLog": {
        "imtId": "1674046231913_scenario.811083.auto.c48a55bac92a429b094c437228",
        "duration": 2015,
        "operations": 1,
        "transfer": 17829,
        "organizationId": 25,
        "@kindId": "8230823",
        "teamId": 31,
        "id": "c48asd5bac92a49b094c43729277f9d68",
        "type": "auto",
        "authorId": 812,
        "instant": false,
        "timestamp": "2023-01-18T12:52:11.913Z",
        "status": 1
    }
}

If what you want is to return the result of your automated process, perhaps you can send the data to a URL (webhook/API), this can be done by adding the HTTP module at the end.

Tell me if this option works for you, or tell me what you are looking to do?

1 Like

It’s a great question. From what I’ve read in the documentation and from my own testing, it doesn’t appear that the REST API allows for custom JSON responses in the same way that a webhook response can. It seems that using a webhook trigger would be the best option in this case. Can you please share more about your specific use case for wanting to call the scenario via the API rather than using a webhook trigger?

Glenn - Callinetic

1 Like

The fact that the webhooks lack the built-in authentication that the REST API has was what was driving my question. We recently moved from Integromat and I noticed that the API had an execute Scenario endpoint.

Thank you both for providing clarification.
Jim

Hi @Francisco_Fontes! If I wanted to pass through the result of my Make scenario to the scenario log, is that possible? I want to use my Make scenario as an endpoint for an app I’m building (if that makes sense).

Thanks in advance!