Read Entity Operation

The read entity operation returns property values for an entity in a Data Hub 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/DataHub/operations/modelName/entities/entityType/entityLabel

URL Path Elements

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

Response

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

The response returns a name-value pair for each entity property in the following format, when an entity has N properties.

{
   "result":{
   "Property1":"Value1",
   "Property2":"Value2",
                ...
   "PropertyN":"ValueN"
}}

Read entity with 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/DataHub/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.