Read a Thing Type with its Sensor Type Mappings
With this method, you can retrieve the details of a thing type with its sensor type mappings.
Request
URI: /ThingConfiguration/v2/ThingTypes('<thing type name>')?$expand=SensorTypeMappings/MeasureMappings,SensorTypeMappings/TargetMappings
Operation Type: CRUD
HTTP Method: GET
Permissions: <thingconf>.rRequest Headers
| Header | Required | Values |
|---|---|---|
| Accept-Language | No | Language of the thing type description. The default language is en. |
Request Parameters
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| Name | Yes | string | Name of the thing type |
Request Example
ThingConfiguration/v2/ThingTypes('core.automobiles:BMWCarX2')?$expand=SensorTypeMappings/MeasureMappings,SensorTypeMappings/TargetMappings{
"d": {
"__metadata": {
"id": "https://config-thing-sap-ci.cfapps.sap.hana.ondemand.com:443/ThingConfiguration/v2/ThingTypes('core.automobiles%3ABMWCarX2')",
"uri": "https://config-thing-sap-ci.cfapps.sap.hana.ondemand.com:443/ThingConfiguration/v2/ThingTypes('core.automobiles%3ABMWCarX2')",
"type": "com.sap.appiot.ThingType"
},
"Name": "core.automobiles:BMWCarX2",
"PackageName": "core.automobiles",
"Description": "name of the thing type",
"ExtendedThingType": null,
"ThingTypeCategory": null,
"PropertySets": {
"__deferred": {
"uri": "https://config-thing-sap-ci.cfapps.sap.hana.ondemand.com:443/ThingConfiguration/v2/ThingTypes('core.automobiles%3ABMWCarX2')/PropertySets"
}
},
"Descriptions": {
"__deferred": {
"uri": "https://config-thing-sap-ci.cfapps.sap.hana.ondemand.com:443/ThingConfiguration/v2/ThingTypes('core.automobiles%3ABMWCarX2')/Descriptions"
}
},
"ThingTemplates": {
"__deferred": {
"uri": "https://config-thing-sap-ci.cfapps.sap.hana.ondemand.com:443/ThingConfiguration/v2/ThingTypes('core.automobiles%3ABMWCarX2')/ThingTemplates"
}
},
"SensorTypeMappings": {
"results": [
{
"__metadata": {
"id": "https://config-thing-sap-ci.cfapps.sap.hana.ondemand.com:443/ThingConfiguration/v2/SensorTypeMappings('957f52c2-498d-4f99-a92a-bfbf9064d047')",
"uri": "https://config-thing-sap-ci.cfapps.sap.hana.ondemand.com:443/ThingConfiguration/v2/SensorTypeMappings('957f52c2-498d-4f99-a92a-bfbf9064d047')",
"type": "com.sap.appiot.SensorTypeMapping"
},
"MappingId": "957f52c2-498d-4f99-a92a-bfbf9064d047",
"Name": "CarSensorTypeMappings",
"Description": null,
"ThingTypeName": "core.automobiles:BMWCarX2",
"Descriptions": {
"__deferred": {
"uri": "https://config-thing-sap-ci.cfapps.sap.hana.ondemand.com:443/ThingConfiguration/v2/SensorTypeMappings('957f52c2-498d-4f99-a92a-bfbf9064d047')/Descriptions"
}
},
"ThingTypes": {
"__deferred": {
"uri": "https://config-thing-sap-ci.cfapps.sap.hana.ondemand.com:443/ThingConfiguration/v2/SensorTypeMappings('957f52c2-498d-4f99-a92a-bfbf9064d047')/ThingTypes"
}
},
"MeasureMappings": {
"results": [
{
"MappingId": "957f52c2-498d-4f99-a92a-bfbf9064d047",
"SensorTypeName": "smartwheel",
"CapabilityName": "wheelcapability",
"SensorTypeId": "614a04d5-ed4c-48e3-b34b-45ff3a05614c",
"CapabilityId": "5522437a-717c-48cf-a444-a9fa97003b2a",
"ThingTypeName": "core.automobiles:BMWCarX2",
"CapabilityPropertyId": "pressurecapability",
"PropertySetTypeId": "core.automobiles:VehicleWheel",
"NamedPropertySetTypeId": "BMWCarWheel",
"NamedPropertySetTypePropertyId": "pressure"
},
{
"MappingId": "957f52c2-498d-4f99-a92a-bfbf9064d047",
"SensorTypeName": "smartwheel",
"CapabilityName": "wheelcapability",
"SensorTypeId": "614a04d5-ed4c-48e3-b34b-45ff3a05614c",
"CapabilityId": "5522437a-717c-48cf-a444-a9fa97003b2a",
"ThingTypeName": "core.automobiles:BMWCarX2",
"CapabilityPropertyId": "speedcapability",
"PropertySetTypeId": "core.automobiles:VehicleWheel",
"NamedPropertySetTypeId": "BMWCarWheel",
"NamedPropertySetTypePropertyId": "speed"
},
{
"MappingId": "957f52c2-498d-4f99-a92a-bfbf9064d047",
"SensorTypeName": "smartengine",
"CapabilityName": "enginecapability",
"SensorTypeId": "e969e979-3f62-447f-aeb2-dc0beb3a486b",
"CapabilityId": "6e55194b-d364-4457-8942-b58b9277205a",
"ThingTypeName": "core.automobiles:BMWCarX2",
"CapabilityPropertyId": "tempcapability",
"PropertySetTypeId": "core.automobiles:VehicleEngine",
"NamedPropertySetTypeId": "BMWCarEngine",
"NamedPropertySetTypePropertyId": "temperature"
}
]
},
"TargetMappings": {
"results": [
{
"MappingId": "957f52c2-498d-4f99-a92a-bfbf9064d047",
"SensorTypeName": "rsmartengine",
"CapabilityName": "renginecapability",
"SensorTypeId": "7d1ca23d-0686-4f20-ad88-873df4462e20",
"CapabilityId": "942507ec-99bd-41b9-90e6-cc994b6d0a9a",
"ThingTypeName": "core.automobiles:BMWCarX2",
"CapabilityPropertyId": "rtempcapability",
"PropertySetTypeId": "core.automobiles:VehicleEngineRef",
"NamedPropertySetTypeId": "BMWCarEngine",
"NamedPropertySetTypeReferencePropertyId": "temperatureTV"
}
]
}
}
]
},
"SensorTypes": {
"__deferred": {
"uri": "https://config-thing-sap-ci.cfapps.sap.hana.ondemand.com:443/ThingConfiguration/v2/ThingTypes('core.automobiles%3ABMWCarX2')/SensorTypes"
}
}
}
}
Response
Response Status and Error Codes
| Code | Description |
|---|---|
| 200 | Details of a specific thing type with its sensor type mappings retrieved successfully |