Post

2 followers Follow
0
Avatar

Upsert - bulk operations

Hello,

Is it possible to submit multiple upsert requests in a single API call (similar to /V2.0/services/bulk/execute)?

John Armao Answered

Official comment

Avatar

Hi John,

It's possible to do by using bulk/execute. Example:

{
  "requests": [
    {
      "url": "/data/upsert",
      "method": "post",
      "body": {
        "insertEntity": {
            "Id": "/Task/123456",
            "Parent": "/Task/42",
            "Name": "A new Task",
            "StartDate": "2020-12-01",
            "Duration": {
                "value": 3,
                "unit": "Days"
            }
        }, 
        "updateEntity": {
            "Id": "/Task/123456",        
            "Name": "An updated Task"        
        }    
      }
    },
    etc.,
    etc.,
    etc.
  ]
}

Replace etc. with more API calls.

I hope this helps.

Roland

Roland Pumputis
Comment actions Permalink

Please sign in to leave a comment.

1 comment