Hi,
I need to programatically add graph items to an existing graph.
If I understand the documentation right, I need to call the graph.update method, with an array of gitems, each of which has to have one of the following parameters:
gitemid, for the existing gitems which I don't want to modify
itemid, for the new ones I want to create
The calls I'm using look like the following one:
{"jsonrpc":"2.0","id":2,"auth":"xxxx","method":"gr aph.update","params":{"graphid": "990","gitems":[{"graphid": "990","gitemid": "3075"},{"graphid": "990","itemid": "4281"}]}}
Which gives me this answer:
{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params.","data":"No permissions to referred object or it does not exist!"},"id":2}
Adding new items by not setting gitemid, and setting itemid works fine. However, old items get deleted.
What am I doing wrong? Is this the correct way to add new items to a graph?
Thanks!
Jordi
I need to programatically add graph items to an existing graph.
If I understand the documentation right, I need to call the graph.update method, with an array of gitems, each of which has to have one of the following parameters:
gitemid, for the existing gitems which I don't want to modify
itemid, for the new ones I want to create
The calls I'm using look like the following one:
{"jsonrpc":"2.0","id":2,"auth":"xxxx","method":"gr aph.update","params":{"graphid": "990","gitems":[{"graphid": "990","gitemid": "3075"},{"graphid": "990","itemid": "4281"}]}}
Which gives me this answer:
{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params.","data":"No permissions to referred object or it does not exist!"},"id":2}
Adding new items by not setting gitemid, and setting itemid works fine. However, old items get deleted.
What am I doing wrong? Is this the correct way to add new items to a graph?
Thanks!
Jordi
Comment