Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 27 Next »

Overview

Universal Controller supports the following RESTful-based web services for Universal Event Templates, which are listed alphabetically on this page.

Formatting specifications for each web service, including details about parameter requirements, are provided.

Create a Universal Event Template


Description

URI

http://host_name/uc/resources/universaleventtemplate

HTTP Method

POST

Description

Creates a Universal Event Template.

Example URI

http://localhost:8080/uc/resources/universaleventtemplate
AuthenticationHTTP Basic

Consumes Content-Type

application/xml, application/json

Produces Content-Type

n/a

Example

See Create, Modify, and Read a Universal Event Template: XML and JSON Examples, below.

Universal Event Template Properties

See Universal Event Template Properties.

Example Response

  • Status 200 /OK
    Successfully created the universal event template with id <id>.
  • Status 400 /Bad Request
    Create universal template failed. (message).

Create, Modify, and Read a Universal Event Template: XML and JSON Examples

XML

JSON

 XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<eventTemplate retainSysIds="true">
    <attributes>
        <attribute>
            <label>attribute_label1</label>
            <name>attribute_name1</name>
            <type>Text</type>
        </attribute>
        <attribute>
            <label>attribute_label2</label>
            <name>attribute_name2</name>
            <type>Integer</type>
        </attribute>
        <attribute>
            <label>attribute_label3</label>
            <name>attribute_name3</name>
            <type>Boolean</type>
        </attribute>
        <attribute>
            <label>attribute_label4</label>
            <name>attribute_name4</name>
            <type>Float</type>
        </attribute>
    </attributes>
    <attributePolicy>Include Attributes</attributePolicy>
    <description>Global universal event template description.</description>
    <label>Global Universal Event - Label</label>
    <name>global_universal_event_template</name>
    <sysId>66c6e90f5a334378809884a11cb12ac0</sysId>
    <TTL>11</TTL>
</eventTemplate>

TTL

 JSON

{
    "attributes": [
        {
            "label": "attribute_label1",
            "name": "attribute_name1",
            "type": "Text"
        },
        {
            "label": "attribute_label2",
            "name": "attribute_name2",
            "type": "Integer"
        },
        {
            "label": "attribute_label3",
            "name": "attribute_name3",
            "type": "Boolean"
        },
        {
            "label": "attribute_label4",
            "name": "attribute_name4",
            "type": "Float"
        }
    ],
    "attributePolicy": "Include Attributes",
    "description": "Global universal event template description.",
    "label": "Global Universal Event - Label",
    "name": "global_universal_event_template",
    "retainSysIds": true,
    "sysId": "66c6e90f5a334378809884a11cb12ac0",
    "TTL": 11
}

Delete a Universal Event Template


Description

URI

http://host_name/uc/resources/universaleventtemplate

HTTP Method

DELETE

Description

Deletes a Universal Event Template.

URI Parameters

See Delete a Universal Template URI Parameters, below.

Example URI

Example Response

  • Status 200 /OK
    Universal event template deleted successfully.
  • Status 400 /Bad Request
    Mutual exclusion violation. Cannot specify templatename and templateid at the same time.
  • Status 404 /Not Found
    A universal event template with "<{name/id>" does not exist.

Delete a Universal Event Template - URI Parameters

Parameter

Description

Specifications

Required

Mutually Exclusive With

templateid

ID used within the Controller to identify this Universal Event Template.

String; URI parameter.

Y (unless templatename is specified)

templatename

templatename

Name used within the Controller to identify this Universal Event Template.

String; URI parameter.

Y (unless templateid is specified)

templateid

List Universal Event Templates


Description

URI

http://host_name/uc/resources/universaleventtemplate/list

HTTP Method

GET

Description

Retrieves information on Universal Event Templates using specific query parameters.

Example URI

Authentication

HTTP Basic

Produces Content-Type

application/xml, application/json

Example

See Create, Modify, and Read a Universal Event Template: XML and JSON Examples, below.

Universal Event Template Properties

See Universal Event Template Properties.

List Universal Event Templates - URI Parameters

Parameter

Description

Specifications

Required

templatename

Name used within the Controller to identify this Universal Event Template.

Wildcards are supported.

N

List Universal Event Templates: XML and JSON Examples

XML

JSON

 XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<unversialEventTemplates>
    <eventTemplate>
        <attributes>
            <attribute>
                <label>attribute_label1</label>
                <name>attribute_name1</name>
                <type>Text</type>
            </attribute>
            <attribute>
                <label>attribute_label2</label>
                <name>attribute_name2</name>
                <type>Integer</type>
            </attribute>
            <attribute>
                <label>attribute_label3</label>
                <name>attribute_name3</name>
                <type>Boolean</type>
            </attribute>
            <attribute>
                <label>attribute_label4</label>
                <name>attribute_name4</name>
                <type>Float</type>
            </attribute>
        </attributes>
        <attributePolicy>Include Attributes</attributePolicy>
        <description>Global universal event template description.</description>
        <label>Global Universal Event - Label</label>
        <name>global_universal_event_template</name>
        <sysId>66c6e90f5a334378809884a11cb12ac0</sysId>
        <TTL>11</TTL>
    </eventTemplate>
    <eventTemplate>
        <attributes>
            <attribute>
                <label>attribute_label1</label>
                <name>attribute_name1</name>
                <type>Integer</type>
            </attribute>
            <attribute>
                <label>attribute_label4</label>
                <name>attribute_name4</name>
                <type>Float</type>
            </attribute>
        </attributes>
        <attributePolicy>Prohibit Universal Event</attributePolicy>
        <description>description.</description>
        <label>Universal Event - Label2</label>
        <name>universal_event_template2</name>
        <sysId>982a434746fc4618aa55d7928ba1f3e4</sysId>
        <TTL />
    </eventTemplate>
    <eventTemplate>
        <attributes>
            <attribute>
                <label>attribute_label1</label>
                <name>attribute_name1</name>
                <type>Integer</type>
            </attribute>
            <attribute>
                <label>attribute_label4</label>
                <name>attribute_name4</name>
                <type>Float</type>
            </attribute>
        </attributes>
        <attributePolicy>Prohibit Universal Event</attributePolicy>
        <description>description.</description>
        <label>Universal Event - Label2 - Copy</label>
        <name>universal_event_template2_copy</name>
        <sysId>814b1b35ea844407b6cd378f149d61a3</sysId>
        <TTL />
    </eventTemplate>
</unversialEventTemplates>



 JSON

[
    {
        "attributes": [
            {
                "label": "attribute_label1",
                "name": "attribute_name1",
                "type": "Text"
            },
            {
                "label": "attribute_label2",
                "name": "attribute_name2",
                "type": "Integer"
            },
            {
                "label": "attribute_label3",
                "name": "attribute_name3",
                "type": "Boolean"
            },
            {
                "label": "attribute_label4",
                "name": "attribute_name4",
                "type": "Float"
            }
        ],
        "attributePolicy": "Include Attributes",
        "description": "Global universal event template description.",
        "label": "Global Universal Event - Label",
        "name": "global_universal_event_template",
        "sysId": "66c6e90f5a334378809884a11cb12ac0",
        "ttl": 11
    },
    {
        "attributes": [
            {
                "label": "attribute_label1",
                "name": "attribute_name1",
                "type": "Integer"
            },
            {
                "label": "attribute_label4",
                "name": "attribute_name4",
                "type": "Float"
            }
        ],
        "attributePolicy": "Prohibit Universal Event",
        "description": "description.",
        "label": "Universal Event - Label2",
        "name": "universal_event_template2",
        "sysId": "982a434746fc4618aa55d7928ba1f3e4",
        "ttl": null
    },
    {
        "attributes": [
            {
                "label": "attribute_label1",
                "name": "attribute_name1",
                "type": "Integer"
            },
            {
                "label": "attribute_label4",
                "name": "attribute_name4",
                "type": "Float"
            }
        ],
        "attributePolicy": "Prohibit Universal Event",
        "description": "description.",
        "label": "Universal Event - Label2 - Copy",
        "name": "universal_event_template2_copy",
        "sysId": "814b1b35ea844407b6cd378f149d61a3",
        "TTL": null


Modify a Universal Event Template


Description

URI

http://host_name/uc/resources/universaleventtemplate

HTTP Method

PUT

Description

Modifies the Universal Event Template specified by the sysId in the request.

Example URI

http://localhost:8080/uc/resources/universaleventtemplate

Authentication

HTTP Basic

Consumes Content-Type

application/xml, application/json

Example

See Create, Modify, and Read a Universal Event Template: XML and JSON Examples.

Universal Event Template Properties

See Universal Event Template Properties.

Read a Universal Event Template


Description

URI

http://host_name/uc/resources/universaleventtemplate

HTTP Method

GET

Description

Read a Universal Event Template.

Example URI

Authentication

HTTP Basic

Produces Content-Type

application/xml, application/json

Example

See Create, Modify, and Read a Universal Event Template: XML and JSON Examples.

Universal Event Template Properties

See Universal Event Template Properties.

Example Response

  • Status 200 /OK
    Successfully created the universal event template with id <id>.
  • Status 400 /Bad Request
    Mutual exclusion violation.  Cannot specify templatename and templateid at the same time.
    Required either templatename of templateid.
  • Status 404 /Not Found
    A universal event template with "<{name/id>" does not exist.

Properties

Universal Event Template Properties

The excludeRelated and retainSysIds properties are specified as attributes in the <eventTemplate> element of XML web services.

Property

UI Field Name

Description

Specifications

Required

attributePolicy

Unmapped Attributes Policy

Defines how unmapped/unknown attributes that are in the published event are handled.

Valid values:

  • As String = Prohibit Universal Event, As Value = 1

  • As String = Include Attributes, As Value = 2

  • As String = Exclude Attributes, As Value = 3

Default is Prohibit Universal Event (1).

N

attributes

Attributes

Zero or more attributes, specifying their Name, Label, and Type.

 XML
    <attributes>
        <attribute>
            <label>attribute_label1</label>
            <name>attribute_name1</name>
            <type>Text</type>
        </attribute>
        <attribute>
            <label>attribute_label2</label>
            <name>attribute_name2</name>
            <type>Integer</type>
        </attribute>
    </attributes>
 JSON
    "attributes": [
        {
            "label": "attribute_label1",
            "name": "attribute_name1",
            "type": "Text"
        },
        {
            "label": "attribute_label2",
            "name": "attribute_name2",
            "type": "Integer"
        }
    ]
N

description

Description

Description of the Universal Event.


N

label

Label

User-friendly display name for the event, to be displayed within the client.

The Label must be unique.

Y

name

Name

Unique event name, adhering to the same naming convention as a Universal Template field name.


Y

TTL

Time To Live

Default value for Time to live; how long, in minutes, the Universal Event data is valid.

non-negative Integer

N






Universal Event Template - Attribute Properties

Property

UI Field Name

Description

Specifications

Required

label

Label

User-friendly display name for the attribute, to be displayed within the client.

Attribute Label must be unique.

Y

name

Name

Unique attribute name, adhering to the same naming convention as a Universal Template field name.


Y

type

Type

Attribute type.

Valid values:

  • As String = Text, As Value = 1

  • As String = Integer, As Value = 2

  • As String = Boolean, As Value = 3

  • As String = Float, As Value = 4

Y

  • No labels