API Partial Load - error 500

When using the python API for partial loads the documentation tells you to pass the table id’s in the body of the request. Does anybody have the exact syntax? I’ve tried:

test = requests.post(url, headers={‘authorization’: “Bearer {}”.format(api_key), ‘table_id’:"[{}]".format(tableid) })

test = requests.post(url, headers={‘authorization’: “Bearer {}”.format(api_key)}, json = {‘table_id’:"[{}]".format(tableid)})

test = requests.post(url, headers={‘authorization’: “Bearer {}”.format(api_key), ‘body’:"[{}]".format(tableid) })

But I always get a 500 error.

Regards,
João

Hi Joao,

The following format will work:

#configurations
realm = "eu-1" #replace it with your realm
pool_id = pool.id
data_model_id = pool.datamodels[0].id
table_id = ['550fce4-def3-422b-72c-399674c0e6'] #replace this with your table id
api_key = c._api_token
url = "https://{}.{}.celonis.cloud/integration/api/v1/data-pools/{}/data-models/{}/load/partial-sync".format(tenant, realm, pool_id, data_model_id)

#request
test = requests.post(url,
 headers={"authorization": "Bearer {}".format(api_key)}, 
 json = table_id)

Regards,
Noor