swagger: '2.0'
info:
version: 2020-08-01-preview
title: Microsoft Azure AccessControlClient AccessConnector TextModeration API
schemes:
- https
tags:
- name: TextModeration
paths:
/contentmoderator/moderate/v1.0/ProcessText/Screen/:
post:
tags:
- TextModeration
summary: Microsoft Azure Detect Profanity And Match Against Custom And Shared Blocklists
description: Detects profanity in more than 100 languages and matches against custom and shared blocklists.
operationId: microsoftAzureTextmoderationScreentext
parameters:
- $ref: '#/parameters/textLanguage'
- $ref: '#/parameters/autocorrect'
- $ref: '#/parameters/PII'
- $ref: '#/parameters/listIdQueryParameter'
- $ref: '#/parameters/classify'
- name: Content-Type
description: Content type.
required: true
x-ms-client-name: textContentType
type: string
in: header
enum:
- text/plain
- text/html
- text/xml
- text/markdown
- $ref: '#/parameters/textContent'
consumes:
- text/plain
- text/html
- text/xml
- text/markdown
responses:
'200':
description: Status 200.
schema:
$ref: '#/definitions/Screen'
default:
description: Error response.
schema:
$ref: '#/definitions/APIError'
x-ms-examples:
Detect Language request:
$ref: ../v1.0/examples/ScreenTextResource.JSON
produces:
- application/json
/contentmoderator/moderate/v1.0/ProcessText/DetectLanguage:
post:
tags:
- TextModeration
operationId: microsoftAzureTextmoderationDetectlanguage
description: This operation detects the language of input content. It returns the ISO 639-3 code for the predominant language in the submitted text. More than 110 languages are supported.
parameters:
- name: Content-Type
description: Content type.
required: true
x-ms-client-name: textContentType
type: string
in: header
enum:
- text/plain
- text/html
- text/xml
- text/markdown
- $ref: '#/parameters/textContent'
consumes:
- text/plain
- text/html
- text/xml
- text/markdown
responses:
'200':
description: Detected language result.
schema:
$ref: '#/definitions/DetectedLanguage'
default:
description: Error response.
schema:
$ref: '#/definitions/APIError'
x-ms-examples:
Detect Language request:
$ref: ../v1.0/examples/DetectLanguageResource.JSON
produces:
- application/json
summary: Microsoft Azure Post Contentmoderator Moderate 0 Processtext Detectlanguage
definitions:
APIError:
type: object
description: Error information that the API returns.
properties:
Error:
$ref: '#/definitions/Error'
PII:
description: Details about personally identifiable information.
properties:
Email:
type: array
items:
$ref: '#/definitions/Email'
SSN:
type: array
items:
$ref: '#/definitions/SSN'
IPA:
type: array
items:
$ref: '#/definitions/IPA'
Phone:
type: array
items:
$ref: '#/definitions/Phone'
Address:
type: array
items:
$ref: '#/definitions/Address'
Screen:
description: Response for a screen text request.
properties:
OriginalText:
description: Original text.
type: string
NormalizedText:
description: Normalized text.
type: string
AutoCorrectedText:
description: Autocorrected text.
type: string
Misrepresentation:
description: Misrepresentation text.
type: array
items:
type: string
Classification:
description: Classification details of the text.
$ref: '#/definitions/Classification'
Status:
description: Evaluation status.
$ref: '#/definitions/Status'
PII:
description: Details about personally identifiable information.
$ref: '#/definitions/PII'
Language:
description: Language of the input text content.
type: string
Terms:
type: array
items:
$ref: '#/definitions/DetectedTerms'
TrackingId:
description: Unique Content Moderator transaction ID.
type: string
Address:
description: Address details.
properties:
Text:
description: Detected address.
type: string
Index:
description: Index (location) of the address in the input text content.
type: integer
Email:
description: Email address details.
properties:
Detected:
description: Detected email address from the input text content.
type: string
SubType:
description: Subtype of the detected email address.
type: string
Text:
description: Email address in the input text content.
type: string
Index:
description: Index (location) of the email address in the input text content.
type: integer
IPA:
description: IP address details.
properties:
SubType:
description: Subtype of the detected IP address.
type: string
Text:
description: Detected IP address.
type: string
Index:
description: Index (location) of the IP address in the input text content.
type: integer
Phone:
description: Phone property details.
properties:
CountryCode:
description: Country/region code of the detected phone number.
type: string
Text:
description: Detected phone number.
type: string
Index:
description: Index (location) of the phone number in the input text content.
type: integer
DetectedLanguage:
description: Detected language result.
properties:
DetectedLanguage:
description: Detected language.
type: string
Status:
description: Detected language status.
$ref: '#/definitions/Status'
TrackingId:
description: Tracking ID.
type: string
Status:
description: Status properties.
properties:
Code:
description: Status code.
type: integer
Description:
description: Status description.
type: string
Exception:
description: Exception status.
type: string
Error:
type: object
description: Error body.
properties:
Code:
type: string
Message:
type: string
DetectedTerms:
description: Detected term details.
properties:
Index:
description: Index (location) of the detected profanity term in the input text content.
type: integer
OriginalIndex:
description: Original index (location) of the detected profanity term in the input text content.
type: integer
ListId:
description: Matched ID in the term list.
type: integer
Term:
description: Detected profanity term.
type: string
SSN:
description: Details about a detected social security number.
properties:
Text:
description: Detected social security number in the input text content.
type: string
Index:
description: Index (location) of the social security number in the input text content.
type: integer
Classification:
description: Classification details of the text.
properties:
Category1:
description: Category1 score details of the text. For more details on category classification, see this article.
properties:
Score:
description: Category1 score.
type: number
Category2:
description: Category2 score details of the text. For more details on category classification, see this article.
properties:
Score:
description: Category2 score.
type: number
Category3:
description: Category3 score details of the text. For more details on category classification, see this article.
properties:
Score:
description: Category3 score.
type: number
ReviewRecommended:
description: Review-recommended flag.
type: boolean
parameters:
classify:
name: classify
description: Classify input.
in: query
required: false
type: boolean
default: false
x-ms-parameter-location: method
listIdQueryParameter:
name: listId
in: query
description: List ID.
type: string
x-ms-parameter-location: method
textLanguage:
name: language
in: query
description: Language of the text.
type: string
x-ms-parameter-location: method
textContent:
name: Text Content
description: Content to screen.
in: body
required: true
schema:
type: object
format: file
x-ms-parameter-location: method
autocorrect:
name: autocorrect
in: query
required: false
description: Autocorrect text.
type: boolean
default: false
x-ms-parameter-location: method
PII:
name: PII
in: query
description: Detect personal identifiable information.
required: false
type: boolean
default: false
x-ms-parameter-location: method
x-ms-parameterized-host:
hostTemplate: '{endpoint}'
useSchemePrefix: false
parameters:
- $ref: '#/parameters/Endpoint'