Since the
read-resource operation is a built-in operation provided by the management component, as opposed to extensions, the response is formatted as follows.
Example 2.10. Response as JSON
HTTP/1.1 200 OK
Content-Type: application/json
{
"description": "Available operations and children (sub-resources).",
"children": [
{
"name": "foo",
"description": "Some description",
"link": {
"rel": "child",
"href": "http://localhost:8080/rest/private/managed-components/foo"
}
}
],
"operations": [
{
"operation-name": "read-resource",
"operation-description": "Lists information about a managed resource, including available operations and children (sub-resources).",
"link": {
"rel": "self",
"href": "http://localhost:8080/rest/private/managed-components"
"type": "application/json"
"method": "get"
}
}
]
}Example 2.11. Response as XML
HTTP/1.1 200 OK Content-Type: application/xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <resource> <description>Available operations and children (sub-resources).</description> <children> <child> <name>foo</name> <description>Some description</description> <link href="http://localhost:8080/rest/private/managed-components/foo" rel="child"/> </child> </children> <operations> <operation> <operation-name>read-resource</operation-name> <operation-description>Lists information about a managed resource, including available operations and children (sub-resources).</operation-description> <link href="http://localhost:8080/rest/private/managed-components" rel="self" type="application/xml" method="get"/> </operation> </operations> </resource>