cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
441
Views
1
Helpful
3
Replies

CVP Rest_client form-data

david_legrand
Enthusiast
Enthusiast

Dear community users,

My environment :

  • Cisco CVP 12.5
  • Cisco Webex

My use case :

  • From a CVP VXML app, I record a message from the caller into a wav file saved locally on the CVP server.
  • I would like to upload this wav file into a Webex Room.

My issue :

From Postman, I can easily upload a local file into a Webex Room.

But when using the curl command from the CVP Rest_Client node,

{"message":"The request could not be understood by the server due to malformed syntax.""errors":[{"description":"The request could not be understood by the server due to malformed syntax."}]
 
I get an error. I assume the body is not well formatted.
 
Here the CURL command I am using in Postman
 
curl --location 'https://webexapis.com/v1/messages' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
--form 'files=@"/C:/Temp/test.txt"' \
--form 'roomId="XXXXXXXXXXXXXXX"' \
--form 'markdown="test"'

I've never played with the FORM body format in CVP. The backslash and the @ are maybe not compatible with CVP. Do you know if it would work ?

Thanks in advance

David

1 Accepted Solution
3 Replies 3

bill.king1
VIP Advocate VIP Advocate
VIP Advocate

It may be the backslash, you may find this previous similar post helpful as a start.
https://community.cisco.com/t5/contact-center/cvp-call-studio-rest-client-post-body-syntax/td-p/4168824

Hello Paul,

Thanks for this, this is exactly what I need !!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers