Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-6913

FIWARE.Question.Tech.Data.OrionContextBroker.fiware-orion NGSIv2 update context

    Details

      Description

      Created question in FIWARE Q/A platform on 13-07-2016 at 14:07
      Please, ANSWER this question AT http://stackoverflow.com/questions/38351560/fiware-orion-ngsiv2-update-context

      Question:
      fiware-orion NGSIv2 update context

      Description:
      I created a small stack using with orion and the populated mongodb from the tour guide app.

      I don't understand why the updates queries are not working

      if I query the context:

      curl -s -X GET -H "Accept: text/plain" -H "fiware-service: tourguide" 'http://localhost:1026/v2/entities/0115206c51f60b48b77e4c937835795c33bb953f/attrs/capacity/value'

      I get correctly the value "50"

      if I update the value, following the query examples:

      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

      i get error "The requested entity has not been found. Check type and id"

      • 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"
        }

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2016-07-13 15:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2016-07-13 15:05|CREATED monitor | # answers= 0, accepted answer= False
        Hide
        fermin Fermín Galán added a comment -

        Waiting for user input. Impeded.

        Show
        fermin Fermín Galán added a comment - Waiting for user input. Impeded.

          People

          • Assignee:
            fermin Fermín Galán
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: