REST API - registerAttributes

The table summarizes the REST API - registerAttributes.

Request

Format
POST <baseurl>/audit/attributes/register/<componentid>
Path parameters componentid: The ID of the registered component that the attributes are being registered against. This is the id returned from a call to registerComponent or getComponents .
Body AttributeDefinitions element (mandatory): An array of AttributeDefinition objects, the properties of the attributes being registered.

Response

JSON Returns a JSON representation of the content of an RegisterAttributesResponse element.
XML Returns the content of an RegisterAttributesResponse element (from the EventCollectorUpdateService schema).

Example

Request
POST <baseurl>/audit/attributes/register/19
Request body
<AttributeDefinitions>
<definition>
<category>message</category>
<isPrimary>true</isPrimary>
<length>256</length>
<name>testAttr1</name>
<type>STRING</type>
</definition>
<definition>
<category>message</category>
<length>256</length>
<name>testAttr2</name>
<type>STRING</type>
</definition>
</AttributeDefinitions>
Response
{
  "xml-fragment": {
    "definition": [
      {
        "category": "message",
        "componentId": "19",
        "id": "291",
        "isPrimary": "false",
        "length": "-1",
        "name": "testAttr1",
        "type": "STRING"
      },
      {
        "category": "message",
        "componentId": "19",
        "id": "290",
        "isPrimary": "false",
        "length": "-1",
        "name": "testAttr2",
        "type": "STRING"
      }
    ]
}