Share via


ReviewsExtensions.CreateJobAsync Method

Definition

A job Id will be returned for the content posted on this endpoint.

Once the content is evaluated against the Workflow provided the review will be created or ignored based on the workflow expression.

<h3>CallBack Schemas </h3>

<p> <h4>Job Completion CallBack Sample</h4><br/>

{<br/> "JobId": "<Job Id>,<br/> "ReviewId": "<Review Id, if the Job resulted in a Review to be created>",<br/> "WorkFlowId": "default",<br/> "Status": "<This will be one of Complete, InProgress, Error>",<br/> "ContentType": "Image",<br/> "ContentId": "<This is the ContentId that was specified on input>",<br/> "CallBackType": "Job",<br/> "Metadata": {<br/> "adultscore": "0.xxx",<br/> "a": "False",<br/> "racyscore": "0.xxx",<br/> "r": "True"<br/> }<br/> }<br/>

</p> <p> <h4>Review Completion CallBack Sample</h4><br/>

{ "ReviewId": "<Review Id>",<br/> "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> "ModifiedBy": "<Name of the Reviewer>",<br/> "CallBackType": "Review",<br/> "ContentId": "<The ContentId that was specified input>",<br/> "Metadata": {<br/> "adultscore": "0.xxx", "a": "False",<br/> "racyscore": "0.xxx",<br/> "r": "True"<br/> },<br/> "ReviewerResultTags": {<br/> "a": "False",<br/> "r": "True"<br/> }<br/> }<br/>

</p>.

public static System.Threading.Tasks.Task<Microsoft.Azure.CognitiveServices.ContentModerator.Models.JobId> CreateJobAsync (this Microsoft.Azure.CognitiveServices.ContentModerator.IReviews operations, string teamName, string contentType, string contentId, string workflowName, string jobContentType, Microsoft.Azure.CognitiveServices.ContentModerator.Models.Content content, string callBackEndpoint = default, System.Threading.CancellationToken cancellationToken = default);
static member CreateJobAsync : Microsoft.Azure.CognitiveServices.ContentModerator.IReviews * string * string * string * string * string * Microsoft.Azure.CognitiveServices.ContentModerator.Models.Content * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.CognitiveServices.ContentModerator.Models.JobId>
<Extension()>
Public Function CreateJobAsync (operations As IReviews, teamName As String, contentType As String, contentId As String, workflowName As String, jobContentType As String, content As Content, Optional callBackEndpoint As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of JobId)

Parameters

operations
IReviews

The operations group for this extension method.

teamName
String

Your team name.

contentType
String

Image, Text or Video. Possible values include: 'Image', 'Text', 'Video'

contentId
String

Id/Name to identify the content submitted.

workflowName
String

Workflow Name that you want to invoke.

jobContentType
String

The content type. Possible values include: 'application/json', 'image/jpeg'

content
Content

Content to evaluate.

callBackEndpoint
String

Callback endpoint for posting the create job result.

cancellationToken
CancellationToken

The cancellation token.

Returns

Applies to