neclimdul/coveo-search-api

Documentation for Coveo Search API

2.0.0-alpha1 2024-10-21 14:12 UTC

This package is auto-updated.

Last update: 2024-10-21 19:15:16 UTC


README

Documentation for Coveo Search API

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

composer require neclimdul/coveo-search-api

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use NecLimDul\Coveo\SearchApi\ApiException;

// Configure OAuth2 access token for authorization: oauth2
$config = \NecLimDul\Coveo\SearchApi\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new \NecLimDul\Coveo\SearchApi\Api\AnalysisV3Api(
    // If you want to use custom http client, pass your client which implements `\GuzzleHttp\ClientInterface`.
    // This is optional, `\GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$parse_query_expression_to_structured_request = new \NecLimDul\Coveo\SearchApi\Model\ParseQueryExpressionToStructuredRequest(); // \NecLimDul\Coveo\SearchApi\Model\ParseQueryExpressionToStructuredRequest | The query expression to parse and convert
$organization_id = mycoveocloudv2organization; // string | The unique identifier of the target Coveo Cloud organization.  Specifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token.

try {
    $result = $apiInstance->parseExpressionToStructured($parse_query_expression_to_structured_request, $organization_id);
    print_r($result);
} catch (ApiException $e) {
    echo 'Exception when calling AnalysisV3Api->parseExpressionToStructured: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://platform.cloud.coveo.com

ClassMethodHTTP requestDescription
AnalysisV3ApiparseExpressionToStructuredPOST /rest/search/v3/analysis/expressions/structuredConvert query to structured expression
AnalysisV3ApireplayPOST /rest/search/v3/analysis/inspect/replayReplay a query with inspection details
ConditionsApibulkGetConditionsPOST /rest/search/v1/admin/pipelines/statements/bulkGetList condition statements
ConditionsApicreateConditionPOST /rest/search/v1/admin/pipelines/statementsCreate condition statement
ConditionsApigetConditionGET /rest/search/v1/admin/pipelines/statements/{statementId}Get condition statement
ConditionsApilistConditionsGET /rest/search/v1/admin/pipelines/statementsList condition statements
ConditionsApiupdateConditionPUT /rest/search/v1/admin/pipelines/statements/{statementId}Update condition statement
ConditionsApivalidatePipelineConditionOperationPOST /rest/search/v1/admin/pipelines/statements/validateValidate a single pipeline condition operation.
ConditionsApivalidatePipelineConditionOperationsPOST /rest/search/v1/admin/pipelines/statements/validate/batchValidate batch of pipeline condition operations.
DebugApidebugExpandedUserIdsGET /rest/search/debug/expandedUserIdsGet expanded user IDs
FeaturedResultsApibulkGetFeaturedResultsPOST /rest/search/v2/admin/pipelines/{pipelineId}/featuredResultRules/bulkGetDEPRECATED - Get a list of featured result rules
FeaturedResultsApicreateNewFeaturedResultRulePOST /rest/search/v2/admin/pipelines/{pipelineId}/featuredResultRulesDEPRECATED - Create a new featured result rule
FeaturedResultsApideleteFeaturedResultRuleDELETE /rest/search/v2/admin/pipelines/{pipelineId}/featuredResultRules/{featuredResultId}DEPRECATED - Delete a featured result rule
FeaturedResultsApigetFeaturedResultRuleV2GET /rest/search/v2/admin/pipelines/{pipelineId}/featuredResultRules/{featuredResultId}DEPRECATED - Get a featured result rule
FeaturedResultsApilistFeaturedResultRulesV2GET /rest/search/v2/admin/pipelines/{pipelineId}/featuredResultRulesDEPRECATED - Get a list of featured result rules
FeaturedResultsApiupdateFeaturedResultRulePUT /rest/search/v2/admin/pipelines/{pipelineId}/featuredResultRules/{featuredResultId}DEPRECATED - Update a featured result rule
FeaturedResultsApivalidateFeaturedResultsOperationPOST /rest/search/v2/admin/pipelines/{pipelineId}/featuredResultRules/validateDEPRECATED - Validate a single featured result operation.
FeaturedResultsApivalidateFeaturedResultsOperationsPOST /rest/search/v2/admin/pipelines/{pipelineId}/featuredResultRules/validate/batchDEPRECATED - Validate a batch of featured results operations.
MachineLearningAssociationsApiassociateModelPOST /rest/search/v2/admin/pipelines/{pipelineId}/ml/model/associationsAssociate an existing machine learning model with an existing pipeline.
MachineLearningAssociationsApibulkGetAssociationsOfPipelinePOST /rest/search/v2/admin/pipelines/{pipelineId}/ml/model/associations/bulkGetList query pipeline ML model associations
MachineLearningAssociationsApidisassociateDELETE /rest/search/v2/admin/pipelines/{pipelineId}/ml/model/associations/{associationId}Remove query pipeline ML model association
MachineLearningAssociationsApigetAssociationGET /rest/search/v2/admin/pipelines/{pipelineId}/ml/model/associations/{associationId}Get a ML model association
MachineLearningAssociationsApilistAssociationsOfPipelineGET /rest/search/v2/admin/pipelines/{pipelineId}/ml/model/associationsList query pipeline ML model associations
MachineLearningAssociationsApimlVersionGET /rest/search/v2/admin/pipelines/ml/versionReturns the version of ML models supported by the organization in the request.
MachineLearningAssociationsApiupdateAssociationPUT /rest/search/v2/admin/pipelines/{pipelineId}/ml/model/associations/{associationId}Update ML model association
MachineLearningAssociationsApiupdateAssociationPositionPUT /rest/search/v2/admin/pipelines/{pipelineId}/ml/model/associations/{associationId}/positionUpdate ML model association position
MachineLearningAssociationsApivalidateMlAssociationOperationPOST /rest/search/v2/admin/pipelines/{pipelineId}/ml/model/associations/validateValidate a single Ml model association operation.
MachineLearningAssociationsApivalidateMlAssociationOperationsPOST /rest/search/v2/admin/pipelines/{pipelineId}/ml/model/associations/validate/batchValidate a batch of Ml model association operations.
OrganizationsApiaddTrustedUriPOST /rest/organizations/{organizationId}/authentication/trustedurisAdd trusted search page URI
OrganizationsApicreateSamlAuthenticationPOST /rest/organizations/{organizationId}/authentication/samlCreates a new SAML authentication in an organization
OrganizationsApicreateSharepointAuthenticationProviderPOST /rest/organizations/{organizationId}/authentication/sharepointCreate SharePoint claims authentication provider
OrganizationsApideleteSamlAuthenticationDELETE /rest/organizations/{organizationId}/authentication/saml/{id}Deletes a SAML authentication from an organization
OrganizationsApideleteSharepointAuthenticationProviderDELETE /rest/organizations/{organizationId}/authentication/sharepoint/{id}Delete SharePoint claims authentication provider
OrganizationsApideleteTrustedUriDELETE /rest/organizations/{organizationId}/authentication/trusteduris/{id}Delete trusted search page URI
OrganizationsApigetRecentUntrustedUrisGET /rest/organizations/{organizationId}/authentication/trusteduris/recentuntrustedList recently seen search page URIs that were not trusted.
OrganizationsApigetSharepointAuthenticationProviderGET /rest/organizations/{organizationId}/authentication/sharepoint/{id}Get SharePoint claims authentication provider
OrganizationsApigetTrustedUrisGET /rest/organizations/{organizationId}/authentication/trustedurisList trusted search page URIs
OrganizationsApilistAuthenticationsGET /rest/organizations/{organizationId}/authenticationLists all authentication providers for an organization
OrganizationsApilistSamlAuthenticationsGET /rest/organizations/{organizationId}/authentication/samlLists the SAML authentications for an organization
OrganizationsApilistSharepointClaimsAuthProviderGET /rest/organizations/{organizationId}/authentication/sharepointList SharePoint claims authentication providers
OrganizationsApiloadSamlAuthenticationGET /rest/organizations/{organizationId}/authentication/saml/{id}Loads a single SAML authentication from an organization
OrganizationsApiupdateSamlAuthenticationPUT /rest/organizations/{organizationId}/authentication/saml/{id}Updates a SAML authentication in an organization
OrganizationsApiupdateSharepointAuthenticationProviderPUT /rest/organizations/{organizationId}/authentication/sharepoint/{id}Update SharePoint claims authentication provider
PassagesApirestSearchAlphaPassagesRetrievePostPOST /rest/search/alpha/passages/retrieveRetrieves the passage(s) for a particular query. (Alpha)
PipelinesApibulkGetPipelinesPOST /rest/search/v1/admin/pipelines/bulkGetList query pipelines
PipelinesApicreateQueryPipelineV1POST /rest/search/v1/admin/pipelinesCreate query pipeline
PipelinesApideleteConditionDELETE /rest/search/v1/admin/pipelines/statements/{statementId}Delete condition statement
PipelinesApideleteQueryPipelineDELETE /rest/search/v1/admin/pipelines/{pipelineId}Delete query pipeline
PipelinesApigetQueryPipelineV1GET /rest/search/v1/admin/pipelines/{pipelineId}Get query pipeline
PipelinesApiimportQueryPipelineStatementsPOST /rest/search/v1/admin/pipelines/{pipelineId}/statements/importImport query pipeline statements
PipelinesApilistQueryPipelinesV1GET /rest/search/v1/admin/pipelinesList query pipelines
PipelinesApiswapQueryPipelineNamesPOST /rest/search/v1/admin/pipelines/{pipelineId}/swapSwap query pipeline names
PipelinesApiupdateQueryPipelinePUT /rest/search/v1/admin/pipelines/{pipelineId}Update query pipeline
PipelinesApiv1CopyQueryPipelinePOST /rest/search/v1/admin/pipelines/{pipelineId}/duplicateCopy query pipeline
PipelinesApivalidatePipelineOperationPOST /rest/search/v1/admin/pipelines/validateValidate a single pipeline operation.
PipelinesApivalidatePipelineOperationsPOST /rest/search/v1/admin/pipelines/validate/batchValidate batch of pipeline operations.
ResultRankingsApibulkDeleteRankingRulesPOST /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/bulkDeleteBulk delete result rankings rules from a pipeline
ResultRankingsApibulkGetResultRankingOperationPOST /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/bulkGetGet a list of result ranking rules
ResultRankingsApicopyResultRankingRulePOST /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/copyCopy result rankings rules to a pipeline.
ResultRankingsApicreateResultRankingRulePOST /rest/search/v2/admin/pipelines/{pipelineId}/resultRankingsCreate a new result ranking rule
ResultRankingsApideleteResultRankingRuleDELETE /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/{resultRankingId}Delete a result ranking rule
ResultRankingsApiduplicateResultRankingRulePOST /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/duplicate/{resultRankingId}Duplicate a result ranking rule
ResultRankingsApigetResultRankingRuleGET /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/{resultRankingId}Get a result ranking rule
ResultRankingsApilistResultRankingRulesGET /rest/search/v2/admin/pipelines/{pipelineId}/resultRankingsGet a list of result ranking rules
ResultRankingsApiupdateResultRankingRulePUT /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/{resultRankingId}Update a result ranking rule
ResultRankingsApivalidateResultRankingOperationPOST /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/validateValidate a single result ranking operation.
ResultRankingsApivalidateResultRankingOperationsPOST /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/validate/batchValidate a batch of result ranking operations.
SearchV2ApidataStreamGET /rest/search/v2/datastreamGet item data stream
SearchV2ApidocumentGET /rest/search/v2/documentGet item in JSON format
SearchV2ApiextensionsGET /rest/search/v2/extensionsList available query extensions
SearchV2ApifacetSearchPOST /rest/search/v2/facetSend facet search request
SearchV2ApifieldsGET /rest/search/v2/fieldsList all fields
SearchV2ApifindFieldsFromExpressionPOST /rest/search/v2/fields/findFind fields from results of a query expression
SearchV2ApihtmlGetGET /rest/search/v2/htmlGet HTML item preview
SearchV2ApihtmlPostPOST /rest/search/v2/htmlGet HTML item preview
SearchV2ApiloginGET /rest/search/v2/login/{provider}Log in to authentication provider
SearchV2ApiloginProviderPostPOST /rest/search/v2/login/{provider}Log in to authentication provider
SearchV2ApiplanSearchUsingGetGET /rest/search/v2/planPlan search execution
SearchV2ApiplanSearchUsingPostPOST /rest/search/v2/planPlan search execution
SearchV2ApiquerySuggestGetGET /rest/search/v2/querySuggestRequest query suggestions
SearchV2ApiquerySuggestPostPOST /rest/search/v2/querySuggestRequest query suggestions
SearchV2ApiratingPOST /rest/search/v2/ratingUpdate user rating
SearchV2ApisearchUsingGetGET /rest/search/v2Send search request
SearchV2ApisearchUsingPostPOST /rest/search/v2Send search request
SearchV2ApitextGET /rest/search/v2/textGet item in text format
SearchV2ApitokenPOST /rest/search/v2/tokenCreate search token
SearchV2ApivaluesBatchGetGET /rest/search/v2/values/batchGet values for several field
SearchV2ApivaluesBatchPostPOST /rest/search/v2/values/batchGet values for several field
SearchV2ApivaluesGetGET /rest/search/v2/valuesGet values for one field
SearchV2ApivaluesPostPOST /rest/search/v2/valuesGet values for one field
SearchV3ApisearchUsingPostV3POST /rest/search/v3Send search request
StatementGroupsApibulkGetStatementGroupsOperationPOST /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/bulkGetList statement groups of a pipeline
StatementGroupsApicreateStatementGroupPOST /rest/search/v2/admin/pipelines/{pipelineId}/statementGroupsCreate a new statement group
StatementGroupsApideleteAStatementGroupOfAPipelineDELETE /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/{statementGroupId}Delete a statement group of a pipeline
StatementGroupsApigetAStatementGroupOfAPipelineGET /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/{statementGroupId}Get a statement group of a pipeline
StatementGroupsApigetFeatureActiveStateGET /rest/search/admin/pipelines/featureActiveStateReturns the list of all pipeline features and whether they're active or not.
StatementGroupsApilistStatementGroupsGET /rest/search/v2/admin/pipelines/{pipelineId}/statementGroupsList statement groups of a pipeline
StatementGroupsApistatementGroupsAssociationsDissociatePOST /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/associations/dissociateDissociate pipeline rules associated to groups
StatementGroupsApitoggleAPermanentGroupPATCH /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/{statementGroupId}Toggle a permanent group
StatementGroupsApiupdateAStatementGroupPUT /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/{statementGroupId}Update a statement group
StatementGroupsApiupdateStatementGroupsAssociationsPUT /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/{statementGroupId}/associationsUpdate the rules associated with a statement group
StatementGroupsApivalidateStatementGroupOperationPOST /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/validateValidate a single statement group operation.
StatementGroupsApivalidateStatementGroupsOperationsPOST /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/validate/batchValidate a batch of statement groups operations.
StatementsV1ApibulkGetStatementsOperationV1POST /rest/search/v1/admin/pipelines/{pipelineId}/statements/bulkGetList query pipeline statements
StatementsV1ApicreateQueryPipelineStatementPOST /rest/search/v1/admin/pipelines/{pipelineId}/statementsCreate query pipeline statement
StatementsV1ApideleteQueryPipelineStatementDELETE /rest/search/v1/admin/pipelines/{pipelineId}/statements/{statementId}Delete query pipeline statement
StatementsV1ApigetQueryPipelineStatementGET /rest/search/v1/admin/pipelines/{pipelineId}/statements/{statementId}Get query pipeline statement
StatementsV1ApilistQueryPipelineStatementsGET /rest/search/v1/admin/pipelines/{pipelineId}/statementsList query pipeline statements
StatementsV1ApimoveQueryPipelineStatementPUT /rest/search/v1/admin/pipelines/{pipelineId}/statements/{statementId}/moveMove query pipeline statement
StatementsV1ApiupdateQueryPipelineStatementV1PUT /rest/search/v1/admin/pipelines/{pipelineId}/statements/{statementId}Update query pipeline statement
StatementsV1Apiv1CopyQueryPipelineStatementsPOST /rest/search/v1/admin/pipelines/{pipelineId}/statements/copyCopy query pipeline statements
StatementsV1Apiv1ExportQueryPipelineStatementsGET /rest/search/v1/admin/pipelines/{pipelineId}/statements/exportExport query pipeline statements
StatementsV1ApivalidateStatementOperationV1POST /rest/search/v1/admin/pipelines/{pipelineId}/statements/validateValidate a single statement operation.
StatementsV1ApivalidateStatementsOperationsV1POST /rest/search/v1/admin/pipelines/{pipelineId}/statements/validate/batchValidate a batch of statement operations.
StatementsV2ApibulkDeleteStatementsPOST /rest/search/v2/admin/pipelines/{pipelineId}/statements/bulkDeleteBulk delete query pipeline statements
StatementsV2ApibulkGetStatementsOperationV2POST /rest/search/v2/admin/pipelines/{pipelineId}/statements/bulkGetList query pipeline statements
StatementsV2ApicopyQueryPipelineStatementsPOST /rest/search/v2/admin/pipelines/{pipelineId}/statements/copyCopy query pipeline statements
StatementsV2ApicreateQueryPipelineStatementV2POST /rest/search/v2/admin/pipelines/{pipelineId}/statementsCreate query pipeline statement
StatementsV2ApideleteQueryPipelineStatementV2DELETE /rest/search/v2/admin/pipelines/{pipelineId}/statements/{statementId}Delete query pipeline statement
StatementsV2ApiexportQueryPipelineStatementsGET /rest/search/v2/admin/pipelines/{pipelineId}/statements/exportExport query pipeline statements
StatementsV2ApigetQueryPipelineStatementV2GET /rest/search/v2/admin/pipelines/{pipelineId}/statements/{statementId}Get query pipeline statement
StatementsV2ApiimportQueryPipelineStatementsV2POST /rest/search/v2/admin/pipelines/{pipelineId}/statements/importImport query pipeline statements
StatementsV2ApilistQueryPipelineStatementsV2GET /rest/search/v2/admin/pipelines/{pipelineId}/statementsList query pipeline statements
StatementsV2ApimoveQueryPipelineStatementV2PUT /rest/search/v2/admin/pipelines/{pipelineId}/statements/{statementId}/moveMove query pipeline statement
StatementsV2ApiupdateQueryPipelineStatementPUT /rest/search/v2/admin/pipelines/{pipelineId}/statements/{statementId}Update query pipeline statement
StatementsV2ApivalidateStatementOperationV2POST /rest/search/v2/admin/pipelines/{pipelineId}/statements/validateValidate a single statement operation.
StatementsV2ApivalidateStatementsOperationsV2POST /rest/search/v2/admin/pipelines/{pipelineId}/statements/validate/batchValidate a batch of statement operations.

Models

Authorization

oauth2

  • Type: OAuth
  • Flow: implicit
  • Authorization URL: https://platform.cloud.coveo.com/oauth/authorize
  • Scopes:
    • full: required

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen