function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Schema definitions

Are there XML Schema files available which define the request parameters/bodies and the response bodies for the Chatter API?


Since the Chatter REST API uses JSON I would imagine the answer is no. What specifically are you looking for?


The Chatter API supports both JSON and XML payloads, so asking for the XML Schema files which define the XML payloads seems to me to be a very legitimate request.

Ryan is simply saying that there is no WSDL. To further complicate issues, Chatter response payloads can be filtered exclusively or inclusively, so any such XSD or DTD file would contain virtually all optional elements.

I'm not aware of any XSD or DTD file that exists for Chatter payloads, although I'm not sure why there shouldn't be, exactly, as even someone with as little time as I have could write up such a file in short order.

I am ok with there being no WSDL (this is a REST interface, after all), but there is still an XML payload, and XML payloads are defined by XML schemas (which are a little more precise and handy during development than English prose).


As you said, it seems silly that everybody has to reinvent the wheel every time they use this API, when Salesforce could have defined all these schemas once and for all.

Ryan UptonRyan Upton

True enough. I'm curios why you dont' like the JSON approach though. What is XML and possibly using XSD buying you over JSON in this case? You know requests and response formats are guaranteed. They're documented.  You can see all the XML generated through API calls, and it will always be consistent, why not create your own schema from them?


i need to invoke the Chatter API from a BPEL process running in a BPM engine. The BPM environment I am working with does not know about JSON, only XML. It knows how to generate and receive REST, but the payload has to be XML.


I checked with the developers and we don't have an XML schema file. Apologies. 


Thank you for letting me know.