Skip to content

Requests

If you base your application on the Python or the Java SDKs available on GitHub, you don't need to know about low-level HTTP requests since the SDKs automatically take care of building the proper requests to the Studio LDA API, The information in this section of this manual is therefore useful if you need to write an application with a language different from Python and Java.

All Studio LDA API requests must:

  • Use the POST method.
  • Contain an UTF-8 encoded JSON object as their payload.
  • Have this header:

    application/json; charset=utf-8
    
  • Be sent to one of the API endpoints.

If analysis is required, whether document analysis, document classification or information extraction, the JSON object must contain the text to parse.
In all cases the object contains parameters that specify the request.

For example, the JSON object to send in order to request document classification is like this:

{
    "document": {
        "text": "Your text here."
    },
    "options": {
        "analysis": [
            "categories"
        ],
        "features": [
            "knowledge",
            "dependency",
            "syncpos"
        ]
    }
}