Menu

CreateActorModel

Jim

Create new Actor Model

Creates a new actor model in the domain of the owner identified by the apikey

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

Parameters

  • apikey

Data

<actormodel>
   1..n attributes containing name and datatype of the attribute
   <attribute>
      <name>...</name>
      <type>...</type>  one of Number, Date, Boolean, Text, GpsData
   </attribute>
   ...
   1..n configuration parameters containing a display name and an internal name
   values are assigned when an actor based on the actor model is created
   <config>
      <displayname>...</displayname>
      <name>...</name>
   </config>
   ...
   <name>...</name>
</actormodel>

Errors:

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

Example

POST http://localhost/cs-ws/resources/admin/sensormodel?apikey=1234 HTTP/1.1
<actormodel>
   <attribute>
      <name>Position</name>
      <type>Number</type>
   </attribute>
   <config>
      <displayname>Maximum</displayname>
      <name>max</name>
   </config>
   <name>WaterValve</name>
</actormodel>

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.