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
Bhagyashree JogBhagyashree Jog 

API to fetcj input output schema for Composite API

I am using Salesforce Composite Sobject Tree API. I want to know if there is any API which I can use to obtain the Sobject tree response schema specified here : https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/responses_composite_sobject_tree.htm
I need the response schema in json or xml format. Something like this
 
<complexType name="SObjectTreeResponse">
        <sequence>
            <element name="hasErrors" type="boolean" minOccurs="1"/>
            <element name="results" type="cns:results" nillable="true" minOccurs="1" maxOccurs="unbounded"/>
        </sequence>
</complexType>

 
Raj VakatiRaj Vakati
I dnt think so you can able to get the response in the format you are looking .. but you can able to get the json or XML in below format and that how salesforce is returning .. 

If you want in the same format you need to use the custom apex rest class 
 
<?xml version="1.0" encoding="UTF-8"?>
<SObjectTreeResponse>
    <hasErrors>false</hasErrors>
    <results>
        <id>001D000000K0fXOIAZ</id>
        <referenceId>ref1</referenceId>
    </results>
    <results>
        <id>001D000000K0fXPIAZ</id>
        <referenceId>ref4</referenceId>
    </results>
    <results>
        <id>003D000000QV9n2IAD</id>
        <referenceId>ref2</referenceId>
    </results>
    <results>
        <id>003D000000QV9n3IAD</id>
        <referenceId>ref3</referenceId>
    </results>
</SObjectTreeResponse>
 
{
    "hasErrors" : false,
    "results" : [{
     "referenceId" : "ref1",
     "id" : "001D000000K0fXOIAZ"
     },{
     "referenceId" : "ref4",
     "id" : "001D000000K0fXPIAZ"
     },{
     "referenceId" : "ref2",
     "id" : "003D000000QV9n2IAD"
     },{
     "referenceId" : "ref3",
     "id" : "003D000000QV9n3IAD"
     }]
}