Skip to content

Internal Attributes not getting updated  #917

@sunilsonu789

Description

@sunilsonu789

Hi,
I want to update the custom attribute value in service provisioning, But i am only able to update attribute value but i can not update internal attribute mapping.
Like As
Service Creation Start:

curl --location --request POST 'http://IP:PORT/iot/services/' \
--header 'Content-Type: application/json' \
--header 'fiware-service: resource' \
--header 'fiware-servicePath: /path' \
--data-raw '{
    "services": [
        {
            "resource": "/resourcepath",
            "apikey": "abcabc",
            "entity_type": "ResourcePathType",

            "attributes": [
                {
                    "name": "Dummy",
                    "type": "number"
                }
            ],
            "internal_attributes": [
                {
                    "lwm2mResourceMapping": {
                        "Dummy": {
                            "objectType": 55577,
                            "objectInstance": 0,
                            "objectResource": 0
                        }
                    }
                }
            ],  
        }
    ]
}'

Service Creation End:

Service Update Start:

curl --location --request PUT 'http://IP:PORT/iot/services/?resource=/resourcepath&apikey=abcabc' \
--header 'Content-Type: application/json' \
--header 'fiware-service: resource' \
--header 'fiware-servicePath: /path' \
--data-raw '{
  "attributes": [
                {
                    "name": "Dummy2",
                    "type": "number"
                }
            ],
            "internal_attributes": [
                {
                    "lwm2mResourceMapping": {
                        "Dummy2": {
                            "objectType": 55577,
                            "objectInstance": 0,
                            "objectResource": 1
                        }
                    }
                }
            ]
}'

Service Update End:

After update only Dummy2 is updatd only for attribute array.
It is not updated for internal attributes.so Mapping does not work for sending data.
Please look.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions