Answers for "How download file in resources path using rest api" https://knowledge.亚搏在线safe.com/questions/84972/how-download-file-in-resources-path-using-rest-api.html The latest answers for the question "How download file in resources path using rest api" Answer by tiagocnorberto https://knowledge.safe.com/answers/85072/view.html

In my url, was missing "filesys".Now is working!!Thank you!!

My correct url is:

Using get method:

http://myserver/fmerest/v3/resources/connections/FME_SHAREDRESOURCE_DATA/filesys/geodados/Bairro_Popular.zip?fmetoken=mytoken

Using post

http://myserver/fmerest/v3/resources/connections/FME_SHAREDRESOURCE_DATA/filesys/geodados/Bairro_Popular.zip

Headers:

  1. Authorization: fmetoken token=...
  2. Accept: application/octet-stream


My file it's at :Resources>Data>geodados> Bairro_Popular.zip


Thanks,

Wed, 09 Jan 2019 15:28:43 GMT tiagocnorberto
Answer by danilo_fme https://knowledge.safe.com/answers/84990/view.html

Hi@tiagocnorberto

I agree with@itayand@david_r.

The API documentation and the REST API training manual are very interesting to help in this case.


Please, tell us the solution or not your Question.


Thanks,

Danilo


Tue, 08 Jan 2019 16:04:15 GMT danilo_fme
Answer by itay https://knowledge.safe.com/answers/84986/view.html

Hi@tiagocnorberto,

TheREST API training manualis a good place to start with FME Server REST.

Hope this helps,

Itay

Tue, 08 Jan 2019 15:35:44 GMT itay
Answer by david_r https://knowledge.safe.com/answers/84983/view.html

I do it using the following API endpoint:

http://
         
          /fmerest/v3/resources/connections
         /
        
         /filesys/
         
        

Notice the "filesys" part between the resource name and the filename.And I'm also using the following headers:

Authorization: fmetoken token=...Accept: application/octet-stream

Note that I do not put the token in the URL.

Tue, 08 Jan 2019 15:22:37 GMT david_r