Skip to main content
Solved

How to extract FeatureReader/Writer parameters using FMEFlow Rest API v3

  • September 19, 2024
  • 4 replies
  • 110 views

ecx
Supporter
Forum|alt.badge.img+5
  • Supporter
  • 31 replies

Hello, 

I currently have a workbench that extracts all of my job history, auotmations, dataEndpoints (readers/writers) which I feed into a powerBI dashboard so I can more easily track data i/o, and jobs via using httpcallers and the fme flow rest api v3.

I have just realised there is a issue with this, FeatureReaders, FeatureWriters, SQLExecutors and SQLCreators are excluded when using get “/repositories/{repository}/items/{item}/datasets/{dtype}”… to extract my readers/writers, dtype refers to source or destination, which is only assigned to readers and writers.
The issue is FeatureReaders and FeatureWriter are transformers, they are not included in this output!

What other methods can I use to extract these parameters from the FeatureReaders/FeatureWriters? (source/destination datasets specifically)

Best answer by todd_davis

Been here:

Only way I know is to read the workspace from Flow and then use it in a FME Workspace reader and get it from the Transformer Parameters

So I call:

$(URL)/fmerest/v3/repositories/@Value(repositoryName)/items/@Value(name)

Accept: application/octet-stream

and then read the workspace:

I look for things in the transformer parameters names like (rather than limiting to FeatureReader/FeatureWriters):

Regex Dataset$|Dataset\{\*\}$

Contains CONNECTION_FILE

etc

 

It does mean that this process is quite long in the FME Flow has hundreds/thousands of workspaces, but I think you do need to do it, if you really want to understand all the interactions.

 

Also worth noting the new dependency api call in V4. It does not answer this question, but a newer useful call that can potentially help in specific scenarios: https://demos-safe-software.fmecloud.com/fmeapiv4/docs/index.html

 

 

 

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.

4 replies

todd_davis
Influencer
Forum|alt.badge.img+23
  • Influencer
  • 313 replies
  • Best Answer
  • September 20, 2024

Been here:

Only way I know is to read the workspace from Flow and then use it in a FME Workspace reader and get it from the Transformer Parameters

So I call:

$(URL)/fmerest/v3/repositories/@Value(repositoryName)/items/@Value(name)

Accept: application/octet-stream

and then read the workspace:

I look for things in the transformer parameters names like (rather than limiting to FeatureReader/FeatureWriters):

Regex Dataset$|Dataset\{\*\}$

Contains CONNECTION_FILE

etc

 

It does mean that this process is quite long in the FME Flow has hundreds/thousands of workspaces, but I think you do need to do it, if you really want to understand all the interactions.

 

Also worth noting the new dependency api call in V4. It does not answer this question, but a newer useful call that can potentially help in specific scenarios: https://demos-safe-software.fmecloud.com/fmeapiv4/docs/index.html

 

 

 


ecx
Supporter
Forum|alt.badge.img+5
  • Author
  • Supporter
  • 31 replies
  • September 23, 2024

Been here:

Only way I know is to read the workspace from Flow and then use it in a FME Workspace reader and get it from the Transformer Parameters

So I call:

$(URL)/fmerest/v3/repositories/@Value(repositoryName)/items/@Value(name)

Accept: application/octet-stream

and then read the workspace:

I look for things in the transformer parameters names like (rather than limiting to FeatureReader/FeatureWriters):

Regex Dataset$|Dataset\{\*\}$

Contains CONNECTION_FILE

etc

 

It does mean that this process is quite long in the FME Flow has hundreds/thousands of workspaces, but I think you do need to do it, if you really want to understand all the interactions.

 

Also worth noting the new dependency api call in V4. It does not answer this question, but a newer useful call that can potentially help in specific scenarios: https://demos-safe-software.fmecloud.com/fmeapiv4/docs/index.html

 

 

 

Thank you for the response and a way to do it! 

Once i’ve downloaded the octet-stream, (binary of the fmws?), is there a way to read them within the same workbench or do I have to save them somewhere and then read them all from there? How can I write this binary to a file to read if that is what is required?

Thanks!


todd_davis
Influencer
Forum|alt.badge.img+23
  • Influencer
  • 313 replies
  • September 23, 2024

You can do it all in the same workspace. I use a temppathname transformer to ensure the file is deleted post run, but the main thing I use is the attributefilewriter transformer to write the fmw before reading.

I hope I got that all correct, as I am on my mobile and can’t look at the process right now.

 

Cheers,

Todd


ecx
Supporter
Forum|alt.badge.img+5
  • Author
  • Supporter
  • 31 replies
  • September 23, 2024

You can do it all in the same workspace. I use a temppathname transformer to ensure the file is deleted post run, but the main thing I use is the attributefilewriter transformer to write the fmw before reading.

I hope I got that all correct, as I am on my mobile and can’t look at the process right now.

 

Cheers,

Todd



Thank you very much Todd! I’m surprised I got an answer to this one so quickly!