Details

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

      Description

      Hello again,

      To update entities owned by a context provider in Orion, they must be
      registered by type and id.

      If we register the context provider specifying only the entity type, then
      when we try to update passing an id in addition to the type.
      POST http://192.168.1.141:1026/v2/registrations/

      {
      "dataProvided": {
      "entities": [

      { "type": "Building", "idPattern" : ".*" }

      ]
      },
      "provider": {
      "http":

      { "url": "https://app.energysequence.com/v2" }

      ,
      "legacyForwarding": true
      }
      }
      Response

      201 Created

      But we can not update an entity of this type. when used the following
      query...

      PATCH
      http://192.168.1.141:1026/v2/entities/5b4bd791ccfc03708e521285/attrs/?type=Building

      the answer 404 is not found.
      Is there any way to update entities without the need to register their
      identifier for each one?
      Regards

      __________________________________________________________________________________________

      You can get more information about our cookies and privacy policies on the following links:

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

      [Created via e-mail received from: =?UTF-8?Q?Ailema_V=C3=A1zquez_Garc=C3=ADa?= <avazquez@bettergy.es>]

        Activity

        Hide
        jmcantera Jose Manuel Cantera added a comment -

        assigning Jason as I'm going on vacation until end of the month

        Show
        jmcantera Jose Manuel Cantera added a comment - assigning Jason as I'm going on vacation until end of the month
        Hide
        jason.fox Jason Fox added a comment - - edited

        The user is trying to use a feature (idPattern in registrations) that is not supported currently supported. As mentioned in https://fiware-orion.readthedocs.io/en/master/user/ngsiv2_implementation_notes/index.html#registrations

        "idPattern and typePattern are not implemented. This is similar to NGSIv1 registrations, where isPattern is not implemented."

        Orion is incorrectly responding with 201 Created in this case. A 400 Bad Request or 501 Not Implemented (and not creating the registration) would be more appropriate.

        Show
        jason.fox Jason Fox added a comment - - edited The user is trying to use a feature (idPattern in registrations) that is not supported currently supported. As mentioned in https://fiware-orion.readthedocs.io/en/master/user/ngsiv2_implementation_notes/index.html#registrations "idPattern and typePattern are not implemented. This is similar to NGSIv1 registrations, where isPattern is not implemented." Orion is incorrectly responding with 201 Created in this case. A 400 Bad Request or 501 Not Implemented (and not creating the registration) would be more appropriate.
        Hide
        jason.fox Jason Fox added a comment -

        eMail sent to User

        Show
        jason.fox Jason Fox added a comment - eMail sent to User

          People

          • Assignee:
            jason.fox Jason Fox
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: