Devices and Components are handled similarly except in the area of properties, as shown below.

HTTP GET

/ redhawk / rest / domains / DOMAIN_NAME / deviceManagers / DEVICEMANAGER_ID / devices

{
    "devices": [
        { 
            "id":   "deviceId", 
            "name": "deviceName" 
        }
    ]
}

The devices list can be indexed further by using the id field of interest.

HTTP GET

/ redhawk / rest / domains / DOMAIN_NAME / deviceManagers / DEVICEMANAGER_ID / devices / DEVICE_ID

{
    "id":       "deviceId",
    "name":     "deviceName",
    "started":  false,  /* or true */
    "properties": [
        /* List of property structures */
    ],
    "ports": [
        /* List of port structures */
    ]
}
HTTP GET

/ PARENT_PATH / properties

{
    "properties": [
        /* List of property structures */
    ]
}

The properties field is a list of structures indexed by id following this general format:

{
    "id":       "propertyId",
    "name":     "propertyName",
    "kinds":    [],          /* configure, allocation, execparam, event, message */
    "scaType":  "simple",    /* simple, struct, simpleseq, structseq */
    "mode":     "readwrite", /* readonly, writeonly, readwrite */
    "value":    "",          /* Depends on scaType */
}

For more information on the structures, see Properties.

HTTP PUT

/ PARENT_PATH / properties

{
    /* configure, allocate, deallocate */
    "method": "configure",
    "properties": [
        /* simplified list of properties */
        {
            "id":       "propertyId",
            "value":    ""  /* As appropriate */   
        },
    ]
}

The properties field is a list of structures which follow the structures defined in Properties with the exception that only the id and value fields are important. Everything else is optional and will be ignored at the server.

In all cases, the server will respond with this structure:

{
    "method":   "configure",
    "status":   true,
    "message":  ""  
}

The method will always match what was attempted. It is not possible to perform two methods at the same time.

The status field will be the response of the Device attempting to allocate or deallocate the properties. The configure method returns void, so its return status is true to assume success (unless an Exception is thrown, at which point message will indicate).

The message is any number of responses of the Device to the method for the provided property list.

HTTP GET

/ PARENT_PATH / ports

{
    "ports": [
        /* List of port structures */
    ]
}

The general format for ports is shown here:

{
    "name":     "portName",
    "repId":    "IDL:<namespace>/<type>:<version>",
    "direction": "Uses", /* or Provides */
    "idl": {
        "namespace":    "BULKIO", /* or FRONTEND */
        "version":      ":<version>",
        "type":         "<type>"
    }
}

The list can be indexed using the name field. See Ports for more information.