CenterScape API Spec v1.1 Overview
CenterScape API Spec v1.1 Overview
VERSION 1.1
CONTENTS
i
CenterScape API Specification i
Trademarks v
Copyright Statement vi
1.0 Introduction 1
1.1 General System Structure 1
1.2 HTTP-based API Interface 1
1.3 HTTP Authentication 2
1.4 Standard Output Formatting 3
1.5 Error Reporting 3
1.6 Macros 4
1.7 Actions 8
2.0 Data Model 9
2.1 Object Types 9
Entity Type 10
Entity 12
Attribute 13
Attribute Class 14
Entity Type Attribute 17
Custom Attribute Type 21
3.0 Data Schema 22
3.1 Attribute Classes 22
$aAssetDoorOpen 22
$aAssetTag 23
$aAssetHumidity 23
$aAssetImage 24
$aAssetLockClosed 24
$aAssetLockCount 25
$aAssetLockOpen 25
$aAssetLowBattery 26
$aAssetMotion 26
$aAssetMotionCount 27
$aAssetPanic 27
$aAssetSensorLowBattery 28
$aAssetTamper 28
$aAssetTemperature 29
$aAssetUserPayload 29
$aBoundAsset 30
$aCookieData 30
$aDescription 31
$aDetectedLocation 31
$aEnabled 32
$aLocation 32
$aName 33
$aOnline 33
$aPassword 34
$aServiceDate 34
$aViewAttributes 35
Retired 35
Type 36
3.2 Entity Types 36
$tRoot 37
$tEntity 37
$tUserEntity 38
$tAsset 38
$tAssetAlert 39
$tUnassignedTag 39
3.3 Custom Attribute Types 39
$tLocation 40
$tUnknownLocation 40
4.0 Putting It Together: An Example 41
5.0 Command Reference 59
5.1 Attribute Class 59
5.2 Audit Log 63
5.3 Entity 65
5.4 Configuration Import 69
5.5 Configuration Export 71
5.6 Current User 76
5.7 Change Password 77
5.8 Database Configuration 79
5.9 Entity Type 81
5.10 Filter 86
5.11 Filter Delete 92
5.12 Filter Update 93
5.13 History 97
5.14 Report Output 101
5.15 Report 103
5.16 Tag 105
5.17 Tag Import 109
5.18 Schemas 112
5.19 Zone Manager Import 113
6.0 Command Examples 115
6.1 Exporting Assets By Filter - All Assets Attributes 115
6.2 Exporting Assets By Filter – Specific Asset Attributes 115
6.3 Importing New Assets 116
6.4 Updating Existing Assets 116
6.5 Querying a Specific Asset By GUID 117
6.6 Querying Assets By Location 117
6.7 Creating a Filter and Listening for Updates 118
6.8 Query All Unresolved Alerts 119
6.9 Create an Instant Report 119
6.10 Create a Report 120
7.0 Programming Tools 122
Trademarks
RF Code™ and the RF Code logo are trademarks of RF Code, Inc. Microsoft®, Windows, Windows
Server, SQL Server, and Internet Explorer are trademarks of the Microsoft Corporation in the United
States and other countries. PostgreSQL™ is a registered trademark of the PostgreSQL Global Devel-
opment Group. Intel Core Duo Processor ™ is a trademark of Intel Corporation in the US and/or other
countries. Firefox® is a registered trademark of the Mozilla Foundation. ChromeTM is a trademark of
Google, Inc. Safari® is a trademark of Apple Inc., registered in the US and other countries. IBM® and
WebSphere® are trademarks of IBM Corporation, registered in the US and/or other countries. Oracle™,
Java™, and Java Management Extensions™ are registered trademarks of Oracle and/or its affiliates.
BACnet® is a registered trademark of ASHRAE. Modbus™ is a trademark of the Modbus Organization,
Inc. Eclipse™ and BIRT™ are trademarks of the Eclipse Foundation, Inc. NetBotz™ is a Registered
Trademark of American Power Conversion Corporation. The Bluetooth® word mark and logos are
registered trademarks owned by Bluetooth SIG, Inc. and any use of such marks by RF Code is under
license. All other product names are copyright and registered trademarks or trade names of their respective
owners.
Bluetooth QD ID: B012541
Copyright Statement
This specification is intended to provide the details needed for third-party software and driver
developers to successfully produce code that integrates with RF Code CenterScape, version 1.1 or
later, produced by RF Code, Inc.
The interfaces provided are intended to expose all available features of the product in a supported and
consistent fashion, allowing applications to be developed that will require little or no changes in order
to support future versions of the CenterScape product. That said, RF Code does reserve the right to
change any or all of these interfaces in future product releases.
Any questions, comments, or suggestions concerning this specification can be sent to the RF Code
Developer Support e-mail address, sdk@[Link].
The RF Code CenterScape server consists of an application server, supported on 64-bit commercially
available Linux distributions and Microsoft Windows 7/8/10 and Windows Server systems (64-bit Intel
architecture). The interfaces provided by the product are consistent between all supported operating sys-
tems. The server interfaces with one or more RF Code Zone Manager servers which in turn interface
with the Zone Manager-supported RFID readers.
The CenterScape server provides a HTTP-based interface (implemented on port 6580 on the server)
which supports JSON (JavaScript Object Notation) output.
The HTTP-based API interface for CenterScape is the supported interface for application imple-
mentation, as most program languages and environments support efficient issuing of HTTP-based
requests and parsing of the responses. In addition, most corporate networking systems support a variety
of mechanisms for managing HTTP-based traffic through firewalls, proxies, and other technologies.
Lastly, the HTTP-based APIs can easily be used by both other web server-based applications and web
browser-based applications (such as those implemented using JavaScript in HTML documents).
The CenterScape server follows a representational state transfer (REST) model for most of the APIs.
The following table maps the HTTP method to the supported API operation:
POST Create/Update
GET Read
PUT Update/Replace
DELETE Delete
The HTTP methods map one-to-one to the relational database CRUD operations.
The REST model is resource-centric where the resources being operated on are specified in the URL
to the right of the hostname. All CenterScape APIs are declared under a command URL path:
[Link]
For example, to request a specific CenterScape entity, you might construct the following HTTP
request:
GET [Link]
The GET HTTP command verb is used to retrieve information. The response that is returned is
encoded in either a Javascript Object Notation (JSON) or Comma Separated Value (CSV) formatted
response.
CenterScape server access requires an authenticated user ID and password. The CenterScape server
will accept either Form-based or Basic authentication to authenticate a user.
The CenterScape Web UI uses Form-based authentication. The CenterScape server returns the HTTP
header requesting Basic authorization when an unauthenticated request is received for requests which
do not originate from the CenterScape Web UI. If you are using a command line tool such as curl, you
can use the “-u user:password” parameter to send a request using Basic authentication.
Since neither Form-based or Basic authentication is considered secure, the CenterScape server should
be configured to use HTTPS if there is a concern the user ID or password can be intercepted.
Command output is encoded consistently for the two output formatting types, although the content of
each command is specific to that command.
For JSON-encoded output, each command will return a valid JSON object or array. If an object is
returned (JSON objects are enclosed in curly brackets “{ }”), it will contain one or more comma-sep-
arated attribute-value pairs. If an array is returned (JSON arrays are enclosed in square brackets “[ ]”),
it will contain zero or more JSON objects. Any application processing the JSON-formatted output
must check if the returned entity is an object or array.
For CSV-encoded output, the first line will be a header line containing the object identifiers and attrib-
utes that are being returned in the response set. Following the header line, there is a line for each entity
that is returned in the response set.
If an API returns a HTTP status code other than 200 (OK), a single JSON-encoded status object is
returned. An example of a status object indicating a required field is missing a value would be:
{
"success":false
,"errors":[
{
"code":"AttributeRequired"
,"message":"Required value is missing for Entity Root"
,"field":"$aName"
}
]
}
l The “success” attribute indicates the overall status of the request.
l “errors” is a JSON array containing the one or more JSON objects indicating the error condition
(s).
1.6 Macros
Macros are variables specified during the configuration of some attributes and which are replaced with
actual values when the system sends or displays the attribute value. Macros can be used within:
l Email action messages
l Directory paths and filenames for various actions
l The titles of dashboard widgets
Macros are inserted by specifying the macro name within the text value of an attribute, prefaced with a
dollar sign and enclosed between curly brackets. An example of an email event action configured to
include the time that the event occurred would have the following value for the event action message:
Event Time: ${TIME}
Using this value, if an event occurs at 12:30:15 p.m. and the event is configured to execute the email
action, then the email message sent when the event is triggered would be:
Event Time: 12:30:15 pm
Since alerts and events are generated from a source entity, and since the attributes that an entity has
associated with it are definable by the system administrator, macros provide a way to specify that a spe-
cific attribute from an alert or event source should be inserted. This is done by using the macro name
“SOURCE.” followed by the ID of the attribute. The following example macro would insert an
entity’s description:
${SOURCE.$aDescription}
ID ID ID
TRIGGER_ATTRIBUTE1_
DESCRIPTION JOB_NAME
ID
TRIGGER_ATTRIBUTE1_
START_TIME JOB_START_TIME
NAME
TRIGGER_ATTRIBUTE2_
THRESHOLD_TYPE FILTER_TYPE
ID
TRIGGER_ATTRIBUTE2_
URL TYPE_ID
NAME
THRESHOLD_
TRIGGER_OPERATOR2
ATTRIBUTE1_ID
THRESHOLD_
TRIGGER_VALUE2
ATTRIBUTE1_NAME
THRESHOLD_ TRIGGER_ATTRIBUTE3_
OPERATOR1 ID
TRIGGER_ATTRIBUTE3_
THRESHOLD_VALUE1
NAME
THRESHOLD_
TRIGGER_OPERATOR3
ATTRIBUTE2_ID
THRESHOLD_
TRIGGER_VALUE3
ATTRIBUTE2_NAME
THRESHOLD_
FILTER_LOCATION
OPERATOR2
THRESHOLD_VALUE2 FILTER_TYPE
THRESHOLD_
TRIGGER_TIME
ATTRIBUTE3_ID
THRESHOLD_
[Link]
ATTRIBUTE3_NAME
THRESHOLD_ SOURCE_TRIGGER_
OPERATOR3 VALUE 1
SOURCE_TRIGGER_
THRESHOLD_VALUE3
VALUE2
SOURCE_TRIGGER_
FILTER_LOCATION
VALUE3
FILTER_TYPE TRIGGER_ID
[Link]
SOURCE_THRESHOLD_
ADAPTIVE_VALUE
SOURCE_THRESHOLD_
VALUE1
SOURCE_THRESHOLD_
VALUE2
SOURCE_THRESHOLD_
VALUE3
THRESHOLD_ADAPTIVE_
ATTRIBUTE_ID
THRESHOLD_ADAPTIVE_
ATTRIBUTE_NAME
THRESHOLD_ADAPTIVE_
ATTRIBUTE_OPERATOR
THRESHOLD_ADAPTIVE_
VALUE
THRESHOLD_ID
1.7 Actions
Various Actions can be configured to execute in association with Alerts, Events, and Reports. These
actions are designed to push information about the associated alert, event, or report to outside systems.
Actions can be configured to send information using various protocols, including:
l For alerts, events and reports:
o email
o ftp
o sftp (SSH File Transfer)
o http
o https
o SNMP v1 Traps
o SNMP v3 Traps
o SNMP v3 Informs
o Commands to devices connected to a serial port
Serial device actions send the commands specified in the action. Email actions send the message spe-
cified in the action after doing proper text replacement of any macros specified in the message. The out-
put of all other actions includes:
l The replaced values for all macros available to the action (see table in Macros above), with the
exception of the following macros, which only output a partial date or time: DATE, YEAR,
MONTH, DAY, TIME, HOUR, MINUTE, SECOND, MILLISECOND,
TIMEZONE_OFFSET.
l Additional source attributes specified in the definition of the source alert or event (not applicable
to reports).
l Other values for backwards compatibility of alert actions. All alert action name/value pairs from
previous versions of HTTP and FTP alert actions are included and supported. Since some names
do not match the macro name for the same value, the value is duplicated.
The data model describes the major elements necessary to understand the functionality of RF Code’s
CenterScape.
The CenterScape data model centers around the definition of and interaction with a family of core
object types. Each of these object types plays a role in supporting and defining the behavior and fea-
tures of the CenterScape system, and many of the object types interact with one another to bring this
about. Most of the object types require instances to have a globally unique object ID (“GUID”) – an
alphanumeric, case-sensitive identifier string that must be unique and cannot be changed during an
object’s life cycle.
The four primary object types in the CenterScape data model are Entity Types, Attribute Classes,
Attributes, and Entities. An Entity Type can be roughly described as what an object is; for example, an
Entity Type could be a vehicle, or more specifically a car. An Attribute Class is used to describe the
characteristics or properties of an Entity Type. An Entity is an object whose type is a reference to an
existing Entity Type. As Entity is to an Entity, so too is Attribute to Attribute Class. An instance of an
Attribute is a name/value pair where the name refers to a defined Attribute Class and the value is the
value of the attribute constrained to the Attribute Class type and any other constraints that may be spe-
cified in the declaration of the Attribute Class.
As you read this document, the terms Entity Type and Asset Type, Entity and Asset are used inter-
changeably. Entity Types and Entities are internal terms used to describe data model objects. Asset
Types and Assets are customer terms used to describe the same data model objects.
Each of the object types will be discussed in more detail and images of the CenterScapeWeb UI will
be used to demonstrate how these data model objects are created and updated using the CenterScape
Web UI.
You will need Administrative privileges if you wish to modify the CenterScape data model (Entity
Types and Attribute Classes) via the Web UI. Navigate to the CenterScape Admin Console and select
the “Data Schema” Tab.
Describes the class of object. For entity types the value is “entity_
class
type”.
The globally unique ID for this entity type. For entity types that are
guid created using the CenterScape Web UI, a suggested entity type GUID
is automatically generated but can be overridden.
Describes whether or not a user can delete this entity type. Entity
deletable Type objects defined by the CenterScape server and not a user are
marked as non-deletable.
An array of objects that contain the attribute classes which are used
attributes
when creating instances of an entity type.
To relate this back to the CenterScape Web UI, the CenterScape administrator would select the “Asset
Types” section under the “Data Schema” tab. Here, the administrator would be presented with the fol-
lowing interface:
Entity
Entity objects provide the main interface for interacting with CenterScape. An Entity object represents
a single instance of an asset or tag with one or more associated properties or attributes. Each Entity
object has a single well-known attribute named “type” which represents the base type of the Entity.
The type of the Entity corresponds to an existing Entity Type object. The CenterScape user typically
creates entities (or assets if you prefer) under the “Asset” tab in the CenterScape User Console.
The types listed in the drop-down list are the customer’s asset types that were previously created in the
“Asset Types” Administrative Console.
Every asset the customer creates must have a type, a unique name, and a unique object ID.
When Entities are created using the CenterScape Web UI, the user is not prompted to supply an object
ID; rather, the CenterScape server will generate a unique object ID at the time a new object request is
made. Users of the CenterScape API interface can opt for this same behavior if the value of the object
ID is not significant to a customer’s data model. If specifying the object ID is important, the Center-
Scape API user can specify the object ID when a request to create an new entity is made. Either way,
the object ID is required to be unique.
An asset has zero or more associated Attribute objects. Each Attribute corresponds to a single property
of the Entity. The available attributes of the entity are defined by the entity’s Entity Type objects.
A CenterScape user may choose to either retire or purge an asset. A retired asset no longer records his-
tory, but its existing history is still available to view. A purged asset and any associated historical val-
ues are completely removed from the CenterScape server as if it never existed.
Attribute
An Attribute represents a single property of an asset. Each Attribute has an associated value. The data
type of the Attribute’s value is described within the Attribute’s associated Attribute Class object. Each
attribute may store history depending on the “History Recorded” property of the Attribute Class.
Describes the class of object. For attribute classes the value is “attribute_
class
class”.
Describes whether or not a user can delete this attribute class. Attribute
deletable Class objects defined by the CenterScape server and not a user are
marked as non-deletable.
If true, this attribute class is no longer accessible for editing. History can
retired
still be viewed. Updates to attributes of this class no longer occur.
If true, all changes to an attribute of this class are recorded in the history.
history
If false, only the current value is stored.
If this attribute class’s type is type-ref, then entities will inherit the value of
inherit_attributes
the attributes defined on the entity type.
The type of encoding for a password attribute class. Blowfish and SHA-
encoding
512 are supported.
The data type for values of this attribute class. See the table below for the
type
list of data types.
string A string.
The Color attribute has a type of “String List” and a list of declared String Values or “Red”, “Green”,
“Blue”, “Black” and “White”. These are the valid values for the Color attribute. If we attempted to set
a Color attribute to “Yellow”, the server would reject the request indicating the attempt to set the attrib-
ute to an illegal value.
The “System Attributes” section is used to view and modify some of the CenterScape built-in Attribute
Classes. It is provided mainly for information purposes; however, the CenterScape administrator is
allowed to modify the presentation labels for the built-in Attribute Classes.
Describes the class of object. For entity type attributes, the value is
class
“entity_attribute”.
If true, upon creation of an Entity a user must provide a value for this
required
attribute.
Describes whether or not a user can delete this attribute class. Attribute
deletable Class objects defined by the CenterScape server and not a user are
marked as non-deletable.
For static attributes this defines the value of the attribute. For non-static
attributes this defines a default value. When a user creates an Entity the
value
non-static attribute is populated with the default value which the user
may change.
Defines the sort order for attributes on the Entity user interface (UI).
sortPriority
Attributes with a lower sort priority are displayed first.
Attributes with the same category are shown on the Entity UI grouped
together within a titled box. Category has a lower precedence than sort
priority as a result attributes with the same category may appear in two
different titled boxes. For example, suppose an entity type contains
category
attributes “city” with sort priority 100 and “state” with sort priority 300
both in the “location” category and a third attribute “host” with sort pri-
ority 200 and category “network”. In this example, the UI will have
three titled boxes, “location”, “network” and “location”.
At the top of the dialog is a list of the Attribute Classes which are available to add to the asset type.
The remaining fields match the properties in the table listed above. The “Category” and “Field Order”
are strictly used for presentation. Let’s add the “Color” attribute and specify its Category as “Appear-
ance” with a Field Order of “500”. Going back to the Web UI we see that “Color” is now an attribute
of “Car”:
You will notice the numbers in parentheses down the side are the field order numbers specified for
each Entity Type Attribute. This information is displayed to the CenterScape administrator to show
why attributes appear before or after other attributes in a dialog.
We can add another attribute, “Asset Image,” to the “Car” asset type under the category of “Images”
and with a Field Order of “600”. If we view the sample input form again, we get the expected results:
The CenterScape server defines attribute classes, entity types, and entities, which allows for the con-
figuration and monitoring of CenterScape itself and for the definition of asset types by the customer.
This section lists a subset of the built in attribute classes and a description of their use. The attributes lis-
ted are those the end user can apply to their own asset types or are automatically added to a customer’s
asset as a result of a tag being associated to an asset. By convention, all built-in attribute class guids
start with “$a” or “$z”.
$aAssetDoorOpen
$aAssetDoorOpen Properties
guid $aAssetDoorOpen
type bool
name Door
history true
use status
Reports if the door switch on the asset is reporting a door opened con-
description
dition reported by the asset’s tag.
$aAssetTag Properties
guid $aAssetTag
type entityref-list
history true
use config-view
“typeref” : “$tTag”
constraints Value of this attribute must be constrained to references to entities
whose type is “$tTag” or inherits from “$tTag”.
This attribute contains the reference to the tag with which an asset is
description associated. Even though this attribute is a list, CenterScape does not
support associating more than one tag to an asset.
$aAssetHumidity
$aAssetHumidity Properties
guid $aAssetHumidity
type double
name Humidity
history true
use config-view
printf %.1f
units rh
$aAssetImage Properties
guid $aAssetImage
type mimeref
history false
use config-view
description The value of this attribute is an image file associated with an asset.
$aAssetLockClosed
$aAssetLockClosed Properties
guid $aAssetLockClosed
type bool
history true
use status
description Reports the asset’s lock closed status reported by the asset’s tag.
$aAssetLockCount Properties
guid $aAssetLockCount
type long
history true
use status
description Reports the asset’s lock count reported by the asset’s tag.
$aAssetLockOpen
$aAssetLockOpen Properties
guid $aAssetLockOpen
type bool
history true
use status
description Reports the asset’s lock opened status reported by the asset’s tag.
$aAssetLowBattery Properties
guid $aAssetLowBattery
type bool
history true
use status
Reports if the asset has detected a low battery condition reported by the
description
asset’s tag.
$aAssetMotion
$aAssetMotion Properties
guid $aAssetMotion
type bool
name Motion
history true
use status
description Reports the asset’s motion status reported by the asset’s tag.
$aAssetMotionCount Properties
guid $aAssetMotionCount
type long
history true
use status
description Reports the asset’s motion count reported by the asset’s tag.
$aAssetPanic
$aAssetPanic Properties
guid $aAssetPanic
type bool
name Panic
history true
use status
description Reports if the panic switch has been activated on the asset’s tag.
$aAssetSensorLowBattery Properties
guid $aAssetSensorLowBattery
type bool
history true
use status
Reports if the asset has detected a low battery condition for an attached
description
sensor.
$aAssetTamper
$aAssetTamper Properties
guid $aAssetTamper
type bool
name Tamper
history true
use status
$aAssetTemperature Properties
guid $aAssetTemperature
type double
name Tem
history true
use status
printf %.1f
units Celsius
description Reports the temperature of the asset (raw value in degrees C).
$aAssetUserPayload
$aAssetUserPayload Properties
guid $aAssetUserPayload
type long
history true
use status
$aBoundAsset Properties
guid $aBoundAsset
type entityref
history true
use hidden
“typeref” : “$tEntity”
constraints Value of this attribute must be constrained to references to entities whose
type is “$tEntity” or inherits from “$tEntity”.
This attribute contains the reference to the entity (asset) to which a tag is
description
bound.
$aCookieData
$aCookieData Properties
guid $aCookieData
type map
name CookieData
history false
use hidden
$aDescription Properties
guid $aDescription
type string
name Description
history true
use config-view
$aDetectedLocation
$aDetectedLocation Properties
guid $aDetectedLocation
type typeref
history true
use status
description The location of an asset based on the server’s configured location rules.
$aEnabled Properties
guid $aEnabled
type bool
name Enabled
history true
use config-view
$aLocation
$aLocation Properties
guid $aLocation
type typeref
history true
use config-view
“typeref” : “$tLocation”
constraints Values of this attribute must be references to a entity type that is a des-
cendant of the “$tLocation” type.
true
inherit_attributes The attribute values associated to the location typeref will be inherited by
asset.
description The value of this attribute is the current declared location of an asset.
$aName Properties
guid $aName
type string
name Name
history true
use config-view
The attribute is used to contain the name of an asset. Values of this attrib-
ute must be unique for all objects defined in CenterScape. The value of
description this attribute can be changed. The CenterScape Web UI uses this attribute
to uniquely identify or select assets. All user-defined assets types contain
this attribute.
$aOnline
$aOnline Properties
guid $aOnline
type bool
history true
use status
If the value of this attribute is true, the tag associated with the asset is cur-
description
rently observable from one or more readers.
$aPassword Properties
guid $aPassword
type password
name Password
history true
use config
encoding “SHA-512”
$aServiceDate
$aServiceDate Properties
guid $aServiceDate
type date
history true
use status
$aViewAttributes Properties
guid $aViewAttributes
type string-list
history false
use config
A list of zero or more attribute guids that define the attributes to be dis-
description
played when a view is selected in the CenterScape Web UI.
Retired
Retired Properties
guid retired
type bool
name Retired
history true
use hidden
This attribute is used to set the retired status of an asset. If the value of this
attribute is false, an asset is considered active. If the value is true, an asset
is considered retired. This attribute is used throughout the CenterScape
description
Web UI when generating reports or viewing an asset’s attributes. When
retiring an asset through the CenterScape Web UI, the user has the option
of disassociating its asset tag.
Type Properties
guid type
type typeref
history true
use hidden
“typeref” : “$tRoot”
constraints Value of this attribute must be a reference to “$tRoot” or any descendant
of “$tRoot”.
This attribute is the type of any object in the system. The value of this
description
attribute cannot be changed after an object is created.
As described in “Object Types”, entity types can be defined hierarchically. The CenterScape server
defines and uses many built-in types to configure and monitor the state of the CenterScape server. The
CenterScape administrator is expected to create new entity types which model their customer’s assets.
Most of the built-in entity types defined are only accessible by a user with administrator privileges.
This section lists the entity types a customer will encounter when defining new entity types used when
modeling their own asset types. By convention, all built-in entity type GUIDs start with “$t”. All built-
in entity types have their “deletable” property set to false.
$tRoot Properties
guid $tRoot
parent
name Root
This entity type is the root node in the entity type hierarchy for both sys-
description tem- and customer-defined entity types. With the exception of custom
attribute types, all entity types have this type as their ancestor.
$tEntity
$tEntity Properties
guid $tEntity
parent $tRoot
name Entity
description Base entity type for all user and system objects.
$aName
Every instance of $tEntity (or ancestor of $tEntity) has the $aName attrib-
attributes ute. Values of the $aName attribute must be unique for any type which
has the $aName attribute. This attribute is used in multiple places in the
Web UI to uniquely identify and select entity instances.
$tUserEntity Properties
guid $tUserEntity
parent $tEntity
$tAsset
$tAsset Properties
guid $tAsset
parent $tUserEntity
name Asset
$aDescription
attributes
$aLocation
$tAssetAlert Properties
guid $tAssetAlert
parent $tAlert
Root of the entity type tree for alerts that are created from thresholds
description
applied to assets.
$tUnassignedTag
$tUnassignedTag Properties
guid $tUnassignedTag
parent $tUserEntity
Entity type used when creating instances of tags which have been accep-
description
ted by a user to associate to an asset.
attributes $aLocation
There are several built-in custom attributes types defined by the CenterScape server’s schema, the most
notable of which is $tLocation. The $tLocation custom attribute type is the root of all user-defined loc-
ations.
$tLocation Properties
guid $tLocation
parent
name Location
description This entity type is the root node for all user-created locations.
$tUnknownLocation
$tUnknownLocation Properties
guid $tUnknownLocation
parent $tLocation
This is the entity type used to designate the value of the $aLocation attrib-
description ute of an asset when the location of an asset cannot be determined using
the currently defined location rules.
To illustrate the concepts outlined in the data model and data schema sections, a small data schema is
presented. The following example will use JSON as the representation format.
The sample schema will model IT equipment. A good place to start is to create a list of object types
that you want to model. This will help you determine how you want to classify your asset types. For
this example, we will limit the equipment list to Servers.
Now that we know what we want to model, we need to think about the information we want to track
for each of the asset types we have. The list of information you want to track on each object type will
be a good starting place for the attribute classes you need to create for modeling your assets.
The root of the customer’s data model begins by creating one or more child asset types from the built-
in asset type “Asset”. CenterScape already associates several built-in attribute classes with the Asset
entity type: “Name”, “Description, “Asset Location”.
In this example, we’re going to use the default object type hierarchy:
The JSON representation for these entity types (excluding the built-in type “$tAsset”) is expressed as:
[
{
"class" : "entity_type",
"guid" : "INVENTORY",
Let’s examine a few of the attribute classes individually to illustrate some of the capabilities of the
CenterScape data model.
l Purchase Terms: In the attribute class “Purchase Terms”, we see the type of the attribute class
is “string”. The attribute class also defines the “values” as “[ "Purchase", "Lease", "Loaner" ]”.
By specifying the “values” field in the attribute class, we are restricting the value of this field to
be one of the values listed in the values array. A value for this attribute other than one of these
strings will be flagged by the server as invalid.
l Purchase Date: This represents the date an IT asset was purchased.
l Model: The model of the IT asset. Any string value is valid for this attribute class.
l Manufacturer: Like “Purchase Terms”, this attribute class is a string whose values are limited
to those specified in the “values” array.
l Purchase Value: The purchase price of the IT asset. The minimum value for values of this
attribute class cannot be lower than 1.0 otherwise the CenterScape server will indicate the value
is invalid.
Up to this point we have three entity types and five new attribute classes. The attribute classes have
been defined but they have not been assigned to any asset type. In order to assign an attribute class to
an entity type we must use entity type attributes. Each entity type attribute is used to declare how the
CenterScape Web UI presents an attribute class and some additional data-binding semantics for an
attribute class/entity type mapping.
In the following example, “Purchase Terms”, Purchase Date”, “Manufacturer”, and “Purchase Value”
have all been added to “Equipment”.
{
"class" : "entity_type",
"guid" : "EQUIPMENT",
"name" : "Equipment",
"parent" : "$tInventory",
"deletable" : true,
"description" : "",
"attributes" : [
{
"guid" : "PURCHASE_TERMS",
"class" : "entity_attribute",
"deletable" : true,
As you can see, the declaration of the entity type “Equipment” has grown considerably. The difference
is the addition of the entity type attribute “attributes”. “attributes” is an array of attribute classes that
have been added to the definition of the entity type. Each entry in this array is an entity type attribute.
The order they are declared has no bearing on how they appear when presented in the CenterScape
Web UI. A sample input form for an Equipment would appear as:
The entity type attribute “sortPriority” determines the order of an attribute independent of entity type
attribute “category”.
If we want to track additional information that is specific to one of the child types of “Equipment”, we
would update their entity type declarations to include the additional entity type attributes. For this
[
{
"class" : "entity_type",
"guid" : "SERVER",
"name" : "Server",
"parent" : "EQUIPMENT",
"deletable" : true,
"description" : "",
"attributes" :
[
{
"guid" : "SERVER_FORM_FACTOR",
"class" : "entity_attribute",
"deletable" : true,
"required" : false,
"isStatic" : false,
The new attribute is added in a new category: “Server Information”. Since “Server” inherits from
“Equipment”, it has all the attributes of an “Equipment” asset plus the “Server Form Factor” attribute.
Also, the “value” field has been added to the entity type attribute. The value “Rackmount” will be used
as the default value for the “Server Form Factor” attribute. A sample input form for a “Server” would
appear as:
The new attribute appears at the bottom of the dialog as a result of the sortPriority being greater than all
other attributes. In addition, the attribute is displayed in a new group box as a result of the new cat-
egory: “Server Information”.
This small sample has addressed attribute classes, entity types and entity type attributes. One powerful
feature of the CenterScape data model which has not been demonstrated is the use of custom attribute
types. A custom attribute type looks identical to an entity type except the root entity type of a custom
attribute type does not have a parent.
For this example, let’s say we want to track the department to which an IT Asset is assigned. We could
easily create a new string attribute class whose values are all the valid department names that exist in
your organization. As you dig a bit deeper, perhaps you realize when an IT Asset is assigned to a
The JSON representation for these entity types would be expressed as:
[
{
"class" : "entity_type",
"guid" : "DEPARTMENT",
"name" : "Department",
"deletable" : true,
"description" : ""
},
{
"class" : "entity_type",
"guid" : "FINANCE",
"name" : "Finance",
"parent" : "DEPARTMENT",
"deletable" : true,
"description" : ""
},
{
"class" : "entity_type",
"guid" : "ENGINEERING",
"name" : "Engineering",
"parent" : "DEPARTMENT",
"deletable" : true,
"description" : ""
}
]
}
]
As before, we apply the attribute classes to the entity types. In this example, the “Department” Entity
Type remains the same. Each child type of “Department” has new Attribute Classes added. The “Man-
ager” Attribute Class has been associated with both “Engineering” and “Finance”. When the “Man-
ager” attribute is applied to “Engineering” entity type , its value is “Bob Murphy” and “isStatic” is true.
This means the value is constant and cannot be overridden. When “Manager” is applied to “Finance”,
its value is “Tom Kendle”. Again, it is declared to be static and its value cannot be overridden. The
“System Use” attribute class is associated with the “Engineering” entity type and the “Contains
Employee Data” attribute class is associated with the “Finance” Entity Type. The updated entity type
definitions are expressed using the following JSON:
[
{
"class" : "entity_type",
"guid" : "DEPARTMENT",
"name" : "Department",
"deletable" : true,
"description" : ""
},
This attribute class’s type is “typeref”. This means the value of this attribute must be a GUID of an
Entity Type. The constraints object is used to limit the branch or node in the entity type hierarchy for
valid values of this attribute class. Now we apply this attribute just like any other to a node in the entity
type hierarchy. In this case, we’ll say all Servers should have an Owning Department so we add the
attribute to the “Server” entity type expressed as:
[{
"class" : "entity_type",
"guid" : "SERVER",
"name" : "Server",
"parent" : "EQUIPMENT",
"deletable" : true,
"restrictable" : false,
"description" : "",
"attributes" : [ {
"guid" : "$aMountType",
"class" : "entity_attribute",
The HTTP command URLs used to configure and monitor the CenterScape server are presented in
this section. For each HTTP command, a functional description is provided for the four basic HTTP
methods (GET, POST, PUT, and DELETE).
The minimum privilege required to execute a command is specified. If an attempt to execute a com-
mand is made with credentials that do not meet the minimum privilege, a HTTP status code of 401 is
returned.
Command <base-url>/attributeclass
l attributeclass?type=<object-type-guid>
Retrieves all attributes classes which are defined for the spe-
cified object type and all its inherited type(s).
Command output:
Asset Viewer
Curl example:
l attributeclass/
System Administrator
Curl example:
l attributeclass/<object-guid>
Command output:
System Administrator
Curl example:
l attributeclass/<object-guid>
Command output:
DELETE
If the command is successful, indicated by HTTP status code 200, no
output is returned.
System Administrator
Curl example:
Command <base-url>/audit
Retrieves audit log messages within a specified time range or all audit
messages.
l audit?from=<utc-start-time>&to=<utc-end-time>&start-
t=<starting-index>&limit=<max-result-count>
Command output:
"timestamp" : 1225303027379,
"message" : "User Login - admin - from remote address
[Link]",
"user" : "admin"
},
{
"timestamp" : 1225303023679,
"message" : "User Login - foo - from remote address
[Link]",
"user" : "foo"
}
]
}
System Administrator
Curl example:
POST N/A
PUT N/A
DELETE N/A
Command <base-url>/entity
The entity command is used to create, update, or delete user and sys-
Description
tem objects.
l entity/<object-guid>
l entity?type=<entity-type-guid>
GET
Command output:
Curl example:
l entity/
Command output:
Curl example:
l entity/<object-guid>
You can use this command to update one or more attributes on one or
more entities using a several parameters which allow you to specify
the set of entities to update.
Deletes an entity
l entity/<object-guid>
object-guid (Required) – The guid of the entity to delete.
Similar to the PUT method, you can use this command do delete one
or more entities which match a specific filter criteria.
Configuration Import
Command <base-url>/configimport
GET N/A
l configimport
Command output:
Curl example:
PUT N/A
DELETE N/A
Configuration Export
Command <base-url>/configexport
l configexport
General parameters:
To export by filter, you would use the same parameters as those for
the api/filter command.
operator = <“eq” | “ne” | “gt” | “lt” | “ge” | “le”, “undef”| “def”, “con-
tains” | “containselement” | “startswith” | “in” | “inlist”> (optional) Spe-
cifies the operator used when comparing the value of the filter
attribute.
Command output:
Curl example:
Curl example:
PUT N/A
DELETE N/A
Current User
Command <base-url>/currentuser
l currentuser
Command output:
Asset Viewer
Curl example:
POST N/A
PUT N/A
DELETE N/A
Change Password
Command <base-url>/changepassword
GET N/A
l changepassword
The body should contain a URL-encoded form the with the fol-
lowing parameters:
POST
userName (required) – The name of the user for which to
change the password
Command output:
Asset Viewer
Curl example:
PUT N/A
DELETE N/A
Database Configuration
Command <base-url>/databaseconfiguration
l databaseconfiguration
Command output:
System Administrator
Curl example:
l databaseconfiguration
Example:
{
"type":"POSTGRESQL",
"host":"localhost",
"port":"5432",
"name":"rfcode",
POST "user":"rfcode",
"password":"rfcode",
"contact":""
}
Command output:
System Administrator
Curl example:
PUT N/A
DELETE N/A
Entity Type
Command <base-url>/entitytype
General parameters:
l entitytype/<object-type-guid>?inherited=<true|false>
Returns the specified entity type and all its children unless the inher-
ited parameter is set to false.
Command output:
The output of the command is one or more entity types encoded using the
requested format. The default format is JSON.
Asset Viewer
Curl example:
l entitytype
POST
The POST body should contain a JSON-encoded object rep-
resenting the new entity type.
Example:
{
"guid":"TRUCK",
"name":"Truck",
"description":"",
"deletable":true,
"parent":"$tAsset"
Command output:
System Administrator
Curl example:
l entitytype/<entity-type-guid>
PUT
The POST body contains a JSON-encoded object representing the
updated entity type.
Example:
"guid":"TRUCK",
"name":"Truck",
"description":"",
"deletable":true,
"parent":"$tAsset",
"children":[],"attributes": [{"guid":"COLOR",
"name":"Color",
"deletable":true,
“required":true,
"isStatic":false,
"category":"Appearance",
"sortPriority":500}],
"class":"entity_type"
}
Command output:
System Administrator
Curl example:
l entitytype/<entity-type-guid>
Command output:
System Administrator
Curl example:
Filter Query
Command <base-url>/filter
The most basic form of the filter command is querying assets by type. In
fact, asset type is the only required condition that must be specified in the
filter command, all other parameters are optional.
There are two methods the filter command can use. The first method
allows you to construct a filter and then query which assets on the Center-
Description Scape server match the condition(s) specified in the filter. When the com-
mand is run the assets that match the conditions specified in the filter are
returned in the result set.
The second method allows you to declare the conditions an asset must
match in order to be returned in the result set just like the first method;
however, by specifying a unique value for the filterid, you are instructing
the CenterScape server to remember the filter definition and accumulate
change notifications to the result set initially returned. You can then issue
another command - “filterupdates” to listen for these change notifications
to the assets that were originally returned from the filter command.
The filter and filterupdates commands use session cookies to correlate the
calling application across multiple requests. Normally, if the commands
are called from a web page, the browser will manage the session cookie.
When not using a browser, the session cookie can be specified by append-
ing “;jsessionid=<session-cookie>” on the end of a url but before any para-
meters.
You can think of the filter command as a means of defining a view into
the set of assets in the CenterScape server. Using a filteridi parameter, the
server will accumulate change notifications to the view. You can think of
the filterupdates command as the means of receiving updates for the cur-
rently defined filters.
l filter
A example will illustrate how the command output is formatted. The fol-
lowing curl example is used to query all the assets of the root asset type
'$tAsset':
"class" : "fltupdevt",
"timestamp" : 1225474644976,
"updtype" : "countupd",
"count" : 1
},
"class" : "fltupdevt",
"timestamp" : 1225474644976,
"updtype" : "entered",
"entity" : {
"class" : "entity",
"guid" : "CAR_fcf94f38",
"retired" : false,
"deletable" : true
},
"updtype" : "rowlist",
"last-update" : true,
"roworder" : [ "CAR_fcf94f38" ]
Each object in the result set also includes the CenterScape timestamp of
when the event was created.
The next object that is returned is the single asset that matched the filter
condition and in this example is bounded by the maximum count of 1. The
asset itself is nested in the object under the “entity” property. For all the
assets returned from this command, the “updtype” is “entered”.
The last update is a “rowlist” object which contains the “roworder” prop-
erty. This is the new sort for the contents of the assets in the filter result
set.
Curl example:
TRUE&attributeset=%24aName&attributesort=
%24aName&sortorder=asc&start=0&count=25
This example queries the assets whose tag tamper attribute are currently
true. The name attribute is returned for each asset, the entities are sorted in
ascending order by their name and the view starts at the first asset in the
sorted list and returns a maximum of 25 assets.
POST Same as GET. The parameters are URL-encoded in the body of the post.
PUT N/A
DELETE N/A
Filter Delete
Command <base-url>/filterdelete
The filterdelete command is used to delete a filter that was previously cre-
ated as interested in receiving change notifications. The server will release
Description
any resources allocated for accumulating change notifications for the filter.
Delete a filter.
l filterdelete?filterid=<filter id>
Asset Viewer
Curl example:
POST N/A
PUT N/A
DELETE N/A
Filter Update
Command <base-url>/filterupdate
l filterupdates?_timeout=<milliseconds>&_maxcnt=<maximum
assets to return>
Command output:
{
"class" : "fltupdevt",
"filterid" : "fid_63020",
"timestamp" : 1225481827543,
"updtype" : "countupd",
"count" : 2
},
{
"class" : "fltupdevt",
"filterid" : "fid_63020",
"timestamp" : 1225481827543,
"updtype" : "create",
"entity" : {
"class" : "entity",
"guid" : "CAR_76c931e4",
"retired" : false,
"deletable" : true,
"$aName" : "F-150",
"$aDescription" : "",
"type" : "CAR"
}
},
{
"class" : "fltupdevt",
"filterid" : "fid_63020",
"timestamp" : 1225481827543,
"updtype" : "rowlist",
"last-update" : true,
"roworder" : [ "CAR_76c931e4", "CAR_fcf94f38" ]
}
Asset Viewer. The filter command will control the privilege of the
assets which can be requested by a user and in turn receive change
notifications using this command.
Curl example:
PUT N/A
DELETE N/A
History
Command <base-url>/history
This history command is used to report all value changes for all assets
or a subset of assets for a specified time range. The population of
assets reported on can be subset by asset type and optionally asset loc-
ation. The time range specified for the API can be an absolute time
range (for example, February 1, 2014 to February 28, 2014) or rel-
ative to the current time (for example, the last hour relative to the time
the API is invoked).
Description
The API can optionally be invoked to report the “lead-in” value for
all assets being reported on. The lead in value is described as the
value of an attribute on or before the start time of the report. If the
lead in value is already known, it is recommended to not report the
lead in value due to the additional resource expense required to query
these values.
Retrieves the asset changes during the time range specified in the com-
mand for all or the specified list of attributes.
l history?filtertype=tAsset&seconds=600&name=
GET LastTenMinutes&prettyprint=false&format=
CSV&leadin=true
name (optional) – The name of the report. Used to give a name to the
report when the report output is JSON.
thismonth – The current month from the first of the month to the cur-
rent time.
lastweek – The beginning of the start of last week to the end of last
week.
lastmonth – The beginning of the start of last month to the end of last
month.
Command output:
The output of this command are the results of the attribute changes
presented in either a JSON or CSV.
Minimum privilege level required:
Curl example:
To report the history changes for all assets for the last ten minutes and
output the result using CSV:
To report the history changes for all assets from the beginning of May
1st, 2014 to the end of May 1st 2014:
POST N/A
PUT N/A
DELETE N/A
Report Output
Command <base-url>/reportoutput
Command output:
The output of this command are the results of the report presented in either
a JSON, CSV, PDF, XML, or PNG image file
Curl example:
Command output:
The output of this command are the results of the report presented in either
a JSON, CSV, PDF, XML, or PNG image file
Curl example:
POST N/A
PUT N/A
DELETE N/A
Report
Command <base-url>/report
The report command is used to output an instant report for the specified
Description
entity and attribute.
Command output:
The output of this command are the results of the report generated in either
a JSON, CSV, PDF, XML, or PNG image file.
GET
Minimum privilege level required:
The minimum privilege level required is the same as the privilege of the
entity-guid used when creating the instant report.
Curl example:
Command <base-url>/report
The report command is used to output an instant report for the specified
Description
entity and attribute.
Command output:
The output of this command are the results of the report generated in either
a JSON, CSV, PDF, XML, or PNG image file.
The minimum privilege level required is the same as the privilege of the
entity-guid used when creating the instant report.
Curl example:
POST N/A
PUT N/A
DELETE N/A
Tag
Command <base-url>/tag
l tag/<tag-guid>
tag-guid (required) – The guid of the tag for which to retrieve detailed
GET
information.
Command output:
tag-guid (required) – The guid of the tag for which to retrieve detailed
information.
Command output:
"LOCAL_RANGER" : {
"RFCLOC00005495" : {
"id" : "RFCLOC00005495",
"attributes" : {
"tagid" : "00005495",
"taggroupid" : "$zTagGroup_mantis04A_9c88adf9",
"tagtype" : "mantis04A",
"irlocator" : "000",
"motion" : "false",
"tamper" : "false",
"panic" : "false",
"lowbattery" : "false",
"locationzone" : "",
"confidencebyrule" : {
},
"confidencebyrule_resolved" : {
},
"taglinks" : [ {
"tagid" : "RFCLOC00005495",
"channelid" : "$zReaderM200_7277a2b_channel_A",
"ssi" : -66,
}, {
"tagid" : "RFCLOC00005495",
"channelid" : "$zReaderM200_7277a2b_channel_B",
"ssi" : -87,
}]
},
CenterScape
Curl example:
POST N/A
PUT N/A
DELETE N/A
Tag Import
Command <base-url>/tagimport
GET N/A
If the POST is a multi-part form upload, the format of the tag file is:
[Link],[Link]
POST
LOCATE00003845,24FE2A9B
...
If the POST is not a multi-part form upload, the body of the POST
is expected to be a JSON-encoded array with the following format:
Command output:
"success" : true,
"messages" : [
"code" : "[Link]",
CenterScape
Curl example:
body.
PUT N/A
DELETE N/A
Schemas
Command <base-url>/schemas
l schemas
Command output:
System Administrator
Curl example:
POST N/A
PUT N/A
DELETE N/A
Command <base-url>/zonemgrimport
GET N/A
l zonemgrimport
Command output:
Command output:
System Administrator
Curl example:
PUT N/A
DELETE N/A
This section demonstrates how to perform common queries and asset updates using the CenterScape
command interface.
This example exports all customer assets in CSV format. Dates and times
Description are exported using the ISO 8601 format. All asset attributes are exported
since the “attributeset” parameter has a value of “*”.
This example exports all customer assets in CSV format. Dates and times
Description and exported using the ISO 8601 format. The assets attributes included are
most of the tag specific attributes.
curl -i -u admin:admin '[Link]
filter=true&format=CSV&type=%24tAsset&attributeset=
%24aName&attributeset=%24aAssetTag&attributeset=
type&attributeset=%24aAssetTemperature&attributeset=
GET %24aAssetPressure&attributeset=%24aAssetDoorOpen&
attributeset=%24aAssetMotion&attributeset=%24aAsset
Tamper&attributeset=%24aAssetPanic&attributeset=
%24aAssetLowBattery&sortorder=asc&showretired=no&
dateformat=iso8601'
The assets specified in the [Link] will be uploaded and created. The
assets specified in the uploaded file are subject to the same validation cri-
teria as assets created using the CenterScape Web UI.
Note: If the guid is not specified for the asset being created, a unique guid
GET
will be automatically generated. You can explictly specify the guid if you
so desire. If the guid for an asset already exists for an asset being imported,
the attributes for the asset will be considered an update to the existing
asset.
This example is identical to creating assets. The sample asset file lists the
Description GUID for the assets that already exist. All the asset attribute value in the
file are used to update the existing attributes.
class,guid,type,retired,deletable,$aName,COLOR,$aDescription
entity,CAR_fe986be7,CAR,false,true,Chevrolet Volt,Red,Plugin Hybrid
This example queries a specific asset by its GUID. The format of the out-
Description put can be either CSV or JSON and is set using the “format” parameter.
This example is requesting the output in CSV.
This example queries all assets with the location 'DEPOT'. Like other
examples which use a filter, you can select the type of assets you want the
filter to match, the specific attributes to include in the response and the con-
Description ditions the asset must match to be included in the response. The conditions
in this example is the assets much be of '$tAsset' or a descendant of '$aAs-
set' and they must be in the location 'DEPOT' or a descendant of
'DEPOT'.
The following example creates a filter and using the filterid parameter
instructs the CenterScape server to retain the filter information and start
accumulating change notifications to the filter specified.
Description
Note: The session cookie is specified using the jsessionid parameter. The
filterupdate command uses the same value for the session id. The server
will aggregate the change notifications for all filters created using the same
session id and return the results.
The following call creates the filter for all assets whose type inherits from
the root Asset type and whose location is 'DEPOT'.
The following call will query for the updates to all the filters that were cre-
ated using the sessionid = 'SESSION_1'. The command will return imme-
diately if there are change notifications pending to any of the filters created
using the same session id or wait the default time of 30 seconds before
returning if no changes are pending.
The following example creates a filter to query for all alerts which are not
Description
resolved or closed.
This update creates a new Reader Noise Report for the last day dis-
playing $aName, $zReaderNoiseA, and $zReaderNoiseB attributes for all
readers on the system, assuming the reader has been in the NoiseDetected
state during the last day using the JSON encoded object in the file
[Link]. The contents of the file are:
"type":"$tReaderNoiseReport"
,"$aReportEmailAttachment":""
,"$aReportCreateOutputIfData":true
,"$aReportTime":"$tReportTimeRangeRelative"
,"$aReportTimeRangeRelative":3
,"$aReportSchedule":null
,"$aReportScheduleEnable":false
,"$aReportAttributeValueOperator":""
,"$aReportFilterAttribute":""
,"$aReportFilterAttributeValueOperator":""
,"$aReportPostconditionAttribute":"$zReaderState"
,"$aReportPostconditionAttributeValueOperator":"eq"
,"$aReportPostconditionAttributeValue":10
,"$aReportChangeAttributes":null
,"$aReportAttributes":["$aName","$zRead-
erNoiseA","$zReaderNoiseB"]