Robot Web Services
3HAC050973-001 Revision:L, Application Manual - Robot Web Services
Get CFG actions

Get a list of actions that can be performed on the CFG subsystem.

URL

/rw/cfg

Method

GET

URL Params

action=show Required

Returns action forms for this resource

See Common URL parameters

Data Params

None

Success Response

HTTP_OK(200)

see HTTP Status codes

Example Response

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>cfg</title>
    <base href="http://localhost/rw/"/>
</head>
<body>
    <div class="state">
        <form action="/rw/cfg?action=validate" id="validate" method="post">
            <input name="filepath" type="text"/>
            <select name="action-type">
                <option selected="selected" value="add"/>
                <option value="replace"/>
                <option value="add-with-reset"/>
            </select>
        </form>
        <form action="/rw/cfg?action=load" id="load" method="post">
            <input name="filepath" type="text"/>
            <select name="action-type">
                <option selected="selected" value="add"/>
                <option value="replace"/>
                <option value="add-with-reset"/>
            </select>
        </form>
        <form id="validate-instance-at-del" method='post' action="rw/cfg?action=validate-inst-at-del">
            <input type="text" name="instance name"/>
        </form>
        <form id="subscribe" method="post" action="/subscription">

        <fieldset class="cfg-change-count-ev">
        <input name="resources" value="1" type="checkbox"/>
        <input class="res" name="1" value="/rw/cfg" maxlength="500" type="text"/>
        <select class="priority" name="1-p">
        <option value="0" selected="selected"/>
        <option value="1"/>
        </select>
        </fieldset>
        </form>
    </div>
</body>
</html>

Actions

  • validate - Validate a configuration file before loading. Inspecting a CFG file for any errors that would occur during a load of the file, including checking for duplicate instance-names.
    • filepath=[file path] Required, RobotWare environ variables such as $HOME, $TEMP can be used in the filepath.
    • action-type=[add | replace | add-with-reset] Required, Multiple selection
      • add - Load a configuration file as external, i.e., instances will not be write-protected. If any instance in the file already exists, the file will not be loaded and an error code is returned.
      • replace - As add, but the cfg-domain is reset before loading
      • add-with-reset - Add the instances in the given file to the database. In case of instance name conflicts, the new instances replaces the existing.
  • load - Load a CFG configuration file.
    • filepath=[file path] Required, RobotWare environ variables such as $HOME, $TEMP can be used in the filepath.
    • action-type=[add | replace | add-with-reset] Required, Multiple selection. See validate.

Error Response

BAD_REQUEST(400)

HTTP Errors, see HTTP Status codes

Robot controller errors, See Robot controller return codes

Sample Call

Retrieve actions on the CFG resource

curl --digest -u "Default User":robotics" "http://localhost/rw/cfg?action=show"

Validate CFG file before load

curl --digest -u "Default User":robotics -d "filepath=$TEMP/a.cfg&action-type=add-with-reset" -X POST "http://localhost/rw/cfg?action=validate"

Load CFG file

curl --digest -u "Default User":robotics -d "filepath=$TEMP/a.cfg&action-type=add-with-reset" -X POST "http://localhost/rw/cfg?action=load"

Notes

Not supported in bootserver mode