You are here

Common Response Info


Overview

All responses sent from the API, for successful API calls, include a header containing information about the request that caused the response to be produced. This about section will be the first area included within the response and will contain information describing what was processed and when, and any metadata or external id the call requested to be returned. Following is a summary of the fields contained within the about section:

Field Description
externalId A caller-defined value that is echoed back in the response.
requestId TextWise-generated request ID unique for each request.
docId For the RDF format this is a unique identifier for each request; for all other formats it is an internally generated document ID that is a hash of either the input URI or the input text.
systemType Identifier of the service call that was executed ("match", "category", etc).
configId The identifier of the system configuration used when executing the request. The value will be the same as the default configuration ID.
externalMetadata A caller-defined value echoed back in the response.
requestDate An ISO_8601 formatted date that represents when the request was submitted.
systemVersion Identifies the version of the system that serviced the request.
contentDigest A digest of the provided text or content that was fetched from a provided URI.
contentType The MIME type of the provided or fetched content.
sourceUri The URI specified in the request.

 

XML Response Example

<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://www.semantichacker.com/api">
        <about>
                <requestId>FB0A0B4DAAF7A64B0D7EFE28736376BB</requestId>

                <docId>C0B1E02C7E06323EA312CC7288F865BE</docId>
                <systemType>category</systemType>
                <configId>odp_2010_categorization</configId>
                <contentType>text/html</contentType>

                <contentDigest>01D5A1DD26A2E013CDD9C3BEF0A89F86</contentDigest>
                <requestDate>2011-08-30T19:55:35+00:00</requestDate>
                <systemVersion>2.1</systemVersion>
                <sourceUri>http://www.kernel.org</sourceUri>

        </about>
        <categorizer>
                <categorizerResponse>
                        <categories>
                                <category id="293" weight="0.99999994" label="Computers/Software/Operating_Systems" />
                        </categories>

                </categorizerResponse>
        </categorizer>
</response>

JSON Response Example

{
    "about":     {
        "requestId": "D4BF2147257E088D62AC1D8901582DE9",
        "docId": "C0B1E02C7E06323EA312CC7288F865BE",
        "systemType": "category",
        "configId": "odp_2010_categorization",
        "contentType": "text/html",
        "contentDigest": "01D5A1DD26A2E013CDD9C3BEF0A89F86",
        "requestDate": "2011-08-30T19:56:47+00:00",
        "systemVersion": "2.1",
        "sourceUri": "http://www.kernel.org"
    },
    "categorizer": {"categorizerResponse": {"categories": [    {
        "id": "293",
        "weight": "0.99999994",
        "label": "Software/Operating_Systems"
    }]}}
}