Create Event Property Set Type
With this method, you can create an event property set type in a specific package.
Naming convention for property set type
-
Always prefixed with the package name.
-
Can be a combination of alphanumeric characters and underscore.
-
Each name must be fully qualified and contains a package name, colon as a separator and the object name. Maximum length of fully qualified name is 81 characters.
-
Do not start the object name with a digit or an underscore.
-
Length should be at least 3 characters.
-
Camel case is generally allowed, however there is a uniqueness check carried out against textual case conflicts:
-
Two names with same characters of different textual case is not allowed. For example: A value "AbcDef" is not accepted when there is another value "abcDEF" that exists.
-
-
Verify that a colon is used only to separate a package name and the object name. The syntax is: <package>:<name>. For example: core.automobiles:FlyWheel
-
Name must be unique within a package.
Naming convention for properties
- Only the following characters are supported:
-
Uppercase and lowercase alphabets a through z and A through Z
-
Numeric digits 0 through 9
-
Punctuation marks underscore (_), hyphen (-), colon (:), and full-stop (.)
-
-
Maximum length is 30 characters.
-
Property names have to be unique for a given set of property set types.
Request
URI: /ES/v1/EventPropertySetTypes
Operation Type: CRUD
HTTP Method: POST
Permissions: <tde>.c
Request Headers
| Header | Required | Values |
|---|---|---|
| Accept | Yes | application/json |
Request Parameters
None
Request Example
/ES/v1/EventPropertySetTypes
Payload
Example 1
The following request payload creates event property set type core.automobiles:Engine in the package core.automobiles.
{
"Name": "core.automobiles:Engine",
"PackageName": "core.automobiles",
"Descriptions": [{
"LanguageCode": "en",
"Description": "Engine"
},
{
"LanguageCode": "de",
"Description": "Motor"
}
],
"DataCategory": "EventData",
"Properties": [{
"Name": "Temperature",
"Type": "String",
"PropertyLength": "127",
"Descriptions": [{
"LanguageCode": "en",
"Description": "Engine Temperature"
},
{
"LanguageCode": "de",
"Description": "Motortemperatur"
}
]
}]
}
Example 2
The following request payload creates event property set type core.automobiles:Engine in the package core.automobiles. A predefined annotation com.sap.appiot.security:spi is assigned for the property set type.
{
"Name": "core.automobiles:TemparatureEventPST",
"DataCategory": "EventData",
"Descriptions": [{
"LanguageCode": "en",
"Description": "Properties in core.automobiles:TemperatureEventPST"
}],
"Annotations": [{
"Name": "com.sap.appiot.security:spi"
}],
"Properties": [{
"Name": "Temperature",
"Descriptions": [{
"LanguageCode": "en",
"Description": "Temperature of the Engine"
}],
"Type": "Numeric",
"PropertyLength": "",
"QualityCode": "1",
"UnitOfMeasure": "AA"
},
{
"Name": "Pressure",
"Descriptions": [{
"LanguageCode": "en",
"Description": "Pressure of the Engine"
}],
"Type": "Numeric",
"PropertyLength": "",
"QualityCode": "0",
"UnitOfMeasure": "BA"
}
]
}
Response
Response Status and Error Codes
| Code | Description |
|---|---|
| 200 | Event property set type created successfully. |
Payload
Format: JSON
Media types supported are JSON and XML. The JSON for this method has the structure as illustrated in the following examples.
Response Payload Example
The following is the response payload after creating the event property set type core.automobiles:Engine.
{
"d": {
"results": [
{
"__metadata": {
"id": "https://events-sap-ci.cfapps.sap.hana.ondemand.com:443/ES/v1/EventPropertySetTypes('core.automobiles%3AEngine')",
"uri": "https://events-sap-ci.cfapps.sap.hana.ondemand.com:443/ES/v1/EventPropertySetTypes('core.automobiles%3AEngine')",
"type": "com.sap.appiot.es.EventPropertySetTypes"
},
"Name": "core.automobiles:Engine",
"PackageName": "core.automobiles",
"DataCategory": "EventData",
"Language": null,
"PropertySetTypeDescription": null,
"Properties": {
"__deferred": {
"uri": "https://events-sap-ci.cfapps.sap.hana.ondemand.com:443/ES/v1/EventPropertySetTypes('core.automobiles%3AEngine')/Properties"
}
},
"Descriptions": {
"__deferred": {
"uri": "https://events-sap-ci.cfapps.sap.hana.ondemand.com:443/ES/v1/EventPropertySetTypes('core.automobiles%3AEngine')/Descriptions"
}
}
}
]
}
}