Rest API Explorer - Insert multiple records

Andr_1
Tera Contributor

Hello.

I am testing the insert multiple records on the Rest API Explorer module.

Andr_1_0-1712915946994.png

 

with this body

{
"records":[
{"u_code":"1","u_external_id":"1","u_opco_name":"test"},
{"u_code":"2","u_external_id":"2","u_opco_name":"test2"},
{"u_code":"3","u_external_id":"3","u_opco_name":"test3"},
{"u_code":"4","u_external_id":"4","u_opco_name":"test4"},
{"u_code":"5","u_external_id":"5","u_opco_name":"test5"},
{"u_code":"6","u_external_id":"6","u_opco_name":"test6"},
{"u_code":"7","u_external_id":"7","u_opco_name":"test7"}
]
}

 

And it is working well:

Andr_1_1-1712916032625.png

 

But when I try the same thing on postman... it inserts empty fields on my staging table

Andr_1_2-1712916160375.png

 

Andr_1_3-1712916186377.png

 

 

Can someone help me please?

 

Thank you

André Ramos

4 REPLIES 4

Community Alums
Not applicable

Hi @Andr_1 ,

I tried your problem on postman as you mentioned, it works for me, may be you can check Business rules may be there is setAbortAction is present in your instance at the time of insertion. SO what's why it is not inserting the records.

 

Please mark correct and helpful if my answer works for you 

 

Thanks and Regards 

Sarthak

ash1xh
Tera Contributor

By default, the keys are set to use column labels rather than column names. To resolve this, try switching to column labels and test again.


The request body format should match the staging table's columns. Use the records array with key-value pairs that align with the staging table's column labels to ensure proper insertion into the import fields.

If you need to modify the mapping settings, you can add an entry in the REST Insert Multiple (sys_rest_insert_multiple) table and change the Column mapping from Label to Column Name.

 

AshkarPR
Tera Contributor

Hi @ash1xh , I did as your replay. Its worked. Thanks a lot 

Did not expect this.  Thanks, this resolved my issue as well.