Skip to main content
Solved

Find automation that contains certain workspace


asablomberg
Contributor
Forum|alt.badge.img+7

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.

View original
Did this help you find an answer to your question?

10 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

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+54
nielsgerrits wrote:

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
Evangelist
  • 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+7
  • Author
  • Contributor
  • February 28, 2024
david_r wrote:

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+7
  • Author
  • Contributor
  • February 28, 2024
david_r wrote:

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+54

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
Evangelist
  • February 28, 2024
nielsgerrits wrote:

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+54

In the custom transformer from the hub I referred to.


asablomberg
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • February 29, 2024
nielsgerrits wrote:

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+54
asablomberg wrote:
nielsgerrits wrote:

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 :)


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings