0

I’m able to create automations, trigger them, and then check if they’re running or not.

However, I want to see if the triggered run was successful or not.

I can query the automation to get a “lastRunInstanceId” - but not seeing any documented or undocumented endpoints to check the status using this ID.

Any help is appreciated.

Thank you.

New contributor
Aaron is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

2 Answers 2

1

Using REST, you can also get a status by simply retrieving the automation, without the instance:

GET {{restEndpoint}}/automation/v1/automations/{{objectId}}

returns:

{
    "id": "objectId from your input",
    "name": "xxx",
    "description": "",
    "key": "xxx",
    "typeId": 0,
    "type": "unspecified",
    "statusId": 1,
    "status": "Building",
    ....

Generally you can check all capabilities of the REST Api with automations here with the "discover"-esque request below, which among other things returns the /instance method you quoted:

GET {{restEndpoint}}/automation/v1/rest/
2
  • Thank you! I’ll test this out. And good to know about that discovery endpoint. That’ll prove very useful Commented Nov 17 at 18:16
  • 1
    I tried this, but it doesn't seem to tell whether it's succeeded/failed. Just whether it's running. It's not until I used the instance method using the instance ID that I can see whether a run instance succeeded or not etc. Commented Nov 17 at 19:40
0

To answer my own question,

Using GET requests, I can get the last run id (lastRunInstanceId) of an automation via:

/automation/v1/automations/{{automation_id}}

And get the result of this via:

/automation/v1/automations/instance/{{lastRunInstanceId}}
New contributor
Aaron is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.