A new attribute to an existing asset via API

Hello,

I’m new both here in the forum and in the use of solutions for IoT environments, my English isn’t the best either, so I apologize if I don’t express myself in the best way. Let’s get to the question:

The context is that I have some automated processes, these processes create a asset structure. This asset can have a variety of attributes depending on various factors.

What I would like is to know exactly what I need to send and to which API endpoint to get the same result like when adding custom attributes in the Manager UI.

Something like attrs update but for new attrs:
endpoint: [PUT]/asset/attributes

[
    {
        "ref": {
            "id": "3IhNb6ZyY9iwWOaztiHWa1",
            "name": "test_attr"
        },
        "value": true
    }
]
1 Like

I don’t know if it’s the best alternative, but it was the only one I found. If the more experienced community has better solutions, please share.

/api/cachapuz/asset

I used the same endpoint of creating an asset to create new attributes. One of the big problems is that I need to send every object in the request. In an automated process like the one I want to do this turned out to be much more expensive than it should have been, but it was done.