Pass array value in an API

Hello Everyone,
Hope you all are doing great,
I was doing a task with salesforce in which I have to pass the data in the array format but was unable to do it.
so, anyone who uses this practice please help me out when I try to pass an array value in API it shows me an exception error I attached the error with this and the array that I need to pass with API
{
“message”: “[{"message":"Illegal value for primitive at [line:4, column:16]","errorCode":"JSON_PARSER_ERROR"}]”,

the value that need to pass as an array
{“a0Dp0000007fJTPEA2”,“a0Dp0000007aAB7EAM”,“a0Dp0000007ftCSEAY”,“a0Dp0000007ftCNEAY”,“a0Dp0000007ftCIEAY”,“a0Dp0000007fsuKEAQ”,“a0Dp0000007bP5LEAU”,“a0Dp0000007fNeHEAU”,“a0Dp0000007ftVQEAY”,“a0Dp0000007fteeEAA”,“a0Dp0000007ftfAEAQ”,“a0Dp0000007ftVLEAY”,“a0Dp0000007ftG5EAI”,“a0Dp0000007dFtgEAE”,“a0Dp0000007fNVHEA2”,“a0Dp0000007fNemEAE”,“a0Dp0000007fMMkEAM”,“a0Dp0000007fMMfEAM”,“a0Dp0000007fMMaEAM”,“a0Dp0000007fMMGEA2”,“a0Dp0000007fMM4EAM”,“a0Dp0000007fMM0EAM”,“a0Dp0000007fMLzEAM”,“a0Dp0000007fMLkEAM”,“a0Dp0000007fMLXEA2”,“a0Dp0000007fMLWEA2”,“a0Dp0000007fMLVEA2”,“a0Dp0000007fMLMEA2”,“a0Dp0000007fMLXEA2”,“a0Dp0000007fMLWEA2”,“a0Dp0000007fMLVEA2”,“a0Dp0000007fMLMEA2”,“a0Dp0000007fMLLEA2”,“a0Dp0000007fMLGEA2”,“a0Dp0000007fMLBEA2”,“a0Dp0000007fMKhEAM”,“a0Dp0000007fMKcEAM”,“a0Dp0000007fMKTEA2”,“a0Dp0000007fMKSEA2”,“a0Dp0000007fMIjEAM”,“a0Dp0000007fMIeEAM”,“a0Dp0000007fLbDEAU”,“a0Dp0000007fLABEA2”,“a0Dp0000007fKEBEA2”,“a0Dp0000007fKDwEAM”,“a0Dp0000007fKBpEAM”,“a0Dp0000007fKB8EAM”}

JSON arrays are enclosed in square brackets([…])
Replace curly braces in your array value with square braces.

E.g.:
[“a0Dp0000007fJTPEA2”,“a0Dp0000007aAB7EAM”,“a0Dp0000007ftCSEAY”,“a0Dp0000007ftCNEAY”,“a0Dp0000007ftCIEAY”,“a0Dp0000007fsuKEAQ”,“a0Dp0000007bP5LEAU”,“a0Dp0000007fNeHEAU”,“a0Dp0000007ftVQEAY”,“a0Dp0000007fteeEAA”,“a0Dp0000007ftfAEAQ”,“a0Dp0000007ftVLEAY”,“a0Dp0000007ftG5EAI”,“a0Dp0000007dFtgEAE”,“a0Dp0000007fNVHEA2”,“a0Dp0000007fNemEAE”,“a0Dp0000007fMMkEAM”,“a0Dp0000007fMMfEAM”,“a0Dp0000007fMMaEAM”,“a0Dp0000007fMMGEA2”,“a0Dp0000007fMM4EAM”,“a0Dp0000007fMM0EAM”,“a0Dp0000007fMLzEAM”,“a0Dp0000007fMLkEAM”,“a0Dp0000007fMLXEA2”,“a0Dp0000007fMLWEA2”,“a0Dp0000007fMLVEA2”,“a0Dp0000007fMLMEA2”,“a0Dp0000007fMLXEA2”,“a0Dp0000007fMLWEA2”,“a0Dp0000007fMLVEA2”,“a0Dp0000007fMLMEA2”,“a0Dp0000007fMLLEA2”,“a0Dp0000007fMLGEA2”,“a0Dp0000007fMLBEA2”,“a0Dp0000007fMKhEAM”,“a0Dp0000007fMKcEAM”,“a0Dp0000007fMKTEA2”,“a0Dp0000007fMKSEA2”,“a0Dp0000007fMIjEAM”,“a0Dp0000007fMIeEAM”,“a0Dp0000007fLbDEAU”,“a0Dp0000007fLABEA2”,“a0Dp0000007fKEBEA2”,“a0Dp0000007fKDwEAM”,“a0Dp0000007fKBpEAM”,“a0Dp0000007fKB8EAM”]

Also ensure they are not enclosed in double quotes.
E.g.:

{
"name":"John",
"age":30,
"cars":["Ford", "BMW", "Fiat"]
}

Thanks grkiran2 for your reply but I already try this and able to pass only 25 values at a time by that.

Is that a text size limitation or API spec limitation?

Is there any direct wave do this ?

Hi @rahul.kumar

Were you able to resolve this issue?

APIs are usually designed to be used a specific way. Typically the way to use it and any limitations or restrictions are documented in API Reference documentation.
You could also try UiPath.Salesforce.Activities library.

It would also be helpful if you mentioned which endpoint you are using and weather you are using UiPath’s Salesforce library.

API size limitation.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.