Skip to main content
Solved

Find automation that contains certain workspace

  • February 28, 2024
  • 10 replies
  • 134 views

asablomberg
Contributor
Forum|alt.badge.img+8

I have a workspace in FME Flow but I don’t know wich automation it’s used in. How do I find it? We have 75 automations, I don’t want to manually search through them. It hasn’t run in a while so I didn’t find it under Jobs/Completed.

Best answer by david_r

If your FME Flow instance is recent enough, you could test the REST API V4 (currently in technology preview) which has a new endpoint to query object dependencies:

https://bluesky-safe-software.fmecloud.com/fmeapiv4/docs/index.html

You’d first use the endpoint

GET /automations

to get the IDs of all your automations, then pass each of them on to

GET /dependencies

and parse the results. I would expect the result to list all workspaces referenced in each automation, in some way or another.

You can of course do this using FME and an HTTPCaller with a web connection to your Flow instance, and some JSONExtractor / JSONFragmenter to parse the results.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

10 replies

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2940 replies
  • February 28, 2024

I have not tested this but it looks like the FMEServerAutomationTriggersParser from the fme hub does what you need? Maybe it is a little heavy for what you need but you can see how it is done and pick some parts you like and it to your needs.

Creates an HTML report on all your triggers in all your automations, to be used as a dashboard in FME server.

Takes a URL to an FME server and a web connection for authentication.

It then connects to your server's REST API to get a list of all your automations.

After that it gets each automation's configuration. It then parses all objects in the Automations canvas, checking for Triggers. For every trigger in every automation, it will check which workspaces are being triggered.

It’s still not possible to link to the hub so you have to google yourself.


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2940 replies
  • February 28, 2024

I have not tested this but it looks like the FMEServerAutomationTriggersParser from the fme hub does what you need?

https://hub.safe.com/publishers/martin-ekstrand/transformers/fmeserverautomationtriggersparser/versions/1#description


david_r
Celebrity
  • 8394 replies
  • Best Answer
  • February 28, 2024

If your FME Flow instance is recent enough, you could test the REST API V4 (currently in technology preview) which has a new endpoint to query object dependencies:

https://bluesky-safe-software.fmecloud.com/fmeapiv4/docs/index.html

You’d first use the endpoint

GET /automations

to get the IDs of all your automations, then pass each of them on to

GET /dependencies

and parse the results. I would expect the result to list all workspaces referenced in each automation, in some way or another.

You can of course do this using FME and an HTTPCaller with a web connection to your Flow instance, and some JSONExtractor / JSONFragmenter to parse the results.


asablomberg
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • 19 replies
  • February 28, 2024

If your FME Flow instance is recent enough, you could test the REST API V4 (currently in technology preview) which has a new endpoint to query object dependencies:

https://bluesky-safe-software.fmecloud.com/fmeapiv4/docs/index.html

You’d first use the endpoint

GET /automations

to get the IDs of all your automations, then pass each of them on to

GET /dependencies

and parse the results. I would expect the result to list all workspaces referenced in each automation, in some way or another.

You can of course do this using FME and an HTTPCaller with a web connection to your Flow instance, and some JSONExtractor / JSONFragmenter to parse the results.

 

Thanks! I will try this

 

//Åsa


asablomberg
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • 19 replies
  • February 28, 2024

If your FME Flow instance is recent enough, you could test the REST API V4 (currently in technology preview) which has a new endpoint to query object dependencies:

https://bluesky-safe-software.fmecloud.com/fmeapiv4/docs/index.html

You’d first use the endpoint

GET /automations

to get the IDs of all your automations, then pass each of them on to

GET /dependencies

and parse the results. I would expect the result to list all workspaces referenced in each automation, in some way or another.

You can of course do this using FME and an HTTPCaller with a web connection to your Flow instance, and some JSONExtractor / JSONFragmenter to parse the results.

 

We upgraded FME Flow to 2023 in january, maybe that’s too old? Do I have to install something? 

We have used v3 before with for instance $(FME_SERVER_URL)/fmerest/v3/repositories?limit=-1&offset=-1

 


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2940 replies
  • February 28, 2024

I’m not an Automations expert but 

$(FMEserverurl)/fmerest/v3/automations/workflows?limit=-1&offset=-1

returns a list of all automations, where you can parse the automation name and id from. And

$(FMEserverurl)/fmerest/v3/automations/workflows/@Value(automation_id)/components

returns the components of the automations, where you can find the workspaces.

 


david_r
Celebrity
  • 8394 replies
  • February 28, 2024

I’m not an Automations expert but 

$(FMEserverurl)/fmerest/v3/automations/workflows?limit=-1&offset=-1

returns a list of all automations, where you can parse the automation name and id from. And

$(FMEserverurl)/fmerest/v3/automations/workflows/@Value(automation_id)/components

returns the components of the automations, where you can find the workspaces.

 

Where/how did you find the /components endpoint? I can’t seem to find it in the documentation:

https://docs.safe.com/fme/html/FME_REST/apidoc/v3/index.html#!/automations

Is it perhaps an undocumented endpoint?


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2940 replies
  • February 28, 2024

In the custom transformer from the hub I referred to.


asablomberg
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • 19 replies
  • February 29, 2024

I’m not an Automations expert but 

$(FMEserverurl)/fmerest/v3/automations/workflows?limit=-1&offset=-1

returns a list of all automations, where you can parse the automation name and id from. And

$(FMEserverurl)/fmerest/v3/automations/workflows/@Value(automation_id)/components

returns the components of the automations, where you can find the workspaces.

 

Thank you so much, it works like a charm! :)


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2940 replies
  • February 29, 2024

I’m not an Automations expert but 

$(FMEserverurl)/fmerest/v3/automations/workflows?limit=-1&offset=-1

returns a list of all automations, where you can parse the automation name and id from. And

$(FMEserverurl)/fmerest/v3/automations/workflows/@Value(automation_id)/components

returns the components of the automations, where you can find the workspaces.

 

Thank you so much, it works like a charm! :)

Cheers :)