Connectors Reference

Content Moderator

Content Moderator is a Microsoft Cognitive Services product which provides machine-assisted moderation of text and images for potentially offensive or unwanted content, augmented with built-in human review tools

 

Status: Preview

Tier: Standard

Version: 1.0.0

 

Actions:

Name

Summary

GetAllImageList ()

Get all the image lists

GetImageSchema (string format)

Get Request Body Parameters

EvaluateImage (string format, EvaluateImageParameterImage Image)

Check if an image contains racy or adult content

CreateJob (string teamName, string ContentType, string ContentId, string WorkflowName, [Optional]string CallBackEndpoint, CreateJobParameterContent Content)

Execute desired workflow in your team to evaluate image or text content

OCR (string language, string format, OCRParameterImage Image)

Return any text found in an image for the specified language

ScreenText ([Optional]string language, [Optional]boolean autocorrect, [Optional]boolean PII, [Optional]string listId, [Optional]boolean classify, string Content-Type, string Text Content)

Detect profanity and match against custom and shared blacklists

FindFaces (string format, FindFacesParameterImage Image)

Find faces in an image content

DetectLanguage (string Content-Type, string Text Content)

Detect Language of a given text input content

MatchImage ([Optional]string listId, string format, MatchImageParameterImage Image)

Match an image against one of your custom image lists

CreateReviews (string teamName, [Optional]string subTeam, array body)

Create Reviews for Reviewers in your moderation team

GetWorkflows (string teamName)

Get Workflows

 

Triggers:

Name

Summary

 

Objects:

Name

Summary

CreateJobParameterContent

 

CreateJobResponse

 

CreateReviewsParameterBodyItem

 

DetectLanguageResponse

 

EvaluateImageParameterImage

 

EvaluateImageResponse

 

FindFacesParameterImage

 

FindFacesResponse

 

GetAllImageListResponseItem

 

GetImageSchemaResponse

 

GetWorkflowsResponseItem

 

MatchImageParameterImage

 

MatchImageResponse

 

OCRParameterImage

 

OCRResponse

 

ScreenTextResponse

 

 

Actions:

GetAllImageList

Summary: Get all the image lists

Description: Return all the image lists.

 

Syntax:

ContentModerator.GetAllImageList ()

 

Returns:

          Type:array of (GetAllImageListResponseItem)

 

GetImageSchema

Summary: Get Request Body Parameters

Description: Return the schema for the request body format desired.

 

Syntax:

ContentModerator.GetImageSchema (string format)

 

Parameters:

Name

Type

Summary

Required

Related Action

format

string

(Image Source)Values: [Image Content, Image URL]

Source of the image - either included or by reference url.

True

 

Returns:

          Type:GetImageSchemaResponse

 

EvaluateImage

Summary: Check if an image contains racy or adult content

Description: Returns probabilities of an image containing racy or adult content.

 

Syntax:

ContentModerator.EvaluateImage (string format, EvaluateImageParameterImage Image)

 

Parameters:

Name

Type

Summary

Required

Related Action

format

string

(Image Source)Values: [Image Content, Image URL]

Source of the image - either included or by reference url.

True

Image

EvaluateImageParameterImage

 

 

True

 

Returns:

          Type:EvaluateImageResponse

 

CreateJob

Summary: Execute desired workflow in your team to evaluate image or text content

Description: A job Id will be returned for the Image or Text content posted on this endpoint.   Once the content is evaluated against the Workflow provided, a review will be created or ignored based on the workflow expression.

 

Syntax:

ContentModerator.CreateJob (string teamName, string ContentType, string ContentId, string WorkflowName, [Optional]string CallBackEndpoint, CreateJobParameterContent Content)

 

Parameters:

Name

Type

Summary

Required

Related Action

teamName

string

(Team Name)

Your Team Name.

True

ContentType

string

(Content Type)Values: [Image, Text]

Type of the content.

True

ContentId

string

(Content Id)

Content Identifier.

True

WorkflowName

string

(Select Workflow)

Select the workflow that you want to invoke.

True

GetWorkflows

CallBackEndpoint

string

(CallBack Endpoint)

CallBack Endpoint.

False

Content

CreateJobParameterContent

 

 

True

 

Returns:

          Type:CreateJobResponse

 

OCR

Summary: Return any text found in an image for the specified language

Description: Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English.

 

Syntax:

ContentModerator.OCR (string language, string format, OCRParameterImage Image)

 

Parameters:

Name

Type

Summary

Required

Related Action

language

string

(Language)

Language of the text(E.g. eng for english).

True

format

string

(Image Source)Values: [Image Content, Image URL]

Source of the image - either included or by reference url.

True

Image

OCRParameterImage

 

 

True

 

Returns:

          Type:OCRResponse

 

ScreenText

Summary: Detect profanity and match against custom and shared blacklists

Description: Detects profanity in more than 100 languages and match against custom and shared blacklists.

 

Syntax:

ContentModerator.ScreenText ([Optional]string language, [Optional]boolean autocorrect, [Optional]boolean PII, [Optional]string listId, [Optional]boolean classify, string Content-Type, string Text Content)

 

Parameters:

Name

Type

Summary

Required

Related Action

language

string

(Language)

Language of the text(E.g. eng for english).

False

autocorrect

boolean

(Autocorrect)

Autocorrect text.

False

PII

boolean

(Personal Identifiable Information)

Personal Identifiable Information in the text.

False

listId

string

(List Id)

Comma separated list Ids.

False

classify

boolean

(Classify input)

Classify input.

False

Content-Type

string

(Content Type)Values: [text/plain, text/html, text/xml, text/markdown]

Content type of the input text.

True

Text Content

string(binary)

 

 

True

 

Returns:

          Type:ScreenTextResponse

 

FindFaces

Summary: Find faces in an image content

Description: Find Faces an image content.

 

Syntax:

ContentModerator.FindFaces (string format, FindFacesParameterImage Image)

 

Parameters:

Name

Type

Summary

Required

Related Action

format

string

(Image Source)Values: [Image Content, Image URL]

Source of the image - either included or by reference url.

True

Image

FindFacesParameterImage

 

 

True

 

Returns:

          Type:FindFacesResponse

 

DetectLanguage

Summary: Detect Language of a given text input content

Description: This operation will detect the language of given input content. Returns the <a href="http://www-01.sil.org/iso639-3/codes.asp">ISO 639-3 code</a> for the predominant language comprising the submitted text. Over 110 languages supported.

 

Syntax:

ContentModerator.DetectLanguage (string Content-Type, string Text Content)

 

Parameters:

Name

Type

Summary

Required

Related Action

Content-Type

string

(Content Type)Values: [text/plain, text/html, text/xml, text/markdown]

Type of the text content.

True

Text Content

string(binary)

 

 

True

 

Returns:

          Type:DetectLanguageResponse

 

MatchImage

Summary: Match an image against one of your custom image lists

Description: Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API.   Returns ID and tags of matching image.<br/> <br/> Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response.

 

Syntax:

ContentModerator.MatchImage ([Optional]string listId, string format, MatchImageParameterImage Image)

 

Parameters:

Name

Type

Summary

Required

Related Action

listId

string

(List Id)

Optionally specify a listId to match against. If not specified, the image would matched against all your Image Lists.

False

format

string

(Image Source)Values: [Image Content, Image URL]

Source of the image - either included or by reference url.

True

Image

MatchImageParameterImage

 

 

True

 

Returns:

          Type:MatchImageResponse

 

CreateReviews

Summary: Create Reviews for Reviewers in your moderation team

Description: The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.

 

Syntax:

ContentModerator.CreateReviews (string teamName, [Optional]string subTeam, array body)

 

Parameters:

Name

Type

Summary

Required

Related Action

teamName

string

(Team Name)

Your team name.

True

subTeam

string

(SubTeam)

SubTeam of your team, you want to assign the review to.

False

body

array of (CreateReviewsParameterBodyItem)

 

Schema of the body.

True

 

Returns:

          Type:array of (string)

 

GetWorkflows

Summary: Get Workflows

Description: Get workflows configured in your team.

 

Syntax:

ContentModerator.GetWorkflows (string teamName)

 

Parameters:

Name

Type

Summary

Required

Related Action

teamName

string

(Team Name)

Your team name.

True

 

Returns:

          Type:array of (GetWorkflowsResponseItem)

 


 

CreateJobParameterContent

Summary:

Description:

 

          Properties:

Name

Type

Summary

ContentValue

string

Content Value

Content to evaluate for a job.


 

CreateJobResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

JobId

string

Job Id

Job Id for the content posted.


 

CreateReviewsParameterBodyItem

Summary:

Description: Schema items of the body.

 

          Properties:

Name

Type

Summary

Type

string

Content Type

Type of the content.  Values: [Image, Text]

Content

string

Review Content

Image url(for Image type)/text(for Text type) content to review.

ContentId

string

Content Id

Content Identifier.

CallbackEndpoint

string

Callback Endpoint

Optional callback endpoint.

Metadata

array of (MetadataItem)

Optional Metadata

Optional metadata details.

 

MetadataItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

Key

string

Key Parameter

Your key parameter.

Value

string

Value Parameter

Your value parameter.

 


 

DetectLanguageResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

DetectedLanguage

string

Detected Language

Detected Language of the text.


 

EvaluateImageParameterImage

Summary:

Description:

 

          Properties:

Name

Type

Summary


 

EvaluateImageResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

AdultClassificationScore

number

Adult Classification Score

Confidence score of the adult classification.

IsImageAdultClassified

boolean

Is Image Adult Classified

Is the image classified as an adult content.

RacyClassificationScore

number

Racy Classification Score

Confidence score of the racy classification.

IsImageRacyClassified

boolean

Is Image Racy Classified

Is the image classified as a racy content.

TrackingId

string

Tracking Id

Unique Content Moderator transaction Id.


 

FindFacesParameterImage

Summary:

Description:

 

          Properties:

Name

Type

Summary


 

FindFacesResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

TrackingId

string

Tracking Id

Unique Content Moderator transaction Id.

CacheId

string

Cache Id

Cache Id.

Count

number

Face Count

Number of faces detected in an image.

Faces

array of (FacesItem)

Detected face position

Detected face position.

 

FacesItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

Bottom

number

Bottom Location

Bottom Location of the detected face.

Left

number

Left Location

Left Location of the detected face.

Right

number

Right Location

Right Location of the detected face.

Top

number

Top Location

Top Location of the detected face.

 


 

GetAllImageListResponseItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

Id

number

Image List Id

Image list Id.

Name

string

Image List Name

Image list name.

Description

string

Image list details

Description of the image list.

Metadata

Metadata

Image List Metadata

Image list metadata.

 

Metadata

Summary: Image List Metadata

Description: Image list metadata.

 

          Properties:

Name

Type

Summary

sample string 1

string

key one parameter

key one parameter.

sample string 2

string

key two parameter

key two parameter.

 


 

GetImageSchemaResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

schema

Schema

 

 

 

Schema

Summary:

Description:

 

          Properties:

Name

Type

Summary

 


 

GetWorkflowsResponseItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

Name

string

Workflow Name

Team workflow name.

Description

string

Workflow Description

Workflow details.

Type

string

Workflow Type

Type of the workflow.  Values: [Image, Text]


 

MatchImageParameterImage

Summary:

Description:

 

          Properties:

Name

Type

Summary


 

MatchImageResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

TrackingId

string

Tracking Id

Unique Content Moderator transaction Id.

CacheId

string

Cache Id

Cache Id.

IsMatch

boolean

Is Match

Has image matched against input image list ID or your custom image list Ids.

MatchDetails

MatchDetails

Match Details

Image match details.

 

MatchDetails

Summary: Match Details

Description: Image match details.

 

          Properties:

Name

Type

Summary

Score

number

Match Details - Score

Confidence score of the image match.

MatchId

number

Match Details - Match Id

Matched custom image list Id.

Source

string

Match Details - Source

Source of the matched image.

Tags

array of (number)

Match Details - Tags

Tags associated with the matched image.

Label

string

Match Details - Label

Matched image label.

 


 

OCRParameterImage

Summary:

Description:

 

          Properties:

Name

Type

Summary


 

OCRResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

TrackingId

string

Tracking Id

Unique Content Moderator transaction Id.

CacheId

string

Cache Id

Cache Id.

Language

string

Text Language

Language of the text found in the image.

Text

string

Detected Text

Text found in the image.

Candidates

array of (CandidatesItem)

Detected Candidates

Detected text candidates found in the image.

 

CandidatesItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

Text

string

Detected text content candidates

Detected text content candidates from the image.

Confidence

number

Confidence Score

Confidence Score of the detected text content candidate.

 


 

ScreenTextResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

OriginalText

string

Original Text

The original text.

NormalizedText

string

Normalized Text

The normalized text.

AutoCorrectedText

string

AutoCorrected Text

The autocorrected text

Misrepresentation

array of (string)

Misrepresentation

The misrepresentation text details.

PII

PII

Personal Identifiable Information

Personal Identifiable Information in the text content.

Classification

Classification

Classification Details

The classification details of the text.

Language

string

Text Language

Language of the input text content.

Terms

array of (TermsItem)

Detected profanity terms

Detected profanity term details.

TrackingId

string

Tracking Id

Unique Content Moderator transaction Id.

 

PII

Summary: Personal Identifiable Information

Description: Personal Identifiable Information in the text content.

 

          Properties:

Name

Type

Summary

Email

array of (EmailItem)

Detected Email

Detected Email Details.

SSN

array of (SSNItem)

Detected SSN

Detected SSN details.

IPA

array of (IPAItem)

Detected IP Address

Detected IP Address Details.

Phone

array of (PhoneItem)

Detected Phone Number

Detected phone number details.

Address

array of (AddressItem)

Detected Address

Detected address details.

 

EmailItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

Detected

string

Detected Email

Detected Email Address from the input text content.

SubType

string

Email Subtype

Subtype of the detected Email Address.

Text

string

Email Address

Email Address in the input text content.

Index

integer

Email- Index

Index(Location) of the Email address in the input text content.

 

SSNItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

Text

string

SSN

Detected SSN.

Index

integer

SSN Index

Index(Location) of the SSN in the input text content.

 

IPAItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

SubType

string

IP Address Subtype

Subtype of the detected IP Address.

Text

string

IP Address

Detected IP Address.

Index

integer

IP Address Index

Index(Location) of the IP Address in the input text content.

 

PhoneItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

CountryCode

string

Phone CountryCode

Country Code of the detected Phone number.

Text

string

Phone Number

Detected Phone number.

Index

integer

Phone Index

Index(Location) of the Phone number in the input text content.

 

AddressItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

Text

string

Address

Detected Address from the input text content.

Index

integer

Address - Index

Index(Location) of the Address in the input text content.

 

Classification

Summary: Classification Details

Description: The classification details of the text.

 

          Properties:

Name

Type

Summary

Category1

Category1

 

 

Category2

Category2

 

 

Category3

Category3

 

 

ReviewRecommended

boolean

Review Recommended

The review recommended flag status.

 

Category1

Summary:

Description:

 

          Properties:

Name

Type

Summary

score

number(double)

Category1 Score

The category1 score details of the text. <a href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification.

 

Category2

Summary:

Description:

 

          Properties:

Name

Type

Summary

score

number(double)

Category2 Score

The category2 score details of the text. <a href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification.

 

Category3

Summary:

Description:

 

          Properties:

Name

Type

Summary

score

number(double)

Category3 Score

The category3 score details of the text. <a href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification.

 

TermsItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

Index

integer

Term Index

Index(Location) of the detected profanity term in the input text content.

OriginalIndex

integer

Term Original Index

Original Index(Location) of the detected profanity term in the input text content.

ListId

string

Terms List Id

Matched Terms list Id.

Term

string

Detected Term

Detected profanity term.