Unable to POST data from ServiceNow to Aruba in JSON

Ksnow
Tera Contributor

Hello,

@Amit Gujarathi @Ankur Bawiskar 

 

We have an integration with Aruba with ServiceNow, when we are trying to POST the data from ServiceNow to Aruba Name posted properly but Email address and phone number not getting posted it's showing empty.

We are passing in JSON format as attached.

var userdata = {

             "name": current.u_name,

             "id": {},

             "company_name" : current..u_company,

             "user": {

              "phone":current.u_phone_number,

              "email":current.u_email

            }

Could you please let me know what am I missing here?

Thanks for your help!

5 REPLIES 5

Anil Lande
Kilo Patron

Hi,

Please try below:

var userdata = {
             "name": current.u_name.toString(),
             "id": {},
             "company_name" : current..u_company.toString(),
             "user": {
              "phone":current.u_phone_number.toString(),
              "email":current.u_email.toString()
            }
}

 

I hope you are using correct field names from your table.

Are you referring custom table data?

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Ksnow
Tera Contributor

Thanks for your response @Anil Lande 

Yes, we are using correct fields (all are type: String) and custom table data.

We are getting the error while passing as below:

{"description":"Invalid parameters : name , company_name , email , phone","error_code":400,"service":"Guest"}

Please help!

Can you please check with Aruba API team and ask them to share expected request body schema? or any API documentation.

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Ksnow
Tera Contributor

Hi @Anil Lande 

Checked with them and it's working fine now.