首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >fiware-orion NGSIv2更新上下文

fiware-orion NGSIv2更新上下文
EN

Stack Overflow用户
提问于 2016-07-13 20:19:13
回答 0查看 300关注 0票数 1

我使用orion和导游应用程序中填充的mongodb创建了一个小堆栈。

我不明白为什么更新查询不起作用:(

如果我查询上下文:

代码语言:javascript
复制
 curl -s -X GET -H "Accept: text/plain" -H "fiware-service: tourguide" 'http://localhost:1026/v2/entities/0115206c51f60b48b77e4c937835795c33bb953f/attrs/capacity/value'

我得到了正确的值"50“

如果我更新该值,请遵循以下查询示例:

代码语言:javascript
复制
curl -s -v -X PUT -H "Accept: text/plain" -H "fiware-service: tourguide" -H "Content-Type: text/plain" 'http://160.85.2.22:1026/v2/entities/0115206c51f60b48b77e4c937835795c33bb953f/attrs/capacity/value' -d 52

我收到错误“未找到请求的实体。请检查类型和id”

代码语言:javascript
复制
*   Trying 160.85.2.22...
* Connected to 160.85.2.22 (160.85.2.22) port 1026 (#0)
> PUT /v2/entities/0115206c51f60b48b77e4c937835795c33bb953f/attrs/capacity/value?type=Restaurant HTTP/1.1
> Host: 160.85.2.22:1026
> User-Agent: curl/7.47.0
> Accept: application/json
> fiware-service: tourguide
> Content-Type: text/plain
> Content-Length: 2
> 
} [2 bytes data]
* upload completely sent off: 2 out of 2 bytes
< HTTP/1.1 404 Not Found
< Connection: Keep-Alive
< Content-Length: 95
< Content-Type: application/json
< Fiware-Correlator: 9d2f4164-48f3-11e6-af87-0242ac110004
< Date: Wed, 13 Jul 2016 12:16:23 GMT
< 
{ [95 bytes data]
* Connection #0 to host 160.85.2.22 left intact
{
    "description": "The requested entity has not been found. Check type and id",
    "error": "NotFound"
}
EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38351560

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档