Perform Sentiment Analysis

Submit a JSON array containing text for analysis.

JSON input

[{"text":""},{"text":""}]

User request completion callback

When submitting a request, an optional HTTP callback can be specified which will be invoked when the request completes or fails. The callback is an HTTP POST to the exact URL provided. Only one attempt is made to reach the URL provided. The contents of the HTTP request match the response from the [Querying sentiment analysis request status and retrieving results](ref: query-request-status-and-retrieve-results-2) method.

Headers

  • x-requestid - Contains the request_id received when the request was submitted
  • x-status - One of the following indicating the status of the request:
StatusDescription
“Completed”The request has finished processing and the user callback, if provided has been called.
"Failed"An error occurred processing the request.
  • x-error - If the request failed, this would contain an error message.
  • x-userdata - This will contain the user data supplied with the original request.

Body

If the status is “Completed” the body of the request contains a JSON document with a sentiment value assigned to each text object (see the [Querying sentiment analysis request status and retrieving results](ref: query-request-status-and-retrieve-results-2) method for details). If the status is “Failed” the body of the request contains the same error message provided in the “x-error” header.

Details

Language
Authorization
Header
Click Try It! to start a request and see the response here!