I need to call http rest end point fist and then using the API response dynamically create elements.
Below is my sample API.
https://test.api.com/tst/product/?tag=testnt
and sample response is
{
“count”: 2,
“results”: [
{
“id”: <int>,
“display”: “Product A -10-1”,
“name”: “Product A”,
“serial”: “TESTA10”,
},
{
“id”: <int>,
“display”: “Product B -10-1”,
“name”: “Product B”,
“serial”: “TESTB10”
}
]
}
using API response name values example – {PRODUCT A, PRODUCT B} need to create elements using automation. Because my response may vary will get more names so i need to create elements with the name dynamically.
Hi Niranjan
You can create element using the class library: Class library introduction | DataMiner Docs
There are some examples in documentation how you can do that: Element creation | DataMiner Docs
Since you want to use automation, you can do something like
IDms thisDms = engine.GetDms();
var agent = thisDms.GetAgent(agentId);
DmsElementId id = agent.CreateElement(yourConfig);