API Responses

The response from an API call is always text / XML. Depending on the call, the response may have only the status and security context, or it may include data. The root element for the response XML is wbxapi. For example:

<wbxapi>
    <securityContext>
        <cred>f383bb3bb65836202f0fff707b3d4ccc</cred>
    </securityContext>
    <response>
        <result>
            - status information -
        </result>
    </response>
    <return>
        ¿ more information based on the request ¿
    </return>
</wbxapi>

Security Context Stanza:

The securityContext encapsulates the Client's security credential (acquired at login) and uniquely identifies the API session. This credential expires at logout or after two hours of inactivity in order to prevent replay attacks and must be used in the subsequent API call. An example of a securityContext stanza is:

<securityContext>
    <cred>f383bb3bb65836202f0fff707b3d4ccc</cred>
</securityContext>

The cred element contains the unique credential for the current API session. Although this credential will be unchanged until its expiration or logout of the client, good practice is to use the response credential itself rather than a locally stored copy. This makes it possible to support multiple active credentials for a user with active workspaces associated with different organizations.

Status Stanza:

Status is returned in a response stanza, for example:

<response>
    <result>FAILURE</result>
    <reason>User session has expired</reason>
    <exceptionID>wbxc.expired_credential</exceptionID>
</response>

A successful call will contain only a SUCCESS result, unless the response is to a GET command. In the case of a GET command, the elements count and totalCount are included. Table 1-1 shows the elements used in the response stanza.

Response Elements

Element Description
Result
reason Mandatory. SUCCESS or FAILURE.
exceptionID Only present on FAILURE.
count Returned with the GET command. The number of results returned per the users specifications. I.E. a page size of 20 would return count = 20 if the page was full of found items.
totalCount Returned with the GET command. The total number of results satisfying the GET command. totalCount is returned only if it differs from count.

Results Stanza:

Many successful API responses return results other than just the status. In these cases the requested data is an immediate child of the return element.
In the following example, a site ID is returned in response to a request:

<wbxapi>
    <securityContext>
        <cred>f383bb3bb65836202f0fff707b3d4ccc</cred>
    </securityContext>
    <response>
        <result>SUCCESS</result>
    </response>
    <return>
        <site>
        <siteID>13342</siteID>
        </site>
    </return>
</wbxapi>

The following example shows multiple returned meeting domain names.

<wbxapi>
    <securityContext>
        <cred>f383bb3bb65836202f0fff707b3d4ccc</cred>
    </securityContext>
    <response>
        <result>SUCCESS</result>
        <count>3</count>
    </response>
    <return>
        <meetingDomain>
            <domainID>1234</domainID>
        </meetingDomain>
        <meetingDomain>
            <domainID>1235</domainID>
        </meetingDomain>
        <meetingDomain>
            <domainID>1236</domainID>
        </meetingDomain>
    </return>
</wbxapi>