Menu

CreateEventModel

Jim

Create new Event Model

Creates a new event model in the domain of the owner identified by the apikey. An event model implicitly always contains the rawdata attribute of type String.

Path: cs-ws/resources/admin/eventmodel Method: POST

Parameters

  • apikey

Data

<eventmodel>
   1..n attributes containing name and datatype of the attribute
   <attribute>
      <name>...</name>
      <type>...</type>  one of Number, Date, Boolean, Text, GpsData
   </attribute>
</eventmodel>

Errors:

  • 401 UNAUTHORIZED if key is invalid or not admin key
  • 409 CONFLICT if sensor model already exists

Example

POST http://localhost/cs-ws/resources/admin/eventmodel?apikey=1234 HTTP/1.1
<eventmodel>
    <attribute>
        <name>EvAttr1</name>
        <type>Number</type>
    </attribute>
    <attribute>
        <name>EvAttr2</name>
        <type>Number</type>
    </attribute>
    <name>EvModel1</name>
</eventmodel>

HTTP/1.1 200 OK

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.