Skip to main content

Hi, I am using the FME Server REST API and needing some guidance.

I have a published workspace in FME Server and run daily via the scheduler to output a .json file on my FME Server. I am trying to call the data with the FME Server REST API to retrieve the .json file so that I can hand it over to our web developer for him to use for an application he wrote. I do not want the FME Server Job to run everytime an API call is made to get the .json file/data.

I am new to using the FME Server REST API but have tried playing around with the API v3 GET GET /repositories/< repository >/items/< item >/datasets/< dtype >

Can someone please help me to get on the right track on using FME server to get my data via an API call/URL?

Thanks!

 

As far as I know, best way to achieve this is to write the output data in the FME Server Resources and use the REST resource API to read the json file.


As far as I know, best way to achieve this is to write the output data in the FME Server Resources and use the REST resource API to read the json file.

Thank you, Larry. I have never done that before... would this be a parameter link to make in my json writer?

Hi, thank you for posting your question on the community page. From my understanding, you have a workspace that is writing a JSON file to a resource on your FME Server. We do have a call to download files and it is located here: https://docs.safe.com/fme/html/FME_REST/apidoc/v3/index.html#!/resources/postDownload_post_8

The URL would be: POST resources/connection/<resource>/download/path.

An example of how to use this call can be found here:

REST API Training Course (this page may change as we update the course).

If you get stuck with this please let me know!

Also, in a week we have a full course on the REST API if you are interested. https://www.safe.com/training/registration/7010c000002WjbFAAS/


Thank you, Larry. I have never done that before... would this be a parameter link to make in my json writer?
The json output path in your workspace must write to a resource folder. As an example, if your write your json file directly to the resource data folder, the path will be:

 

$(FME_SHAREDRESOURCE_DATA)test.json

 

Then, your developer can use the REST API this way:

 

http://fmeserver/fmerest/v3/resources/connections/FME_SHAREDRESOURCE_DATA/download/test.json

 

 

 

 


Hi, thank you for posting your question on the community page. From my understanding, you have a workspace that is writing a JSON file to a resource on your FME Server. We do have a call to download files and it is located here: https://docs.safe.com/fme/html/FME_REST/apidoc/v3/index.html#!/resources/postDownload_post_8

The URL would be: POST resources/connection/<resource>/download/path.

An example of how to use this call can be found here:

REST API Training Course (this page may change as we update the course).

If you get stuck with this please let me know!

Also, in a week we have a full course on the REST API if you are interested. https://www.safe.com/training/registration/7010c000002WjbFAAS/

Thank you @SiennaAtSafe All great suggestions! I will check out the training course.

 


We were successful! Thanks @larry & @SiennaAtSafe

Note: It helped me to download Postman for Chrome and test the urls and get requests.


Reply