Read an Object Type
With this method, you can retrieve the details of a specific object type.
In order to read a given object type, we have to provide the object type name.
Request
URI: /CustomDataConfiguration/v2/ObjectTypes('<ObjectTypeName>')
Operation Type: CRUD
HTTP Method: GET
Permissions: <cdconf>.r
Request Parameters
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| $expand | No | String | Helps to get all the properties for the specified object type |
Request Example
/CustomDataConfiguration/v2/ObjectTypes('iotae.devtest1.cdemo:Material')Response
Response Headers
| Header | Value |
|---|---|
| Etag | DC68FB05A8AB46619F7F6E22F5F5241F |
Response Status and Error Codes
| Code | Description |
|---|---|
| 200 | Details of a specific object type retrieved successfully |
Response Payload Example
/CustomDataConfiguration/v2/ObjectTypes('iotae.devtest1.aejob.automobilestes:testOT1308')/Properties{
"d": {
"results": [
{
"__metadata": {
"id": "https://config-customdata-sap-sandbox.cfapps.sap.hana.ondemand.com:443/CustomDataConfiguration/v2/Properties(Name='testProperty1',ObjectType='iotae.devtest1.aejob.automobilestes%3AtestOT1308')",
"uri": "https://config-customdata-sap-sandbox.cfapps.sap.hana.ondemand.com:443/CustomDataConfiguration/v2/Properties(Name='testProperty1',ObjectType='iotae.devtest1.aejob.automobilestes%3AtestOT1308')",
"type": "com.sap.appiot.Property"
},
"Name": "testProperty1",
"ObjectType": "iotae.devtest1.aejob.automobilestes:testOT1308",
"Description": "Test Object Type 7",
"Type": "String",
"PropertyLength": "128"
},
{
"__metadata": {
"id": "https://config-customdata-sap-sandbox.cfapps.sap.hana.ondemand.com:443/CustomDataConfiguration/v2/Properties(Name='testProperty2',ObjectType='iotae.devtest1.aejob.automobilestes%3AtestOT1308')",
"uri": "https://config-customdata-sap-sandbox.cfapps.sap.hana.ondemand.com:443/CustomDataConfiguration/v2/Properties(Name='testProperty2',ObjectType='iotae.devtest1.aejob.automobilestes%3AtestOT1308')",
"type": "com.sap.appiot.Property"
},
"Name": "testProperty2",
"ObjectType": "iotae.devtest1.aejob.automobilestes:testOT1308",
"Description": "Test Object Type 8",
"Type": "String",
"PropertyLength": "128"
}
]
}
}
/CustomDataConfiguration/v2/ObjectTypes('iotae.devtest1.cdemo:Material')
{
"d": {
"__metadata": {
"id": "https://config-customdata-sap-sandbox.cfapps.sap.hana.ondemand.com:443/CustomDataConfiguration/v1/ObjectTypes('iotae.devtest1.cdemo%3AMaterial')",
"uri": "https://config-customdata-sap-sandbox.cfapps.sap.hana.ondemand.com:443/CustomDataConfiguration/v1/ObjectTypes('iotae.devtest1.cdemo%3AMaterial')",
"type": "com.sap.appiot.ObjectType"
},
"Name": "iotae.devtest1.cdemo:Material",
"PackageName": "iotae.devtest1.cdemo",
"Description": "Material Data",
"IsMultiLingual": true,
"NumberOfProperties": null,
"Source": "Material Management",
"Annotations": {
"__deferred": {
"uri": "https://config-customdata-sap-sandbox.cfapps.sap.hana.ondemand.com:443/CustomDataConfiguration/v1/ObjectTypes('iotae.devtest1.cdemo%3AMaterial')/Annotations"
}
},
"Descriptions": {
"__deferred": {
"uri": "https://config-customdata-sap-sandbox.cfapps.sap.hana.ondemand.com:443/CustomDataConfiguration/v1/ObjectTypes('iotae.devtest1.cdemo%3AMaterial')/Descriptions"
}
},
"Properties": {
"__deferred": {
"uri": "https://config-customdata-sap-sandbox.cfapps.sap.hana.ondemand.com:443/CustomDataConfiguration/v1/ObjectTypes('iotae.devtest1.cdemo%3AMaterial')/Properties"
}
}
}
}
With $expand=Properties
/CustomDataConfiguration/v2/ObjectTypes('iotae.devtest1.cdemo:Material')?$format=json&$expand=Properties
{
"d": {
"__metadata": {
"id": "https://config-customdata-sap-sandbox.cfapps.sap.hana.ondemand.com:443/CustomDataConfiguration/v2/ObjectTypes('iotae.devtest1.cdemo%3AMaterial')",
"uri": "https://config-customdata-sap-sandbox.cfapps.sap.hana.ondemand.com:443/CustomDataConfiguration/v2/ObjectTypes('iotae.devtest1.cdemo%3AMaterial')",
"type": "com.sap.appiot.ObjectType"
},
"Name": "iotae.devtest1.cdemo:Material",
"PackageName": "iotae.devtest1.cdemo",
"Description": "Material Data",
"IsMultiLingual": true,
"NumberOfProperties": null,
"Source": "Material Management",
"Annotations": {
"__deferred": {
"uri": "https://config-customdata-sap-sandbox.cfapps.sap.hana.ondemand.com:443/CustomDataConfiguration/v2/ObjectTypes('iotae.devtest1.cdemo%3AMaterial')/Annotations"
}
},
"Descriptions": {
"__deferred": {
"uri": "https://config-customdata-sap-sandbox.cfapps.sap.hana.ondemand.com:443/CustomDataConfiguration/v2/ObjectTypes('iotae.devtest1.cdemo%3AMaterial')/Descriptions"
}
},
"Properties": {
"results": [
{
"Name": "MATNR",
"ObjectType": "iotae.devtest1.cdemo:Material",
"Description": "",
"Type": "String",
"PropertyLength": "120",
"UnitOfMeasure": "",
"IsMultiLingual": false,
"PropertyType":""
},
{
"Name": "Material_Type",
"ObjectType": "iotae.devtest1.cdemo:Material",
"Description": "",
"Type": "String",
"PropertyLength": "120",
"UnitOfMeasure": "",
"IsMultiLingual": true,
"PropertyType":""
}
]
}
}
}
With $expand=Annotations
/CustomDataConfiguration/v2/ObjectTypes('iotae.devtest1.cdemo:Material')?$format=json&$expand=Annotations{
"d": {
"__metadata": {
"id": "https://config-customdata-sap-sandbox.cfapps.sap.hana.ondemand.com:443/CustomDataConfiguration/v2/ObjectTypes('iotae.devtest1.cdemo%3AMaterial')",
"uri": "https://config-customdata-sap-sandbox.cfapps.sap.hana.ondemand.com:443/CustomDataConfiguration/v2/ObjectTypes('iotae.devtest1.cdemo%3AMaterial')",
"type": "com.sap.appiot.ObjectType"
},
"Name": "iotae.devtest1.cdemo:Material",
"PackageName": "iotae.devtest1.cdemo",
"Description": "Material Data",
"IsMultiLingual": true,
"NumberOfProperties": null,
"Source": "Material Management",
"Annotations": {
"results": [
{
"Name": "com.sap.appiot.security:pii",
"PackageName": "com.sap.appiot.security",
"Description": null
}
]
},
"Descriptions": {
"__deferred": {
"uri": "https://config-customdata-sap-sandbox.cfapps.sap.hana.ondemand.com:443/CustomDataConfiguration/v2/ObjectTypes('iotae.devtest1.cdemo%3AMaterial')/Descriptions"
}
},
"Properties": {
"__deferred": {
"uri": "https://config-customdata-sap-sandbox.cfapps.sap.hana.ondemand.com:443/CustomDataConfiguration/v2/ObjectTypes('iotae.devtest1.cdemo%3AMaterial')/Properties"
}
}
}
}