Details
-
Type:
Monitor
-
Status: Closed
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Enabler:Orion
Description
Created question in FIWARE Q/A platform on 01-02-2019 at 23:02
Please, ANSWER this question AT https://stackoverflow.com/questions/54488078/which-characters-can-be-used-in-an-attribute-name-fiware-orion
Question:
Which characters can be used in an attribute name? - FIWARE Orion
Description:
I'd like to know details about character set and character code that can be used in an attribute name. I tried to create an entity that has an attribute name "日本語". I was able to create it in case of NGSIv1 but not in case of NGSIv2.
In case of NGSIv1 API,
Request:
(curl localhost:1026/v1/updateContext -sS --header 'Content-Type: application/json' \
-header 'Accept: application/json' -d @ <<EOF) | jq .
{
"contextElements": [
{
"type": "Test",
"isPattern": "false",
"id": "Testv1",
"attributes": [
,
{ "name": "日本語", "type": "Integer", "value": "2" } ]
}
],
"updateAction": "APPEND"
}
EOF
Response:
{
"contextResponses": [
{
"contextElement": {
"type": "Test",
"isPattern": "false",
"id": "Testv1",
"attributes": [
,
{ "name": "日本語", "type": "Integer", "value": "" } ]
},
"statusCode":
}
]
}
In case of NGSIv2 API,
Request:
(curl localhost:1026/v2/entities -s -S -H 'Content-Type: application/json' \
d @ <<EOF) | jq .
{
"id": "Test1",
"type": "Test",
"japanese":
,
"日本語":
}
EOF
Response:
{ "error": "BadRequest", "description": "Invalid characters in attribute name" }Activity
- All
- Comments
- History
- Activity
- Transitions