cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1012
Views
0
Helpful
1
Replies

CCE Admin Agent API Error (415) Unsupported Media Type on 3rd Party App

YSear
Level 1
Level 1

Hi All,

We're having PCCE 12.0.

Am getting error response for POST request to create an agent, error code 415 Unsupported Media Type, although have already set request.MediaType = "application/xml".

I've tried the create POST API using SOAPUI and it was successful with 201 Created code.

However, with setting below, I'm getting the 415 error:

request.Method = "POST"

request.ContentType = "application/x-www-form-urlencoded"

request.MediaType = "application/xml"

request.Accept = "text/htpm,application.xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"

 

Any one is able to advise?

Thank You.

1 Reply 1

dekwan
Cisco Employee
Cisco Employee

Hi,

 

It is the request.ContentType that you want to set as application/xml.

 

Have you tried to use this API manually? Like using Postman? I suggest that you try it manually first to make sure the request details are correct.

 

Thanx,

Denise