relative path for referencing files or objects on Server repository
I remember there is a shortcut to providing a relative path to a file that is already stored on the Server repository (e.g., to reference an image file that you want to publish in a web app), but I don't remember the exact formulation and couldn't find it. Can someone remind me? Something like "/internal/resources/{actual path}" is what I recall, but I can't seem to get it quite right. Thanks in advance!
Best Answer
-
rfuentealba RapidMiner Certified Analyst, Member, University Professor Posts: 568 Unicorn
Hello, @Telcontar120
I believe that what you want is this: http://localhost:8080/internal/rest/resources/${path_to_your_resource}
Don't forget to assign the proper permissions to the file you are uploading. I always get caught on that one.
Cheers!
2
Answers
I should have tagged some of the relevant Server experts in my initial post, like @BalazsBarany or @SGolbert or @JEdward or @Thomas_Ott. Thanks guys!
Lindon Ventures
Data Science Consulting from Certified RapidMiner Experts
@Telcontar120 hmm, I did not know of such shortcut. Would be cool to find out!
@rfuentealba Thanks for the reminder! And actually, you don't need the http://localhost:8080 portion either, you can just start the reference with /internal/rest/resources/...
(I had forgotten the /rest/ portion of the path). I just retested this and it works.
And good reminder on the file permissions as well!
Lindon Ventures
Data Science Consulting from Certified RapidMiner Experts
Ah yeah, the host and port thing was just as I copied and pasted from a (non-RapidMiner) app that had to consume resources from RM Server.
Glad it worked!
@rfuentealba @Telcontar120 @Thomas_Ott
Just for completion:
The link for objects which are available for everyone (i.e. where anonymous applies) is: /api/rest/public/resources/...
Happy Mining,
Edin