Create Annotation
With this method, you can create annotation in the specified package.
Naming convention
-
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.
Request
URI: /ThingConfiguration/v1/Packages('<package name>')/Annotations
Operation Type: CRUD
HTTP Method: POST
Permissions: <thingconf>.c
Request Parameters
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| package name | Yes | String | Unique name of the package |
Request Example
Format: JSON
/ThingConfiguration/v1/Packages('core.automobiles')/Annotations{
"Name": "core.automobiles:Pressure108",
"Descriptions": [
{
"LanguageCode": "en",
"Description": "Description of annotation in en"
},
{
"LanguageCode": "de",
"Description": "Description of annotation in de"
}
]
}
Response
Response Status and Error Codes
| Code | Description |
|---|---|
| 201 | Annotations created successfully. |
Response Payload
Payload
Format: JSON
Media types supported are JSON and XML. The JSON for this method has the following structure:
{
"d": {
"__metadata": {
"id": "https://config-thing-sap-ci.cfapps.sap.hana.ondemand.com:443/ThingConfiguration/v1/Annotations('core.automobiles%3APressure108')",
"uri": "https://config-thing-sap-ci.cfapps.sap.hana.ondemand.com:443/ThingConfiguration/v1/Annotations('core.automobiles%3APressure108')",
"type": "com.sap.appiot.Annotation"
},
"Name": "core.automobiles:Pressure108",
"PackageName": "core.automobiles",
"Description": "Description of annotation in en",
"Descriptions": {
"__deferred": {
"uri": "https://config-thing-sap-ci.cfapps.sap.hana.ondemand.com:443/ThingConfiguration/v1/Annotations('core.automobiles%3APressure108')/Descriptions"
}
}
}
}