i-doit API Connection

One Star

i-doit API Connection

Hello there,

i have a newbie question and i just don't see how to do it.

 

I need to import a csv into i-doit CDMB and want to use the REST API.
So i tried to use tRestClient to connect with the API and upload my csv line by line but i don't get the necessary json right:

 

Example JSON for Body

 

{
    "jsonrpc": "2.0",
    "method": "cmdb.object.create",
    "params": {
        "type": "C__OBJTYPE__SERVER",
        "title": "My little server",
        "apikey": "c1ia5q"
    },
    "id": 1
}

What i need is a way to send this per tRestClient and use a colume from my csv for TITLE (and some other fields).

 

I tried it with tRest where you can set this as body with no problems, but, call me stupid, i don't get around how to get this done with a variable from my csv.

 

I would be delighted it someone can help me with some ideas

 

Kind regards,

Rene

Employee

Re: i-doit API Connection

Hi 

You will build the JSON using tXMLMap and other components.  Read this https://stackoverflow.com/questions/30803355/send-json-request-using-trestclient-with-nested-object-...

 

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch