openapi: 3.0.1 info: description: >- Subscription Service ![Subscription Service resources](/api/RWS/Swagger_Doc/images/subsrv-resourcemap.png) version: 3HAC073675-001 Revision:L title: Robot Web Services tags: - name: Subscribe on Resources description: Subscribe on Resources - name: Operations on Subscription Group description: Operations on Subscription Group servers: - url: https://127.0.0.1 description: Localhost VC - url: https://192.168.125.1 description: RC MGMT connection components: securitySchemes: basicAuth: type: http scheme: basic paths: /subscription: post: tags: - Subscribe on Resources summary: Subscribe on Resources description: >2- **Description :** The sequence of steps involved to setup subscription and start listening for events are shown below: Subscribe on resources Response to this HTTP request is a list of initial events for the subscribed resources along with the location header Retrieve location header and use this value to setup web socket connection Receive events and parse the events. The resource uri's which can be subscribed are listed below. Subscribe on RMMP Request Event - /users/rmmp Subscribe on Cellular Scan Resources - /progress/{id} Subscribe on Wifi Scan Resources - /progress/{id} Subscribe on Backup System Information - /progress/{id} Subscribe on Compress - /progress/{id} Subscribe on Decompress - /progress/{id} Subscribe on system dump - /ctrl/diagnostics Subscribe on Diagnostics States - /progress/{id} Subscribe on CFG Change Count - /rw/cfg Subscribe on CFG Load - /progress/{id} Subscribe DIPC Queue - /rw/dipc/{queue-name} Subscribe DIPC Queue - /rw/dipc/{queue-name};nomessage Subscribe on Elog Save - /progress/{id} Subscribe on Elog domain - /rw/elog/{domain-number} Subscribe IO Network - /rw/iosystem/networks/{network};state Subscribe IO Device - /rw/iosystem/devices/{network}/{device};state Subscribe IO Device alarms - /rw/iosystem/devices/{network}/{device};alarms (Supported from RW7.6) Subscribe IO Signal - /rw/iosystem/signals/{network}/{device}/{signal};state Subscribe IO System State - /rw/iosystem;state (i.e device added / removed events. Supported from RW7.13) Mastership Domain Subscribe - /rw/mastership/{domain-name} Subscribe Controller State - /rw/panel/ctrl-state Subscribe Controller-Operation Mode - /rw/panel/opmode Subscribe Speed Ratio - /rw/panel/speedratio Subscribe Controller Collision Detection State - /rw/panel/coldetstate (Supported from RW 7.10) Subscribe RAPID Execution - /rw/rapid/execution;ctrlexecstate Subscribe RAPID Execution extended - /rw/rapid/execution;execstate (Supported from RW 7.20) Subscribe RAPID Execution Cycle - /rw/rapid/execution;rapidexeccycle Subscribe on Hold to Run - /rw/rapid/execution;hdtrun Subscribe on RAPID Persistent Variable - /rw/rapid/symbol/{symbolurl}/data;value Subscribe on Build Log Change - /rw/rapid/tasks;buildlogchange Subscribe on RAPID Task Change - /rw/rapid/tasks/{taskname};taskchange Subscribe on RAPID PP Sync State Change - /rw/rapid/tasks/{taskname};syncstatechange Subscribe on Specific RAPID Task Execution Cycle - /rw/rapid/tasks/{taskname};rapidexeccycle (Supported from RW 7.20) Subscribe on RAPID Task PGM Execution State Change - /rw/rapid/tasks/{taskname};excstate Subscribe on RAPID execution state change count - /rw/rapid/execution;execstatechange (Supported from RW 7.20) Subscribe on Load RAPID Program - /progress/{id} Subscribe on Program Pointer - /rw/rapid/tasks/{task}/pcp;programpointerchange Subscribe on Motion Pointer - /rw/rapid/tasks/{task}/pcp;motionpointerchange Subscribe on UI Instruction - /rw/rapid/uiinstr;uievent Subscribe on Tasks Panel Change - /rw/rapid/taskselection;taskpanelchange Subscribe on System Energy - /rw/system/energy Subscribe on System UAS Change Count - /rw/system/uas (Supported from RW 7.20) Subscribe on Error EventChange - /rw/motionsystem/errorstate;erroreventchange Subscribe on Mechunit Change Count - /rw/motionsystem/mechunits;mechunitchangecount (Supported from RW 7.14) Subscribe on move in auto timeout alert - /rw/motionsystem/moveinautotimeout;token (Supported from RW 7.7) Subscribe on Collision Prediction - /rw/motionsystem/collisionprediction;collpred **Pre-requisites :** None **Limitation :** Maximum 1000 resources can be subscribed per group with low priotity and medium priority. Maximum number of RAPID persistent variable subscriptions is 200 per robot. Each client can have maximum 10 groups. Low priority subscription(p=0) and Medium priority subscription(p=1) is allowed on any resource. RobotWebservice clients can subscribe maximum of 64 resources with High priority (p=2). High priority subscription is allowed only on below two types of resources. 1.IOSignals in IOSYSTEM. 2.Rapid Persistentvariables in RAPID. **Sample Call** **Low Priority subscription** curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/iosystem/signals/Virtual1/Board1/di1;state&1-p=0&resources=2&2=/rw/iosystem/signals/Virtual1/Board1/di2;state&2-p=0" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/panel/ctrlstate&1-p=0" -X POST "https://localhost/subscription" **Medium Priority subscription** curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/iosystem/signals/Virtual1/Board1/di1;state&1-p=1&resources=2&2=/rw/iosystem/signals/Virtual1/Board1/di2;state&2-p=1" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/rapid/symbol/data/RAPID/T_ROB1/uimsg/PNum;value&1-p=1" "https://localhost/subscription" **High Priority subscription** curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/iosystem/signals/Virtual1/Board1/di1;state&1-p=2&resources=2&2=/rw/iosystem/signals/Virtual1/Board1/di2;state&2-p=2" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/rapid/symbol/data/RAPID/T_ROB1/uimsg/PNum;value&1-p=2" "https://localhost/subscription" **Subscribe on RMMP Request Event - /users/rmmp** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/users/rmmp&1-p=0" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/users/rmmp&1-p=1" -X POST "https://localhost/subscription" **Notes** Not supported on virtual controller. **Subscribe on Cellular Scan Resources - /progress/{id}** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/progress/1&1-p=0" -X POST "https://localhost/subscription" **Notes** If the subscription is created when Scan Operation is not completed(scan operation is in progress), the state will be in "pending". Not supported on virtual controller. **Subscribe on Wifi Scan Resources - /progress/{id}** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/progress/1&1-p=0" -X POST "https://localhost/subscription" **Notes** If the subscription is created when Scan Operation is not completed(scan operation is in progress), the state will be in "pending". Not supported on virtual controller. **Subscribe on Backup System Information - /progress/{id}** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/progress/1;state&1-p=0" -X POST "https://localhost/subscription" **Notes** If the subscription is created during backup creation of the system (backup.log is in progress),the state will be in "pending". Not supported on virtual controller. **Subscribe on Compress - /progress/{id}** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/progress/1;state&1-p=0" -X POST "https://localhost/subscription" **Notes** None **Subscribe on Decompress - /progress/{id}** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/progress/1;state&1-p=0" -X POST "https://localhost/subscription" **Notes** None **Subscribe on system dump - /ctrl/diagnostics** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/ctrl/diagnostics&1-p=0" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/ctrl/diagnostics&1-p=1" -X POST "https://localhost/subscription" **Notes** If there is no system dump available in the controller, the initial response will be empty. Also, if the subscription is created when a system dump is in progress, the initial response will be empty. If an client has already subscribed on the system dump resource(/ctrl/diagnostics), and the existing system dump folder has been deleted or moved, Path sent in the initial response can be invalid for the new client's subscribing on this resource since the folder has been deleted after the dump was created. Not supported on virtual controller. **Subscribe on Diagnostics States - /progress/{id}** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/progress/1;state&1-p=0" -X POST "https://localhost/subscription" **Notes** If the subscription is created when save System Diagnostics(diagnostics.log is in progress),the state will be in "pending". Not supp-orted on virtual controller. **Subscribe on CFG Change Count - /rw/cfg** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/cfg&1-p=0" "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/cfg&1-p=1" "https://localhost/subscription" **Notes** None **Subscribe on CFG Load - /progress/{id}** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/progress/1;state&1-p=0" -X POST "https://localhost/subscription" **Notes** None **Subscribe DIPC Queue - /rw/dipc/{queue-name}** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/dipc/testq&1-p=0" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/dipc/testq&1-p=1" -X POST "https://localhost/subscription" **Notes** None **Subscribe on Elog Save - /progress/{id}** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/progress/1;state&1-p=0" -X POST "https://localhost/subscription" **Notes** Save event log in sys dump format on controller. **Subscribe on Elog domain - /rw/elog/{domain-number}** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/elog/0&1-p=0" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/elog/0&1-p=1" -X POST "https://localhost/subscription" **Notes** None **Subscribe IO Network - /rw/iosystem/networks/{network};state** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/iosystem/networks/Local;state&1-p=0" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/iosystem/networks/Local;state&1-p=1" -X POST "https://localhost/subscription" **Notes** None **Subscribe IO Device - /rw/iosystem/devices/{network}/{device};state** **Sample Call** Subscribe on IO-Signal, it is possible to subscribe with any subscription priority (i.e High,Medium,Low priority) on IO-Signals. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/iosystem/signals/Local/DRV_1/DRV1K1;state&1-p=2" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/iosystem/signals/Local/DRV_1/DRV1K1;state&1-p=1" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/iosystem/signals/Local/DRV_1/DRV1K1;state&1-p=0" -X POST "https://localhost/subscription" **Notes** /rw/iosystem/signals/{network}/{device}/{signal};state will return only IO signal value and state. **Subscribe IO Signal - /rw/iosystem/signals/{network}/{device}/{signal};state** **Sample Call** Subscribe on IO-Signal, it is possible to subscribe with any subscription priority (i.e High,Medium,Low priority) on IO-Signals. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/iosystem/signals/Local/DRV_1/DRV1K1;state&1-p=2" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/iosystem/signals/Local/DRV_1/DRV1K1;state&1-p=1" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/iosystem/signals/Local/DRV_1/DRV1K1;state&1-p=0" -X POST "https://localhost/subscription" **Notes** /rw/iosystem/signals/{network}/{device}/{signal};state will return only IO signal value and state. **Mastership Domain Subscribe - /rw/mastership/{domain-name}** **Sample Call** Subscribe on edit domain for changes. Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/mastership/edit&1-p=0" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/mastership/motion&1-p=1" -X POST "https://localhost/subscription" **Notes** None **Subscribe Controller State - /rw/panel/ctrl-state** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/panel/ctrl-state&1-p=0" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/panel/ctrl-state&1-p=1" -X POST "https://localhost/subscription" **Notes** init: The robot is starting up. It will shift to state motors off when it has started. motoroff: The robot is in a standby state where there is no power to the robot's motors. The state has to be shifted to motors on before the robot can move. motoron: The robot is ready to move, either by jogging or by running programs. guardstop: The robot is stopped because the safety runchain is opened. For instance, a door to the robot's cell might be open. emergencystop: The robot is stopped because emergency stop was activated. emergencystopreset: The robot is ready to leave emergency stop state. The emergency stop is no longer activated, but the state transition isn't yet confirmed. sysfail: The robot is in a system failure state. Restart required. **Subscribe Controller-Operation Mode - /rw/panel/opmode** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/panel/opmode&1-p=0" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/panel/opmode&1-p=1" -X POST "https://localhost/subscription" **Notes** None **Subscribe Speed Ratio - /rw/panel/speedratio** **ample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/panel/speedratio&1-p=0" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/panel/speedratio&1-p=1" -X POST "https://localhost/subscription" **Notes** None **Subscribe RAPID Execution - /rw/rapid/execution;ctrlexecstate** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -X POST -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/rapid/execution;ctrlexecstate&1-p=0" "https://127.0.0.1/subscription" curl -u "Default User":robotics -X POST -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/rapid/execution;ctrlexecstate&1-p=1" "https://127.0.0.1/subscription" **Notes** None **Subscribe RAPID Execution Extended - /rw/rapid/execution;execstate** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -X POST -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/rapid/execution;execstate&1-p=0" "https://127.0.0.1/subscription" curl -u "Default User":robotics -X POST -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/rapid/execution;execstate&1-p=1" "https://127.0.0.1/subscription" **Notes** None **Subscribe RAPID Execution Cycle - /rw/rapid/execution;rapidexeccycle** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -X POST -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/rapid/execution;rapidexeccycle&1-p=0" "https://localhost/subscription" curl -u "Default User":robotics -X POST -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/rapid/execution;rapidexeccycle&1-p=1" "https://localhost/subscription" **Notes** None **Subscribe on Hold to Run - /rw/rapid/execution;hdtrun** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/rapid/execution;hdtrun&1-p=0" "https://127.0.0.1/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/rapid/execution;hdtrun&1-p=1" "https://127.0.0.1/subscription" **Notes** None **Subscribe on RAPID Persistent Variable - /rw/rapid/symbol/{symbolurl}/data;value** **Sample Call** Subscribe on RAPID persistent value. The resource url to subscribe on shall be on the form /rw/rapid/symbol/{symbolurl}/data;value. It is possible to possible to subscribe with any subscription priority (i.e High, Medium, Low priority) for RAPID persistent variables value. curl -u "Default User":robotics -X POST -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/rapid/symbol/RAPID/T_ROB1/uimsg/PNum2/data;value&1-p=2" "https://127.0.0.1/subscription" curl -u "Default User":robotics -X POST -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/rapid/symbol/RAPID/T_ROB1/uimsg/PNum1/data;value&1-p=1" "https://127.0.0.1/subscription" curl -u "Default User":robotics -X POST -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/rapid/symbol/RAPID/T_ROB1/uimsg/PNum2/data;value&1-p=0" "https://127.0.0.1/subscription" **Notes** None **Subscribe on Build Log Change - /rw/rapid/tasks;buildlogchange** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/rapid/tasks;buildlogchange&1-p=0" "https://127.0.0.1/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/rapid/tasks;buildlogchange&1-p=1" "https://127.0.0.1/subscription" **Notes** None **Subscribe on RAPID Task Change - /rw/rapid/tasks/{taskname};taskchange** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/rapid/tasks/T_ROB1;taskchange&1-p=0" "https://127.0.0.1/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/rapid/tasks/T_ROB1;taskchange&1-p=1" "https://127.0.0.1/subscription" **Notes** On subscription an empty initial event will be generated. **Subscribe on RAPID PP Sync State Change - /rw/rapid/tasks/{taskname};syncstatechange** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/rapid/tasks/T_ROB1;syncstatechange&1-p=0" "https://127.0.0.1/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/rapid/tasks/T_ROB1;syncstatechange&1-p=1" "https://127.0.0.1/subscription" **Notes** On subscription an empty initial event will be generated followed by the current value. **Subscribe on Specific RAPID Task Execution Cycle - /rw/rapid/tasks/{taskname};rapidexeccycle** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -X POST -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/rapid/tasks/T_ROB1;rapidexeccycle&1-p=0" "https://localhost/subscription" curl -u "Default User":robotics -X POST -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/rapid/tasks/T_ROB1;rapidexeccycle&1-p=1" "https://localhost/subscription" **Notes** None **Subscribe on RAPID Task PGM Execution State Change - /rw/rapid/tasks/{taskname};excstate** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/rapid/tasks/T_ROB1;excstate&1-p=0" "https://127.0.0.1/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/rapid/tasks/T_ROB1;excstate&1-p=1" "https://127.0.0.1/subscription" **Notes** On subscription an empty initial event will be generated followed by the current value **Subscribe on RAPID execution state change count - /rw/rapid/execution;execstatechange** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -X POST -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/rapid/execution;execstatechange&1-p=0" "https://localhost/subscription" curl -u "Default User":robotics -X POST -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/rapid/execution;execstatechange&1-p=1" "https://localhost/subscription" **Notes** None **Subscribe on Load RAPID Program - /progress/{id}** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/progress/1;state&1-p=0" -X POST "https://localhost/subscription" **Notes** None **Subscribe on Program Pointer - /rw/rapid/tasks/{task}/pcp;programpointerchange** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/rapid/tasks/T_ROB1/pcp;programpointerchange&1-p=0" "https://127.0.0.1/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/rapid/tasks/T_ROB1/pcp;programpointerchange&1-p=1" "https://127.0.0.1/subscription" **Notes** On subscription an empty initial event will be generated followed by the current value. **Subscribe on Motion Pointer - /rw/rapid/tasks/{task}/pcp;motionpointerchange** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/rapid/tasks/T_ROB1/pcp;motionpointerchange&1-p=0" "https://127.0.0.1/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/rapid/tasks/T_ROB1/pcp;motionpointerchange&1-p=1" "https://127.0.0.1/subscription" **Notes** On subscription an empty initial event will be generated followed by the current value. **Subscribe on UI Instruction - /rw/rapid/uiinstr;uievent** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/rapid/uiinstr;uievent&1-p=0" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/rapid/uiinstr;uievent&1-p=1" -X POST "https://localhost/subscription" **Notes** None **Subscribe on Tasks Panel Change - /rw/rapid/taskselection;taskpanelchange** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/rapid/taskselection;taskpanelchange&1-p=0" "https://127.0.0.1/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/rapid/taskselection;taskpanelchange&1-p=1" "https://127.0.0.1/subscription" **Notes** None **Subscribe on System Energy - /rw/system/energy** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/system/energy&1-p=0" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/system/energy&1-p=1" -X POST "https://localhost/subscription" **Notes** None **Subscribe on System UAS Change Count - /rw/system/uas** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/system/uas&1-p=0" -X POST "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/system/uas&1-p=1" -X POST "https://localhost/subscription" **Notes** None **Subscribe on Error EventChange - /rw/motionsystem/errorstate;erroreventchange** **Sample Call** Only low priority subscription(-p=0) and medium priority subscription(-p=1) are allowed on this resource. curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/motionsystem/errorstate;erroreventchange&1-p=0" "https://localhost/subscription" curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -X POST -d "resources=1&1=/rw/motionsystem/errorstate;erroreventchange&1-p=1" "https://localhost/subscription" **Notes** On subscription, an empty initial event will be generated. requestBody: content: application/x-www-form-urlencoded;v=2.0: schema: type: object required: - resources - - -p properties: resources: description: An identifier type: string : description: The subscription resource URI type: string -p: description: >- The priority associated with the subscription resource. '0' for Low priority (Valid for all resources) '1' for Medium priority (Valid for all resources) '2' for High priority (Valid for only 'IOSIGNALS' and 'RAPID Persistent variable value' resources) type: string example: resources=string&=string&-p=string description: Data parameter(s) responses: '201': description: The request has been fulfilled, and a new resource is created content: application/hal+json;v=2.0: schema: properties: lstate: description: Signals state {blocked | unblocked} lvalue: description: Logical Signal value xml: name: data wrapped: true application/xhtml+xml;v=2.0: examples: response: value: > '400': description: The request cannot be fulfilled due to bad syntax '415': description: >- The server will not accept the request, because the media type is not supported security: - basicAuth: [] /subscription/{group-id}: put: tags: - Operations on Subscription Group summary: Edit Subscription Resource(s) description: > **Description :** Add new resources, remove existing resources or change existing resources priorities. **Pre-requisites :** None **Limitation :** Maximum 1000 resources can be subscribed per group. Each client can have maximum 10 groups: Low priority subscription(p=0) is allowed on any resource. Medium priority subscription(p=1) is allowed on any resource. RobotWebservice clients can subscribe maximum of 64 resources with High priority (p=2). High priority subscription is allowed only on below two types of resources. IOSignals in IOSYSTEM. RapidPersistentvariables in RAPID. **Sample Call** curl -u "Default User":robotics -H "Content-Type: application/x-www-form-urlencoded;v=2.0" -d "resources=1&1=/rw/iosystem/signals/Virtual1/Board1/di1;state&1-p=0&resources=2&2=/rw/iosystem/signals/Virtual1/Board1/di2;state&2-p=1" -X PUT "https://localhost/subscription/1" **Example java script :** ``` const https = require('https') //To disable SSL process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; //provide the user id and password let encoded = Buffer.from("Default user:robotics").toString('base64') const data = 'const data = { opmode: {string} }'; var auth = "Basic " + encoded; const options = { hostname: 'localhost', port: 443, path: '/subscription/0', method: 'PUT', headers:{ 'Accept': 'application/hal+json;v=2.0', 'Content-Type': 'application/x-www-form-urlencoded;v=2.0', 'Authorization': auth, 'Content-Length': data.length } } const req = https.request(options, res => { console.log(`statusCode: ${res.statusCode}`) res.on('data', d => { process.stdout.write(d) console.log(res.headers.location) }) }) req.on('error', error => { console.error(error) }) req.write(data) req.end() ``` parameters: - name: group-id in: path description: '{group-id}' required: true schema: type: string requestBody: content: application/x-www-form-urlencoded;v=2.0: schema: type: object required: - resources - - -p properties: resources: description: An identifier type: string : description: The subscription resource URI type: string -p: description: The priority associated with the subscription resource. type: string example: resources=string&=string&-p=string description: Data parameter(s) responses: '200': description: Standard response for successful HTTP requests '400': description: The request cannot be fulfilled due to bad syntax '415': description: >- The server will not accept the request, because the media type is not supported security: - basicAuth: [] delete: tags: - Operations on Subscription Group summary: Unsubscribe or Remove Group description: > **Description :** Unsubscribe or remove the subscription group/resources in group. **Pre-requisites :** None **Limitation :** None **Sample Call** curl -u "Default User":robotics -H "accept: application/xhtml+xml;v=2.0" -X DELETE "https://localhost/subscription/1" **Example java script :** ``` const https = require('https') process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; //provide the user id and passowrd let encoded = Buffer.from("Default user:robotics").toString('base64') var auth = "Basic " + encoded; const options = { hostname: 'localhost', port: 443, path: '/subscripion/0', method: 'DELETE', headers:{ 'Accept': 'application/hal+json;v=2.0', 'Authorization': auth } } const req = https.request(options, res => { console.log(`statusCode: ${res.statusCode}`) res.on('data', d => { process.stdout.write(d) }) }) req.on('error', error => { console.error(error) }) req.end() ``` parameters: - name: group-id in: path description: '{group-id}' required: true schema: type: string responses: '200': description: Standard response for successful HTTP requests '400': description: The request cannot be fulfilled due to bad syntax '406': description: >- The server can only generate a response that is not accepted by the client security: - basicAuth: [] /subscription/{group-id}/{resource-uri}: delete: tags: - Operations on Subscription Group summary: Unsubscribe or Remove Resource(s) description: > **Description :** Unsubscribe or remove the resource from subscription group. **Pre-requisites :** None **Limitation :** None **Sample Call** curl -u "Default User":robotics -H "accept: application/xhtml+xml;v=2.0" -X DELETE "https://localhost/subscription/1/rw/iosystem/signals/Virtual1/Board1/di1;state" **Example java script :** ``` const https = require('https') process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; //provide the user id and passowrd let encoded = Buffer.from("Default user:robotics").toString('base64') var auth = "Basic " + encoded; const options = { hostname: 'localhost', port: 443, path: 'subscription/1/rw/iosystem/signals/Virtual1/Board1/di1;state', method: 'DELETE', headers:{ 'Accept': 'application/hal+json;v=2.0', 'Authorization': auth } } const req = https.request(options, res => { console.log(`statusCode: ${res.statusCode}`) res.on('data', d => { process.stdout.write(d) }) }) req.on('error', error => { console.error(error) }) req.end() ``` parameters: - name: group-id in: path description: '{group-id}' required: true schema: type: string - name: resource-uri in: path description: '{resource-uri}' required: true schema: type: string responses: '200': description: Standard response for successful HTTP requests '400': description: The request cannot be fulfilled due to bad syntax '406': description: >- The server can only generate a response that is not accepted by the client security: - basicAuth: []