Post

2 followers Follow
0
Avatar

What is the right way to perform insert multiple rows?

What is the right way to perform insert multiple rows for one entity type using API call? For example, I want create/update a few Timesheets in one API call, is it possible?

Bvy Vetal Answered

Please sign in to leave a comment.

3 comments

0
Avatar

Hello Bvy,

It's possible using Bulk Execute: POST https://api.clarizen.com/V2.0/services/bulk/Execute

Example in Postman:

JSON:

{
 "requests": [
  {
   "url":"data/createAndRetrieve",
   "method": "POST",
   "body": {
    "entity": {
     "Id": "/Project",
     "Name": "Test Bulk API 1"
    }
   }
  },
  {
   "url":"data/createAndRetrieve",
   "method": "POST",
   "body": {
    "entity": {
     "Id": "/Project",
     "Name": "Test Bulk API 2"
    }
   }
  }
 ]
}

The above creates two projects in one call.

I hope this helps.

Best regards,

Roland

Roland Pumputis 0 votes
Comment actions Permalink
0
Avatar

Hi!
Thank you, Roland, for the answer.

Is that request need many resources? For example, I want to create 10-1000 entities in one time. Is that possible to run all of that?

Bvy Vetal 0 votes
Comment actions Permalink
0
Avatar

Hi Bvy,

I'm not sure if there's a hard limit, but eventually you'll hit a timeout. I believe I have successfully tested bundling a couple of thousand of simple requests.

Best regards,

Roland

Roland Pumputis 0 votes
Comment actions Permalink