Hello, any guidance on this below query would be really helpful. I am trying to find a way to create Items automatically using REST API (I will write an external service to do this). I am looking for some initial guidance on how to go about doing this.
For example, I have a Tesla binding added with a few things and items like this:
If I were to go about creating this item (and potentially recurse thru all channels and create respective items) using Rest API how do I go about doing that? I understand I will need to use this API:
/items/createOrUpdateItem . But how would the json look like and how different will they have to be for each channel ?
I did. but I am not able to follow the spec. for example, to add item: the body shows like this:
{
“type”: “string”,
“name”: “string”,
“label”: “string”,
“category”: “string”,
“tags”: [
“string”
],
“groupNames”: [
“string”
],
“groupType”: “string”,
“function”: {
“name”: “string”,
“params”: [
“string”
]
}
}
If I were to add an item following the format above for a Things’ item, how do I build the item, what does the “function” mean in that body and how do I include channels?