Read Entity Operation - web_services - 23.1

Spectrum Web Services Guide

Product type
Software
Portfolio
Integrate
Product family
Spectrum
Product
Spectrum > Web Services
Version
23.1
Language
English
Product name
Spectrum Technology Platform
Title
Spectrum Web Services Guide
First publish date
2007
Last updated
2024-10-17
Published on
2024-10-17T00:33:46.811413

The read entity operation returns property values for an entity in a Context Graph model.

HTTP GET URL Format

The request is specified as follows. The Spectrum server supports both HTTP and HTTPS.

GET http://server_name:port/rest/ContextGraph/operations/modelName/entities/entityType/entityLabel

URL Path Elements

modelName
The name of the Context Graph model.
entityType
An entity type defined in the model
entityLabel
The label for an existing entity in the model.

Return codes

The operation returns the status code "200 OK" when it is successful. The operation returns the status code 500 (Error) when it fails.

Response

The response returns a name-value pair for each entity property in the following format. Note that numeric values are not enclosed between quotation marks.

{
   "result":{
   "property":value,
   "property":value,
                ...
   "property":value
}}

JSON response

The following request reads properties from the "Place" entity type in the "911" model with the label "FlightSafety International".

GET http://localhost:8080/rest/ContextGraph/operations/911/entities/Place/FlightSafety%20International

This results in the following response:

{"result":{
                "Latitude":"27.6386433",
                "Location":"Vero Beach, Florida",
                "Longitude":"-80.39727",
                "Place":"FlightSafety International",
                "Date":1275782400000
                }}
Note: Date, time, and date-time property values are UNIX Epoch time values formatted as long data type in both requests and responses.