Solved

Automation - workbench metadata extraction

  • 13 January 2023
  • 1 reply
  • 9 views

Badge

Is it possible to extract the following information about a workbench being run through an automation (all automations will be triggered by schedule):

 

  • Workbench Name
  • All READER dataset names
  • scheduled run time & period
  • All WRITER dataset type, and output filename/location

 

I am interested in writing a workbench which will use an HTTPCaller to read all automations tagged with a specific tag, and then take each of those automations and extract those specific attributes above into a csv.

 

icon

Best answer by sanaeatsafe 17 January 2023, 17:46

View original

1 reply

Badge +6

Unfortunately, an exposed endpoint is not available in the FME Server V3 API that allows you to grab metadata, like workspace information, from an automation. However, please keep an eye on the upcoming FME Server V4 REST API for increased functionality in the automation endpoints.

 

In the meantime, you could potentially leverage a combination of unpublished and exposed endpoints to fetch this information. But before proceeding, please note that unpublished endpoints are undocumented, unsupported, and subject to change without notice. Therefore, never rely on unpublished endpoints for production-level workflows in your organization. With that said, I'll give a sample workflow of how you might proceed:

  • GET /automations/workflows?tag=<tag>
  • GET /automations/workflows/<id>/components
    • This unpublished endpoint grabs an automation's objects, including the workspace names, repositories, and public parameters. It also grabs information about the Scheduler trigger and its configuration.
  • GET /repositories/< repository >/items/< item >
    • This exposed endpoint grabs more granular workspace information, including reader and writer datasets.

 

Alternatively, you could use to grab scheduling information from the schedules endpoint:

  • GET /schedules
    • Make sure to enable automations. FYI, to filter results, the automation <id> is written to the schedule object's description.

 

Hope this helps! And if this is a workflow you'd like to be officially supported, please vote to support this idea: Publish FME Server REST API endpoints for retrieval of Automation workflow compo

Reply