swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector :Analyze Text API schemes: - https tags: - name: :Analyze Text paths: /:analyze-text: post: summary: Microsoft Azure Request Text Analysis Over A Collection Of Documents description: Submit a collection of text documents for analysis. Specify a single unique task to be executed immediately. operationId: microsoftAzureAnalyzetext consumes: - application/json produces: - application/json parameters: - $ref: common.json#/parameters/ApiVersionParameter - $ref: common.json#/parameters/ShowStats - description: Collection of documents to analyze and a single task to execute. in: body name: body schema: $ref: '#/definitions/AnalyzeTextTask' required: true responses: '200': description: A successful call result schema: $ref: '#/definitions/AnalyzeTextTaskResult' default: description: Unexpected error schema: $ref: common.json#/definitions/ErrorResponse x-ms-examples: Successful Entity Linking Request: $ref: ./examples/text/SuccessfulEntityLinkingRequest.json Successful Entity Recognition Request: $ref: ./examples/text/SuccessfulEntityRecognitionRequest.json Successful Entity Recognition Inclusion Request: $ref: ./examples/text/SuccessfulEntityRecognitionInclusionRequest.json Successful Entity Recognition Exclusion Request: $ref: ./examples/text/SuccessfulEntityRecognitionExclusionRequest.json Successful Entity Recognition Overlap Policy Request: $ref: ./examples/text/SuccessfulEntityRecognitionOverlapPolicy.json Successful Key Phrase Extraction Request: $ref: ./examples/text/SuccessfulKeyPhraseExtractionRequest.json Successful PII Entity Recognition Request: $ref: ./examples/text/SuccessfulPiiEntityRecognitionRequest.json Successful PII Entity Recognition Redaction Request: $ref: ./examples/text/SuccessfulPiiEntityRecognitionRedactionRequest.json Successful PII Entity Recognition Exclusion Request: $ref: ./examples/text/SuccessfulPiiEntityRecognitionExclusionRequest.json Successful Language Detection Request: $ref: ./examples/text/SuccessfulLanguageDetectionRequest.json Successful Sentiment Analysis Request: $ref: ./examples/text/SuccessfulSentimentAnalysisRequest.json Successful Dynamic Classification Request: $ref: ./examples/text/SuccessfuDynamicClassificationRequest.json tags: - :Analyze Text /analyze-text/jobs: post: consumes: - application/json produces: - application/json description: Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed as a long-running operation. operationId: microsoftAzureAnalyzetextSubmitjob summary: Microsoft Azure Submit Text Analysis Job parameters: - $ref: common.json#/parameters/ApiVersionParameter - description: Collection of documents to analyze and one or more tasks to execute. in: body name: body schema: $ref: '#/definitions/AnalyzeTextJobsInput' required: true responses: '202': description: A successful call results with an Operation-Location header used to check the status of the analysis job. headers: Operation-Location: type: string default: description: Error response. schema: $ref: common.json#/definitions/ErrorResponse x-ms-examples: Successful Submit Analysis Job Request: $ref: ./examples/text/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json Successful Healthcare Post Request: $ref: ./examples/text/SuccessfulHealthcarePostRequest.json Successful Custom Healthcare Post Request: $ref: ./examples/text/SuccessfulCustomHealthcarePostRequest.json Successful Submit Abstractive Summarization Task: $ref: ./examples/text/SuccessfulAbstractiveSummarizationTaskSubmit.json Successful Submit Custom Abstractive Summarization Task: $ref: ./examples/text/SuccessfulCustomAbstractiveSummarizationTaskSubmit.json Successful Healthcare DocumentType Post Request: $ref: ./examples/text/SuccessfulHealthcareDocumentTypePostRequest.json Successful Custom Sentiment Analysis Post Request: $ref: ./examples/text/SuccessfulCustomSentimentAnalysisTaskSubmit.json x-ms-long-running-operation: true tags: - :Analyze Text /analyze-text/jobs/{jobId}: get: produces: - application/json description: Get the status of an analysis job. A job may consist of one or more tasks. Once all tasks are succeeded, the job will transition to the succeeded state and results will be available for each task. operationId: microsoftAzureAnalyzetextJobstatus summary: Microsoft Azure Get Analysis Status And Results parameters: - $ref: common.json#/parameters/ApiVersionParameter - $ref: common.json#/parameters/JobId - $ref: common.json#/parameters/ShowStats - $ref: common.json#/parameters/TopParameter - $ref: common.json#/parameters/SkipParameter responses: '200': description: Analysis job status and metadata. schema: $ref: '#/definitions/AnalyzeTextJobState' default: description: Unexpected error schema: $ref: common.json#/definitions/ErrorResponse x-ms-examples: Successful Get Text Analysis Job Status Request: $ref: ./examples/text/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json Successful Get Text Analysis Health Request: $ref: ./examples/text/SuccessfulHealthcareTaskStatusRequest.json Successful Get Text Analysis Custom Health Request: $ref: ./examples/text/SuccessfulCustomHealthcareTaskStatusRequest.json Successful Get Abstractive Summarization Result: $ref: ./examples/text/SuccessfulAbstractiveSummarizationTaskResult.json Successful Get Custom Abstractive Summarization Result: $ref: ./examples/text/SuccessfulCustomAbstractiveSummarizationTaskResult.json Successful Get Text Analysis Health DocumentType Request: $ref: ./examples/text/SuccessfulHealthcareDocumentTypeTaskStatusRequest.json Successful Get Text Analysis Custom Sentiment Analysis Request: $ref: ./examples/text/SuccessfulCustomSentimentAnalysisTaskStatusRequest.json tags: - :Analyze Text /analyze-text/jobs/{jobId}:cancel: post: produces: - application/json description: Cancel a long-running Text Analysis job. operationId: microsoftAzureAnalyzetextCanceljob summary: Microsoft Azure Cancel A Long Running Text Analysis Job parameters: - $ref: common.json#/parameters/ApiVersionParameter - $ref: common.json#/parameters/JobId responses: '202': description: Cancel Job request has been received. headers: Operation-Location: type: string default: description: Unexpected error schema: $ref: common.json#/definitions/ErrorResponse x-ms-examples: Successful Job Delete Request: $ref: ./examples/text/SuccessfulAnalyzeTextJobsCancelRequest.json x-ms-long-running-operation: true tags: - :Analyze Text definitions: AnalyzeTextJobStatistics: properties: statistics: $ref: common.json#/definitions/RequestStatistics type: object MultiLanguageInput: type: object description: Contains an input document to be analyzed by the service. required: - id - text properties: id: type: string description: A unique, non-empty document identifier. text: type: string description: The input text to process. language: type: string description: (Optional) This is the 2 letter ISO 639-1 representation of a language. For example, use "en" for English; "es" for Spanish etc. For Auto Language Detection, use "auto". If not set, use "en" for English as default. TasksState: properties: tasks: properties: completed: type: integer format: int64 failed: type: integer format: int64 inProgress: type: integer format: int64 total: type: integer format: int64 items: type: array items: $ref: '#/definitions/AnalyzeTextLROResult' required: - total - completed - failed - inProgress type: object required: - tasks type: object AnalyzeTextLROTaskKind: type: string description: Enumeration of supported long-running Text Analysis tasks. enum: - SentimentAnalysis - EntityRecognition - PiiEntityRecognition - KeyPhraseExtraction - EntityLinking - Healthcare - CustomHealthcare - ExtractiveSummarization - CustomEntityRecognition - CustomSingleLabelClassification - CustomMultiLabelClassification - AbstractiveSummarization - CustomSentimentAnalysis - CustomAbstractiveSummarization x-ms-enum: name: AnalyzeTextLROTaskKind modelAsString: true AnalyzeTextTaskResultsKind: type: string description: Enumeration of supported Text Analysis task results. enum: - SentimentAnalysisResults - EntityRecognitionResults - PiiEntityRecognitionResults - KeyPhraseExtractionResults - LanguageDetectionResults - EntityLinkingResults - DynamicClassificationResults x-ms-enum: name: AnalyzeTextTaskResultsKind modelAsString: true MultiLanguageAnalysisInput: type: object properties: documents: type: array items: $ref: '#/definitions/MultiLanguageInput' AnalyzeTextLROResult: type: object discriminator: kind properties: kind: $ref: '#/definitions/AnalyzeTextLROResultsKind' allOf: - $ref: '#/definitions/TaskState' - $ref: common.json#/definitions/TaskIdentifier required: - kind AnalyzeTextJobState: allOf: - $ref: common.json#/definitions/JobState - $ref: '#/definitions/TasksState' - $ref: '#/definitions/AnalyzeTextJobStatistics' TaskState: properties: lastUpdateDateTime: format: date-time type: string status: type: string enum: - notStarted - running - succeeded - failed - cancelled - cancelling x-ms-enum: modelAsString: true name: State required: - status - lastUpdateDateTime type: object AnalyzeTextTaskKind: type: string description: Enumeration of supported Text Analysis tasks. enum: - SentimentAnalysis - EntityRecognition - PiiEntityRecognition - KeyPhraseExtraction - LanguageDetection - EntityLinking - DynamicClassification x-ms-enum: name: AnalyzeTextTaskKind modelAsString: true AnalyzeTextLROResultsKind: type: string description: Enumeration of supported Text Analysis long-running operation task results. enum: - SentimentAnalysisLROResults - EntityRecognitionLROResults - PiiEntityRecognitionLROResults - KeyPhraseExtractionLROResults - EntityLinkingLROResults - HealthcareLROResults - CustomHealthcareLROResults - ExtractiveSummarizationLROResults - CustomEntityRecognitionLROResults - CustomSingleLabelClassificationLROResults - CustomMultiLabelClassificationLROResults - AbstractiveSummarizationLROResults - CustomSentimentAnalysisLROResults - CustomAbstractiveSummarizationLROResults x-ms-enum: name: AnalyzeTextLROResultsKind modelAsString: true AnalyzeTextTaskResult: type: object discriminator: kind required: - kind properties: kind: $ref: '#/definitions/AnalyzeTextTaskResultsKind' AnalyzeTextJobsInput: type: object properties: displayName: description: Optional display name for the analysis job. type: string defaultLanguage: description: Default language to use for records requesting automatic language detection. type: string analysisInput: $ref: '#/definitions/MultiLanguageAnalysisInput' tasks: description: The set of tasks to execute on the input documents. type: array items: $ref: '#/definitions/AnalyzeTextLROTask' required: - analysisInput - tasks AnalyzeTextTask: type: object discriminator: kind required: - kind properties: kind: $ref: '#/definitions/AnalyzeTextTaskKind' AnalyzeTextLROTask: type: object discriminator: kind required: - kind properties: kind: $ref: '#/definitions/AnalyzeTextLROTaskKind' allOf: - $ref: common.json#/definitions/TaskIdentifier x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'