Retrieve machine by ID

get

/productionMonitoring/clientapi/v2/machines/{machine-id}

This operation returns information about a machine that is specified by its ID. This method supports the request header with name 'X-ORACLE-IOT-ORG', which allows targeting requests to different organizations. The value of this request header should contain the organization identifier.

Request

Path Parameters
Query Parameters
  • The list of fields to be expanded in the result. Use 'all' to expand all expandable fields in result.
  • The comma-separated list of fields to be shown in response. By default all response object fields will be present.
Header Parameters
  • This method supports the request header with name 'X-ORACLE-IOT-ORG', which allows targeting requests to different organizations. The value of this request header should contain the organization identifier.
Back to Top

Response

Supported Media Types

200 Response

Successfully processed.
Body ()
Root Schema : Machine_receive
Type: object
Show Source
Nested Schema : attributes
Type: array
The custom machine attributes provided by the user as {name, type, value, deviceModel} tuples.
Show Source
Nested Schema : EntityConnectivity_receive
Type: object
Show Source
Nested Schema : incidents
Type: object
Set of machine incidents
Show Source
Nested Schema : metrics
Type: object
Set of machine metrics
Show Source
Nested Schema : metricValues
Type: object
Set of machine metrics
Show Source
Nested Schema : properties
Type: object
Additional Properties Allowed
Show Source
  • A map of the following type: Map<String, String>
The machine's external entity properties as key, value pairs.
Show Source
Nested Schema : tags
Type: array
The user defined tags for the machine. Can be used by users for quick search, logical grouping, etc.
Show Source
Nested Schema : Attribute_receive
Type: object
Show Source
  • The device model URN, applicable and must be specified when attribute type is 'device', 'sensor', 'alert'.
  • The name of the attribute.
  • The type of the attribute. One of [STRING, NUMBER, BOOLEAN, DATE, BINARY, DEVICE, SENSOR, ALERT].
Nested Schema : Authentication_receive
Type: object
Show Source
Nested Schema : connectorIds
Type: array
Connector authentication configuration
Show Source
Nested Schema : externalIds
Type: array
External Device identifiers
Show Source

401 Response

Unauthorized. The request requires user authentication.

404 Response

Not Found. The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

406 Response

Request Not Acceptable. The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.
Back to Top

Examples

curl -X GET 
   -u <username>:<password>
   -H 'Accept: application/json'
   https://iotserver/productionMonitoring/clientapi/v2/machines/{machine-id}

Example of Response Body

The following example shows the content of the response body in JSON format:


{
"connectivity":{
"authentication":{
"secret":"Property description was not set",
"type":"One of [CLIENT_CERTIFICATE, BASIC]."
},
"connectorIds":[
"connectorIds_1",
"connectorIds_2",
"connectorIds_3"
],
"externalIds":[
"externalIds_1",
"externalIds_2",
"externalIds_3"
],
"interpreterId":"7b33210a426d-5fd6",
"lastHeardTime":1469184297746,
"state":"Connector stateOne of [INUSE, IDLE, DOWN, UNKNOWN]."
},
"description":"The description of the machine.",
"displayName":"The display name of the machine.",
"extId":"a615619dc-1943",
"factory":"The factory this machine belongs to or is located at.",
"floorCoordinates":"The machine coordinates bound to a floor plan of the factory.",
"floorPlan":"The floor plan of the factory the machine is bound to.",
"geoLocation":"The geographic location of the factory the machine is located at.",
"id":"7ad06b74b36-334c",
"incidents":{
"links":[
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"self"
},
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"canonical"
}
]
},
"integrationId":"b474f905f91-53d2",
"lastModifiedBy":"The name of the user who last modified the definition of the machine.",
"lastModifiedTime":1469184297746,
"lastModifiedTimeAsString":1469184297746,
"metricValues":{
"links":[
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"self"
},
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"canonical"
}
]
},
"metrics":{
"links":[
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"self"
},
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"canonical"
}
]
},
"name":"The unique name of the machine.",
"productionLine":"The production line the machine belongs to.",
"properties":{
"properties_key1":"properties_value1",
"properties_key2":"properties_value2",
"properties_key3":"properties_value3"
},
"registeredBy":"The name of the user who registered this machine",
"registrationTime":1469184297746,
"registrationTimeAsString":1469184297746,
"state":"The state of the machine, by default UNKNOWN. One of [DOWN, INUSE, IDLE, UNKNOWN].",
"status":"The status of the machine, by default ACTIVE. One of [DRAFT, ACTIVE, INACTIVE].",
"tags":[
"tags_1",
"tags_2",
"tags_3"
],
"type":"The type of the machine.",
"typeName":"Property description was not set"
}



Complete cURL Example

The following example shows a complete cURL command that you can use to perform the described operation:

curl -X GET 
   -u <username>:<password>
   -H 'Accept: application/json'
   https://iotserver/productionMonitoring/clientapi/v2/machines/7a6cbd45b32-4015



Note that in the request, https://iotserver will be replaced by the name and port of your assigned IoT Cloud Service instance. The format of the Cloud Service instance is https://myinstance-myidentitydomain.iot.us.oraclecloud.com and the default port is 443.
Back to Top