Read Metadata of Content Manager Runtime Service
Using this API, you can read the metadata of all data models in Content Manager. The metadata contains entity types for all data models. Each entity type will have properties that include dimensions, measures and timestamp related fields.
Request
URL : /data/v1/odata.svc/$metadata
HTTP Method : GET
Permissions : cm.user
| Header | Required | Value |
|---|---|---|
| If-None-Match | No | Etag |
| Accept | No |
application/json or application/atom+xml |
Annotation Terms in Metadata Service Document
| Annotation Term | Data Type | Description |
|---|---|---|
| Analytics.Dimension | Boolean | If an entity property has annotation term Analytics.Dimension set to true, then the property is a dimension. |
| Analytics.Measure | Boolean | If an entity property has annotation term Analytics.Measure set to true, then the property is a measure. |
| Common.Label | String | The annotation term Common.Label defines the label of the property. |
| Property | Data Type | Description |
|---|---|---|
| BASEID | String | Base Attribute |
| TIMESTAMP | DateTime | Timestamp of aggregated time series data. |
| TIMESTAMP_STR | String | String representation of timestamp of aggregated time series data |
| DATE | Date | Date of aggregated time series data, and this property is a member of time hierarchy |
| DATE_NH | Date | Date of aggregated time series data, and this property is not a member of time hierarchy |
| WEEK_NH |
Integer (Format: YYYYWW) |
Week of aggregated time series data |
| MONTH |
Integer (Format: YYYYMM) |
Month of aggregated time series data, and this property is a member of time hierarchy |
| MONTH_NH |
Integer (Format:YYYYMM) |
Month of aggregated time series data, and this property is not a member of time hierarchy |
| QUARTER |
Integer (Format:YYYYMM) |
Quarter of aggregated time series data, and this property is a member of time hierarchy |
| QUARTER_NH |
Integer (Format: YYYYQ) |
Quarter of aggregated time series data, and this property is not a member of time hierarchy |
| HALF_YEAR |
String (Format:H1/H2) |
Half year of aggregated time series data, and this property is a member of time hierarchy |
| HALF_YEAR_NH |
String (Format:H1/H2) |
Half year of aggregated time series data, and this property is not a member of time hierarchy |
| YEAR |
Integer (Format:YYYY) |
Year of aggregated time series data, and this property is a member of time hierarchy |
| YEAR_NH |
Integer (Format:YYYY) |
Year of aggregated time series data, and this property is not a member of time hierarchy |
| DIMENSIONS_START_TIME | DateTime | Start time of master data dimensions. |
| DIMENSIONS_START_TIME_STR | String | String representation of start time of master data dimensions. |
| DIMENSIONS_END_TIME | DateTime | End time of master data dimensions. |
| DIMENSIONS_END_TIME_STR | String | String representation of end time of master data dimensions. |
Request Example
/data/v1/odata.svc/$metadata
Response
<?xml version="1.0" encoding="UTF-8"?> <edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"> <edmx:Reference Uri="/annotations/com.sap.vocabularies.Common.v1.xml"> <edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="Common"></edmx:Include> </edmx:Reference> <edmx:Reference Uri="/annotations/com.sap.vocabularies.Analytics.v1.xml"> <edmx:Include Namespace="com.sap.vocabularies.Analytics.v1" Alias="Analytics"></edmx:Include> </edmx:Reference> <edmx:DataServices> <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="com.sap.iot.cm.rt"> <EntityType Name="COOLERMODELANALYSISTYPE"> <Key> <PropertyRef Name="GENERATED_ID"/> </Key> <Property Name="MONTH" Type="Edm.Int32" MaxLength="10"> <Annotation Term="Common.Label"> <String>MONTH</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="MONTH_NH" Type="Edm.Int32" MaxLength="10"> <Annotation Term="Common.Label"> <String>MONTH_NH</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="QUARTER" Type="Edm.Int16" MaxLength="5"> <Annotation Term="Common.Label"> <String>QUARTER</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="QUARTER_NH" Type="Edm.Int16" MaxLength="5"> <Annotation Term="Common.Label"> <String>QUARTER_NH</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="TEMPERATUREMAX" Type="Edm.Decimal" MaxLength="4" Precision="4" Scale="2"> <Annotation Term="Common.Label"> <String>TEMPERATUREMAX</String> </Annotation> <Annotation Term="Analytics.Measure"> <Bool>true</Bool> </Annotation> </Property> <Property Name="BASEID" Type="Edm.String" MaxLength="5000"> <Annotation Term="Common.Label"> <String>BASEID</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="TIMESTAMP" Type="Edm.DateTimeOffset" MaxLength="27"> <Annotation Term="Common.Label"> <String>TIMESTAMP</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="TIMESTAMP_STR" Type="Edm.String" MaxLength="5000"> <Annotation Term="Common.Label"> <String>TIMESTAMP_STR</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="WEEK_NH" Type="Edm.Int32" MaxLength="10"> <Annotation Term="Common.Label"> <String>WEEK_NH</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="YEAR" Type="Edm.Int16" MaxLength="5"> <Annotation Term="Common.Label"> <String>YEAR</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="YEAR_NH" Type="Edm.Int16" MaxLength="5"> <Annotation Term="Common.Label"> <String>YEAR_NH</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="HALF_YEAR_NH" Type="Edm.String" MaxLength="5000"> <Annotation Term="Common.Label"> <String>HALF_YEAR_NH</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="HALF_YEAR" Type="Edm.String" MaxLength="5000"> <Annotation Term="Common.Label"> <String>HALF_YEAR</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="DIMENSIONS_START_TIME_STR" Type="Edm.String" MaxLength="5000"> <Annotation Term="Common.Label"> <String>DIMENSIONS_START_TIME_STR</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="DIMENSIONS_START_TIME" Type="Edm.DateTimeOffset" MaxLength="27"> <Annotation Term="Common.Label"> <String>DIMENSIONS_START_TIME</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="DIMENSIONS_END_TIME_STR" Type="Edm.String" MaxLength="5000"> <Annotation Term="Common.Label"> <String>DIMENSIONS_END_TIME_STR</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="DIMENSIONS_END_TIME" Type="Edm.DateTimeOffset" MaxLength="27"> <Annotation Term="Common.Label"> <String>DIMENSIONS_END_TIME</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="DATE_NH" Type="Edm.Date" MaxLength="10"> <Annotation Term="Common.Label"> <String>DATE_NH</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="DATE" Type="Edm.Date" MaxLength="10"> <Annotation Term="Common.Label"> <String>DATE</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="COOLERTYPE" Type="Edm.String" MaxLength="5000"> <Annotation Term="Common.Label"> <String>COOLERTYPE</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="COOLERSTATEDESC" Type="Edm.String" MaxLength="5000"> <Annotation Term="Common.Label"> <String>COOLERSTATEDESC</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="COOLERNAME" Type="Edm.String" MaxLength="5000"> <Annotation Term="Common.Label"> <String>COOLERNAME</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="GENERATED_ID" Type="Edm.String" Nullable="false"></Property> </EntityType> <EntityType Name="COOLERMODELKPITYPE"> <Key> <PropertyRef Name="GENERATED_ID"/> </Key> <Property Name="HALF_YEAR_NH" Type="Edm.String" MaxLength="5000"> <Annotation Term="Common.Label"> <String>HALF_YEAR_NH</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="MONTH" Type="Edm.Int32" MaxLength="10"> <Annotation Term="Common.Label"> <String>MONTH</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="MONTH_NH" Type="Edm.Int32" MaxLength="10"> <Annotation Term="Common.Label"> <String>MONTH_NH</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="QUARTER" Type="Edm.Int16" MaxLength="5"> <Annotation Term="Common.Label"> <String>QUARTER</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="QUARTER_NH" Type="Edm.Int16" MaxLength="5"> <Annotation Term="Common.Label"> <String>QUARTER_NH</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="BASEID" Type="Edm.String" MaxLength="5000"> <Annotation Term="Common.Label"> <String>BASEID</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="TIMESTAMP" Type="Edm.DateTimeOffset" MaxLength="27"> <Annotation Term="Common.Label"> <String>TIMESTAMP</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="TIMESTAMP_STR" Type="Edm.String" MaxLength="5000"> <Annotation Term="Common.Label"> <String>TIMESTAMP_STR</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="WEEK_NH" Type="Edm.Int32" MaxLength="10"> <Annotation Term="Common.Label"> <String>WEEK_NH</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="YEAR" Type="Edm.Int16" MaxLength="5"> <Annotation Term="Common.Label"> <String>YEAR</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="YEAR_NH" Type="Edm.Int16" MaxLength="5"> <Annotation Term="Common.Label"> <String>YEAR_NH</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="COOLERNAME" Type="Edm.String" MaxLength="5000"> <Annotation Term="Common.Label"> <String>COOLERNAME</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="COOLERSTATEDESC" Type="Edm.String" MaxLength="5000"> <Annotation Term="Common.Label"> <String>COOLERSTATEDESC</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="COOLERTYPE" Type="Edm.String" MaxLength="5000"> <Annotation Term="Common.Label"> <String>COOLERTYPE</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="DATE" Type="Edm.Date" MaxLength="10"> <Annotation Term="Common.Label"> <String>DATE</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="DATE_NH" Type="Edm.Date" MaxLength="10"> <Annotation Term="Common.Label"> <String>DATE_NH</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="DIMENSIONS_END_TIME" Type="Edm.DateTimeOffset" MaxLength="27"> <Annotation Term="Common.Label"> <String>DIMENSIONS_END_TIME</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="DIMENSIONS_END_TIME_STR" Type="Edm.String" MaxLength="5000"> <Annotation Term="Common.Label"> <String>DIMENSIONS_END_TIME_STR</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="DIMENSIONS_START_TIME" Type="Edm.DateTimeOffset" MaxLength="27"> <Annotation Term="Common.Label"> <String>DIMENSIONS_START_TIME</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="DIMENSIONS_START_TIME_STR" Type="Edm.String" MaxLength="5000"> <Annotation Term="Common.Label"> <String>DIMENSIONS_START_TIME_STR</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="DOOROPENCOUNTSUM" Type="Edm.Int64" MaxLength="19"> <Annotation Term="Common.Label"> <String>DOOROPENCOUNTSUM</String> </Annotation> <Annotation Term="Analytics.Measure"> <Bool>true</Bool> </Annotation> </Property> <Property Name="HALF_YEAR" Type="Edm.String" MaxLength="5000"> <Annotation Term="Common.Label"> <String>HALF_YEAR</String> </Annotation> <Annotation Term="Analytics.Dimension"> <Bool>true</Bool> </Annotation> </Property> <Property Name="GENERATED_ID" Type="Edm.String" Nullable="false"></Property> </EntityType> <EntityContainer Name="ContentManagerEntityContainer"> <EntitySet Name="COOLERMODELANALYSIS" EntityType="com.sap.iot.cm.rt.COOLERMODELANALYSISTYPE"></EntitySet> <EntitySet Name="COOLERMODELKPI" EntityType="com.sap.iot.cm.rt.COOLERMODELKPITYPE"></EntitySet> </EntityContainer> </Schema> </edmx:DataServices> </edmx:Edmx>
Response Status and Error Codes
| Code | Description |
|---|---|
| 200 | Content Manager Run Time Service Metadata retrieved successfully |
| 304 | If-None-Match header with etag value is provided in the request , and this etag (in metadata document) is not changed since the metadata is last accessed, then response code “304: Not Modified” is returned.
If metadata document is changed, then the latest metadata service document is returned in response. |