JSON Examples for Configuration API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2021 06:50 AM - edited 06-11-2021 06:51 AM
The documentation around using JSON payloads for most of the Configuration API is almost non existent, and to add to that mess, the documentation feedback email mentioned in all the guides is invalid (go figure!)
So, has anyone ever had any luck POSTing JSON to the following endpoint?
https://uccx-server/adminapi/csq/{id}/resources
Here's some sample JSON
{ "resources": { "resource": { "id": "myUserId" } } }
Which I believe corresponds to the example XML given on Devnet
<resources> <resource id="myUserId"> </resource> </resources>
But I just get the following error back:
<errorMessage>cvc-complex-type.2.4.b: The content of element 'resources' is not complete. One of '{resource}' is expected.</errorMessage>
Any help greatly appreciated!
- Labels:
-
Express Configuration API

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2021 09:52 AM
Hi,
Thank you for letting us know that the email alias for the documentation feedback is not working. I will let the doc team know about this. Can you send me a private message with your doc feedback. I will pass that on to the doc team as well.
I don't know the answer to your question, but when I get a chance sometime next week, I will try to look into it. In the meantime, I would suggest looking at the CCX logs (I think it is in the MADM logs) to see if there is additional information on what is wrong. Also, did you confirm that with that XML, that the API is working correctly?
Thanx,
Denise
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2021 10:09 AM
Thanks for the quick reply Denise, Will get a PM over to you shortly with that feedback!
API was responding OK to an XML request so I'm pretty sure this is just a schema / formatting thing, which is why it would be super useful for the docs to include examples for both formats if the schema isn't as straightforward as one would expect
Cheers
Ryan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2021 02:40 AM
Hey ryan.
I have had the same problem when posting JSON, so i have actually made a middelware component on a IIS server with Json.NET - Newtonsoft, that transform my JSON to XML and then post it. (Not the nicest way - but it works)
Thanks, Thomas G. J.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2021 12:43 AM
Thanks Thomas, I'll definitely check this out! I managed to make a little bit of progress, you can submit a single resource like this:
{"resource":{"@id":"$agent_id"}}
But couldn't find any way to submit more than one in the same request, as is suggested in the XML schema.
Cheers
Ryan
