Jobs

Submit Sentiment Analysis Job

Starts an asynchronous job to analyze sentiments in a transcript. The transcript can be supplied through text as plain text or json as a rev.com transcript format

SecurityAccessToken
Request
Request Body schema: application/json

Sentiment Analysis Job Options

metadata
string or null (MetadataField) <= 512 characters

Optional metadata that was provided during job submission.

callback_url
string or null (CallbackUrlField) <= 1024 characters
Deprecated

Callback url provided by the user.

object or null

Replacement for callback_url that allows for optional authentication headers

delete_after_seconds
integer or null (DeleteAfterSecondsField) [ 0 .. 2592000 ]

Amount of time after job completion when job is auto-deleted. Present only when preference set in job request.

language
string or null (TextAnalysisLanguageField)
Default: "en"

The user input language of the transcript.

Value: "en"
text
string or null

Plain text to be analyzed in this job submission. No timestamps will be included in the response if input is provided this way.

object or null

Rev AI Transcript Model

Responses
200

Sentiment Analysis Job Details

400

Bad Request

401

Request Unauthorized

413

Payload Too Large

post/sentiment_analysis/v1/jobs
Request samples
application/json
{
  • "language": "en",
  • "metadata": "sample user provided metadata",
  • "notification_config": {},
  • "delete_after_seconds": 1000000,
  • "json": {
    }
}
Response samples
application/json
{
  • "id": "Umx5c6F7pH7r",
  • "status": "in_progress",
  • "language": "en",
  • "created_on": "2018-05-05T23:23:22.29Z",
  • "type": "sentiment_analysis"
}

Get List of Sentiment Analysis Jobs

Gets a list of sentiment analysis jobs submitted within the last 30 days in reverse chronological order up to the provided limit number of jobs per call. Note: Jobs older than 30 days will not be listed. Pagination is supported via passing the last job id from a previous call into starting_after.

SecurityAccessToken
Request
query Parameters
limit
integer or null [ 0 .. 1000 ]
Default: 100

Limits the number of jobs returned, default is 100, max is 1000

starting_after
string or null

If specified, returns jobs submitted before the job with this id, exclusive (job with this id is not included)

Responses
200

List of Rev AI Sentiment Analysis Jobs

400

Bad Request

401

Request Unauthorized

get/sentiment_analysis/v1/jobs
Request samples
curl -i -X GET \
  'https://api.rev.ai/sentiment_analysis/v1/jobs?limit=100&starting_after=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
application/json
[
  • {
    },
  • {
    }
]

Get Sentiment Analysis Job By Id

Returns information about a sentiment analysis job

SecurityAccessToken
Request
path Parameters
id
required
string

Rev AI API Job Id

Responses
200

Sentiment Analysis Job Details

401

Request Unauthorized

404

Job Not Found

get/sentiment_analysis/v1/jobs/{id}
Request samples
curl -i -X GET \
  'https://api.rev.ai/sentiment_analysis/v1/jobs/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "id": "Umx5c6F7pH7r",
  • "status": "in_progress",
  • "language": "en",
  • "created_on": "2018-05-05T23:23:22.29Z",
  • "type": "sentiment_analysis"
}

Delete Sentiment Analysis Job by Id

Deletes a sentiment analysis job. All data related to the job will be permanently deleted. A job can only be deleted once it's completed (either with success or failure).

SecurityAccessToken
Request
path Parameters
id
required
string

Rev AI API Job Id

Responses
204

Job was successfully deleted

401

Request Unauthorized

404

Job Not Found

409

Conflict

delete/sentiment_analysis/v1/jobs/{id}
Request samples
curl -i -X DELETE \
  'https://api.rev.ai/sentiment_analysis/v1/jobs/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
application/problem+json
{
  • "title": "Authorization has been denied for this request",
  • "status": 401
}

Get Sentiment Analysis Result By Id

Returns the results for a completed sentiment analysis job.

SecurityAccessToken
Request
path Parameters
id
required
string

Rev AI API Job Id

query Parameters
filter_for
string or null

Filter for sentiments. If specified only messages with the specified sentiment will be returned

Enum: "positive" "negative" "neutral"
Responses
200

Rev AI API Sentiment Analysis Result

401

Request Unauthorized

404

Job Not Found

409

Conflict

get/sentiment_analysis/v1/jobs/{id}/result
Request samples
curl -i -X GET \
  'https://api.rev.ai/sentiment_analysis/v1/jobs/{id}/result?filter_for=positive' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
application/vnd.rev.sentiment.v1.0+json
{
  • "messages": [
    ]
}