Skip to main content
Solved

Retrieve the item from API REST repository


john_galt
Contributor
Forum|alt.badge.img

Using the FME Server REST API repositories I am able to retrieve items for every repository using the HTTPCaller , but I have a difficulty retrieving an actual item (the .fmw to download or put into a parameter)

As in this example

imageI tried Accept=contents and disposition=inline in the Headers section of HTTPCaller, but all I get is information about the items and not the item itself

imageCan someone give me an example of configuration of the HTTPCaller in order to retrive de item itself.

 

Thanks in advance!

Best answer by virtualcitymatt

So this is what works for me.

 

You just need the right path to the workspace. The request must be a GET and you need to make sure you are saving the repose to a file. You will also need to make sure the Web Connection you're using has the correct permission to download items from the required repository.

 

You don't need to worry about the Content-Type here. Just leave headers blank.

 

image

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

3 replies

virtualcitymatt
Celebrity
Forum|alt.badge.img+39

So this is what works for me.

 

You just need the right path to the workspace. The request must be a GET and you need to make sure you are saving the repose to a file. You will also need to make sure the Web Connection you're using has the correct permission to download items from the required repository.

 

You don't need to worry about the Content-Type here. Just leave headers blank.

 

image


david_r
Celebrity
  • August 9, 2023

I also recommend that you use a TextEncoder on both the repository and workspace name before using it as part of the URL in the HTTPCaller, e.g.

imageYou can then use the GET method on the API, e.g.

/fmerest/v3/repositories/@Value(repositoryName_encoded)/items/@Value(workspaceName_encoded)

 


john_galt
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • October 12, 2023

Thank you both virtualcitymatt and david_r for your answers!


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