Share via


Reviews.CreateJobWithHttpMessagesAsync 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 System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.ContentModerator.Models.JobId>> CreateJobWithHttpMessagesAsync (string teamName, string contentType, string contentId, string workflowName, string jobContentType, Microsoft.Azure.CognitiveServices.ContentModerator.Models.Content content, string callBackEndpoint = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateJobWithHttpMessagesAsync : string * string * string * string * string * Microsoft.Azure.CognitiveServices.ContentModerator.Models.Content * string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.ContentModerator.Models.JobId>>
override this.CreateJobWithHttpMessagesAsync : string * string * string * string * string * Microsoft.Azure.CognitiveServices.ContentModerator.Models.Content * string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.ContentModerator.Models.JobId>>
Public Function CreateJobWithHttpMessagesAsync (teamName As String, contentType As String, contentId As String, workflowName As String, jobContentType As String, content As Content, Optional callBackEndpoint As String = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of JobId))

Parameters

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.

customHeaders
Dictionary<String,List<String>>

Headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Implements

Exceptions

Thrown when the operation returned an invalid status code

Thrown when unable to deserialize the response

Thrown when a required parameter is null

Thrown when a required parameter is null

Applies to