Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
Uploading RAPID program to controller via RWS?
AriG
✭
Hello, I am new to RWS and HTTP/API usage in general. I am trying to upload a RAPID module to a virtual controller but I am kind of confused at the moment. I am following the documentation at this link, and the sample call is perplexing me.
curl --digest -u "Default User":robotics -d -X PUT "http://localhost/fileservice/$home/test.txt"
Based on the reading I have been attempting on the subject of RESTful APIs, it seems as though we are telling the controller to create a resource named 'text.txt' and specifying its path on the controller. I am confused though as to how we are specifying what the contents of this file actually are. I thought that the -d tag prefaced the data yet in this specific call I do not see any data (other than the filename) specified. Is this not what the complete call would look like (i.e. the body section is still missing)? If so, what would that look like? Is there another part of this that I am fundamentally misunderstanding? Any help here would be greatly appreciated.
curl --digest -u "Default User":robotics -d -X PUT "http://localhost/fileservice/$home/test.txt"
Based on the reading I have been attempting on the subject of RESTful APIs, it seems as though we are telling the controller to create a resource named 'text.txt' and specifying its path on the controller. I am confused though as to how we are specifying what the contents of this file actually are. I thought that the -d tag prefaced the data yet in this specific call I do not see any data (other than the filename) specified. Is this not what the complete call would look like (i.e. the body section is still missing)? If so, what would that look like? Is there another part of this that I am fundamentally misunderstanding? Any help here would be greatly appreciated.
0
Comments
-
Hi AriG,
You need to use the --data-binary option for this: https://ec.haxx.se/http/http-post#posting-binary
Regards,
Joost0 -
Hi AriG,Were you successful in uploading a file with content using RWS?
I am trying to do the same, and could use some help.0
Categories
- All Categories
- 5.7K RobotStudio
- 402 UpFeed
- 21 Tutorials
- 16 RobotApps
- 307 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 251 ScreenMaker
- 2.9K Robot Controller
- 368 IRC5
- 92 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 859 RAPID Programming
- 43 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 111 Collaborative Robots
- 5 Job listings