swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector text:shieldPrompt API schemes: - https tags: - name: text:shieldPrompt paths: /text:shieldPrompt: post: operationId: microsoftAzureTextoperationsDetecttextpromptinjectionoptions summary: Microsoft Azure Analyze Text Prompt Injection Attacks description: A synchronous API for the analysis of text prompt injection attacks. parameters: - $ref: '#/parameters/Azure.Core.Foundations.ApiVersionParameter' - name: body in: body description: The text prompt injection attacks analysis request. required: true schema: $ref: '#/definitions/AnalyzeTextPromptInjectionOptions' responses: '200': description: The request has succeeded. schema: $ref: '#/definitions/AnalyzeTextPromptInjectionResult' default: description: An unexpected error response. schema: $ref: '#/definitions/Azure.Core.Foundations.ErrorResponse' headers: x-ms-error-code: type: string description: String error code indicating what went wrong. x-ms-examples: Analyze text prompt injection attacks: $ref: ./examples/DetectTextPromptInjection.json tags: - text:shieldPrompt definitions: Azure.Core.Foundations.ErrorResponse: type: object description: A response containing error details. properties: error: $ref: '#/definitions/Azure.Core.Foundations.Error' description: The error object. required: - error TextPromptInjectionResult: type: object description: The text injection attacks analysis response. properties: attackDetected: type: boolean description: Analysis result for whether the prompt is classified as an injection attack. required: - attackDetected AnalyzeTextPromptInjectionOptions: type: object description: The text prompt injection attacks analysis request. properties: userPrompt: type: string description: The user prompt needs to be analyzed if it attempts to do direct injection attacks. documents: type: array description: The documents needs to be analyzed if they attempt to do direct or indirect injection attacks. items: type: string Azure.Core.Foundations.InnerError: type: object description: An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. properties: code: type: string description: One of a server-defined set of error codes. innererror: $ref: '#/definitions/Azure.Core.Foundations.InnerError' description: Inner error. Azure.Core.Foundations.Error: type: object description: The error object. properties: code: type: string description: One of a server-defined set of error codes. message: type: string description: A human-readable representation of the error. target: type: string description: The target of the error. details: type: array description: An array of details about specific errors that led to this reported error. items: $ref: '#/definitions/Azure.Core.Foundations.Error' x-ms-identifiers: [] innererror: $ref: '#/definitions/Azure.Core.Foundations.InnerError' description: An object containing more specific information than the current object about the error. required: - code - message AnalyzeTextPromptInjectionResult: type: object description: The text injection attacks analysis response. properties: userPromptAnalysis: $ref: '#/definitions/TextPromptInjectionResult' description: Direct injection analysis result for user prompt input. documentsAnalysis: type: array description: Direct and indirect injection attacks analysis result for documents input. items: $ref: '#/definitions/TextPromptInjectionResult' x-ms-identifiers: [] parameters: Azure.Core.Foundations.ApiVersionParameter: name: api-version in: query description: The API version to use for this operation. required: true type: string minLength: 1 x-ms-parameter-location: method x-ms-client-name: apiVersion x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'