openapi: 3.0.1 info: title: Coveo Activity Activities Semantic Encoder Configuration API description: API for Coveo Platform termsOfService: https://www.coveo.com/en/support/terms-agreements contact: name: Coveo url: https://connect.coveo.com/s/discussions version: 1.0.0 servers: - url: https://platform.cloud.coveo.com description: Coveo public API endpoint security: - oauth2: - full tags: - name: Semantic Encoder Configuration paths: /rest/organizations/{organizationId}/machinelearning/configuration/semanticencoder/preview: post: tags: - Semantic Encoder Configuration summary: Get Preview for Building an SE Model description: 'Show how many documents matching various SE requirements are in the selection.

Privilege required ``` {"owner":"COVEO_ML","targetDomain":"ALLOW_CONTENT_PREVIEW","type":"ENABLE","targetId":"*"} ```
' operationId: getSemanticEncoderPreview parameters: - name: organizationId in: path description: The unique identifier of the target [organization](https://docs.coveo.com/en/185/).
**Example:** `mycoveocloudv2organizationg8tp8wu3` required: true schema: type: string example: mycoveocloudv2organizationg8tp8wu3 requestBody: content: application/json: schema: $ref: '#/components/schemas/SemanticEncoderPreviewRequest' required: true responses: '200': description: OK content: '*/*': schema: $ref: '#/components/schemas/SemanticEncoderPreviewResponse' x-pretty-name: getSemanticEncoderPreview x-required-privilege: owner: COVEO_ML targetDomain: ALLOW_CONTENT_PREVIEW type: ENABLE targetId: '*' x-required-privileges: - owner: COVEO_ML targetDomain: ALLOW_CONTENT_PREVIEW type: ENABLE targetId: '*' x-ui-operation-id: /rest/organizations/paramId/machinelearning/configuration/semanticencoder/preview_post components: schemas: SemanticEncoderPreviewResponse: type: object properties: query: type: string description: The query that was used to fetch document information.
**Example:** `@source==("Salesforce Notifier")` example: '@source==("Salesforce Notifier")' numberOfDocumentsInSources: type: integer description: The total number of documents in the selected sources. format: int64 numberOfValidDocuments: type: integer description: The number of documents that are candidates for learning. format: int64 numberOfDocumentsInSourcesMatchingFilters: type: integer description: The number of documents in the selected sources that match the conditions. format: int64 numberOfDocumentsInSourcesMatchingFiltersWithPermanentId: type: integer description: The number of documents in the selected sources that match the conditions and have a `permanentid`. format: int64 documentLimit: type: integer description: The maximum number of documents allowed to learn from. format: int64 documentRequirementStatus: type: string description: Status for the number of required documents to build the model. enum: - OK - INSUFFICIENT_DOCUMENTS - NB_OF_DOCUMENTS_OVER_LIMIT description: The Semantic Encoder preview response. FilterConditionModel: required: - field - operator - value type: object properties: field: type: string description: The field to use for the filter.
**Example:** `author` example: author operator: type: string description: The operator to use for the condition.
**Example:** `EQUALS` example: EQUALS enum: - EQUALS - NOT_EQUALS - EQUALS, NOT_EQUALS value: type: string description: The value to use for the filter.
**Example:** `John Smith` example: John Smith description: A custom filter condition. SemanticEncoderPreviewRequest: type: object properties: advancedQuery: type: string description: The query that determines the documents to extract. Cannot be used with other document extraction parameters, e.g. sources, filter conditions, etc.
**Example:** `@source==("My source") AND @permanentid AND @language="English"` example: '@source==("My source") AND @permanentid AND @language="English"' sources: type: array description: The names of the sources containing the items that the model should use to extract chunks.
**Example:** `["CommunityArticles","SalesforceCatalog"]` example: - CommunityArticles - SalesforceCatalog items: type: string description: The names of the sources containing the items that the model should use to extract chunks.
**Example:** `["CommunityArticles","SalesforceCatalog"]` example: '["CommunityArticles","SalesforceCatalog"]' filterConditions: type: array description: The custom filter conditions to target specific documents. items: $ref: '#/components/schemas/FilterConditionModel' description: The configuration for the Semantic Encoder preview. securitySchemes: oauth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://platform.cloud.coveo.com/oauth/authorize tokenUrl: https://platform.cloud.coveo.com/oauth/token scopes: full: required