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

FIWARE.Request.Tech.Data.OrionContextBroker.UpdateActionDelete

    Details

    • Type: extRequest
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:
      None

      Description

      Hi.

      I need to delete an attribute of a entity but I obtain error "No context
      element found".

      Could you help me?

      This is the attribute of entity:

      [root@host-192-168-192-78 conf]# (curl
      localhost:1026/NGSI10/queryContext -s -S --header 'Content-Type:
      application/xml' d @ | xmllint --format -) <<EOF
      > <?xml version="1.0" encoding="UTF-8"?>
      > <queryContextRequest>
      > <entityIdList>
      > <entityId type="Sensor" isPattern="false">
      > <id>1</id>
      > </entityId>
      > </entityIdList>
      > <attributeList>
      > <attribute>timestamp</attribute>
      > </attributeList>
      > </queryContextRequest>
      > EOF
      <?xml version="1.0"?>
      <queryContextResponse>
      <contextResponseList>
      <contextElementResponse>
      <contextElement>
      <entityId type="Sensor" isPattern="false">
      <id>1</id>
      </entityId>
      <contextAttributeList>
      <contextAttribute>
      <name>timestamp</name>
      <type>string</type>
      <contextValue>2015-04-15 11:10:00</contextValue>
      </contextAttribute>
      </contextAttributeList>
      </contextElement>
      <statusCode>
      <code>200</code>
      <reasonPhrase>OK</reasonPhrase>
      </statusCode>
      </contextElementResponse>
      </contextResponseList>
      </queryContextResponse>
      [root@host-192-168-192-78 conf]#

      And here the xml code to delete it:

      [root@host-192-168-192-78 conf]# (curl
      localhost:1026/NGSI10/updateContext -s -S --header 'Content-Type:
      application/xml' d @ | xmllint --format - ) <<EOF
      > <?xml version="1.0" encoding="UTF-8"?>
      > <updateContextRequest>
      > <contextElementList>
      > <contextElement>
      > <entityId type="Sensor" isPattern="false">
      > <id>1</id>
      > </entityId>
      > <contextAttributeList>
      > <contextAttribute>
      > <name>timestamp</name>
      > <type>string</type>
      > <contextValue/>
      > </contextAttribute>
      > </contextAttributeList>
      > </contextElement>
      > </contextElementList>
      > <updateAction>DELETE</updateAction>
      > </updateContextRequest>
      > EOF
      <?xml version="1.0"?>
      <updateContextResponse>
      <contextResponseList>
      <contextElementResponse>
      <contextElement>
      <entityId type="Sensor" isPattern="false">
      <id>1</id>
      </entityId>
      </contextElement>
      <statusCode>
      <code>404</code>
      <reasonPhrase>No context element found</reasonPhrase>
      <details>1</details>
      </statusCode>
      </contextElementResponse>
      </contextResponseList>
      </updateContextResponse>
      [root@host-192-168-192-78 conf]#

      Regards.

      Cristina

      _______________________________________________
      Fiware-tech-help mailing list
      Fiware-tech-help@lists.fi-ware.org
      https://lists.fi-ware.org/listinfo/fiware-tech-help

      [Created via e-mail received from: =?UTF-8?Q?Cristina_Albaladejo_P=C3=A9rez?= <cristina.albaladejo@widhoc.com>]

        Activity

        Hide
        fermin Fermín Galán added a comment -

        We provide support on Orion Context Broker through StackOverflow http://stackoverflow.com. This way, all the Q&A about the product become available in a public and searchable knowledge base like StackOverflow, which is quite popular among developers.

        In that sense, could you ask your question using that platform, please? Use the “fiware-orion” tag (this is important: using this tag in your question is the only way our support staff realizes a new question on Orion has been posted). Any further interaction will be carried out through answers and comments to your question.

        Thanks!

        Show
        fermin Fermín Galán added a comment - We provide support on Orion Context Broker through StackOverflow http://stackoverflow.com . This way, all the Q&A about the product become available in a public and searchable knowledge base like StackOverflow, which is quite popular among developers. In that sense, could you ask your question using that platform, please? Use the “fiware-orion” tag (this is important: using this tag in your question is the only way our support staff realizes a new question on Orion has been posted). Any further interaction will be carried out through answers and comments to your question. Thanks!

          People

          • Assignee:
            fermin Fermín Galán
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: