neclimdul/coveo-source-api

API for Coveo Platform

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

This package is auto-updated.

Last update: 2024-10-22 18:38:22 UTC


README

API for Coveo Platform

For more information, please visit https://connect.coveo.com/s/discussions.

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-source-api

Getting Started

Please follow the installation procedure and then run the following:

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

use NecLimDul\Coveo\SourceApi\ApiException;

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

$apiInstance = new \NecLimDul\Coveo\SourceApi\Api\MappingsApi(
    // 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
);
$organization_id = 'organization_id_example'; // string | The unique identifier of the target [organization](https://docs.coveo.com/en/185/).<br />**Example:** `mycoveocloudv2organizationg8tp8wu3`
$source_id = 'source_id_example'; // string | The unique identifier of the target [source](https://docs.coveo.com/en/246/).<br />**Example:** `mycoveocloudv2organizationg8tp8wu3-gravodalyysjsu34camnvxm2d2y`
$base_rule_model = new \NecLimDul\Coveo\SourceApi\Model\BaseRuleModel(); // \NecLimDul\Coveo\SourceApi\Model\BaseRuleModel
$rebuild = false; // bool | Whether to rebuild the [source](https://docs.coveo.com/en/246/) after the operation.<br />**Default:** `false`

try {
    $result = $apiInstance->addCommonMappingSettingsRule($organization_id, $source_id, $base_rule_model, $rebuild);
    print_r($result);
} catch (ApiException $e) {
    echo 'Exception when calling MappingsApi->addCommonMappingSettingsRule: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

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

ClassMethodHTTP requestDescription
MappingsApiaddCommonMappingSettingsRulePOST /rest/organizations/{organizationId}/sources/{sourceId}/mappings/common/rulesCreate common mapping rule
MappingsApiaddMappingTypeSettingRulePOST /rest/organizations/{organizationId}/sources/{sourceId}/mappings/types/{typeId}/rulesCreate specific mapping rule of given type
MappingsApiaddMappingTypesPOST /rest/organizations/{organizationId}/sources/{sourceId}/mappings/typesCreate specific mapping
MappingsApiaddMappingTypesBatchPOST /rest/organizations/{organizationId}/sources/{sourceId}/mappings/batch/createCreate mapping rules in batch
MappingsApideleteCommonMappingSettingsRuleDELETE /rest/organizations/{organizationId}/sources/{sourceId}/mappings/common/rules/{ruleId}Delete common mapping rule
MappingsApideleteMappingTypeDELETE /rest/organizations/{organizationId}/sources/{sourceId}/mappings/types/{typeId}Delete specific mappings of given type
MappingsApideleteMappingTypeSettingsRuleDELETE /rest/organizations/{organizationId}/sources/{sourceId}/mappings/types/{typeId}/rules/{ruleId}Delete specific mapping rule
MappingsApideleteMappingTypesBatchPOST /rest/organizations/{organizationId}/sources/{sourceId}/mappings/batch/deleteDelete mapping rules in batch
MappingsApigetCommonMappingSettingsGET /rest/organizations/{organizationId}/sources/{sourceId}/mappings/commonList common mappings
MappingsApigetCommonMappingSettingsRuleGET /rest/organizations/{organizationId}/sources/{sourceId}/mappings/common/rules/{ruleId}Show common mapping rule
MappingsApigetCommonMappingSettingsRulesGET /rest/organizations/{organizationId}/sources/{sourceId}/mappings/common/rulesList common mapping rules
MappingsApigetMappingTypeSettingRulesGET /rest/organizations/{organizationId}/sources/{sourceId}/mappings/types/{typeId}/rulesList specific mapping rules of given type
MappingsApigetMappingTypeSettingsGET /rest/organizations/{organizationId}/sources/{sourceId}/mappings/types/{typeId}List specific mappings of given type
MappingsApigetMappingTypeSettingsRuleGET /rest/organizations/{organizationId}/sources/{sourceId}/mappings/types/{typeId}/rules/{ruleId}Show specific mapping rule
MappingsApigetMappingTypesGET /rest/organizations/{organizationId}/sources/{sourceId}/mappings/typesList specific mappings
MappingsApigetMappingsConfigurationGET /rest/organizations/{organizationId}/sources/{sourceId}/mappingsShow mapping configuration
MappingsApiupdateCommonMappingSettingsPUT /rest/organizations/{organizationId}/sources/{sourceId}/mappings/commonUpdate common mappings
MappingsApiupdateCommonMappingSettingsRulePUT /rest/organizations/{organizationId}/sources/{sourceId}/mappings/common/rules/{ruleId}Update common mapping rule
MappingsApiupdateMappingTypeSettingsPUT /rest/organizations/{organizationId}/sources/{sourceId}/mappings/types/{typeId}Update specific mappings of given type
MappingsApiupdateMappingTypeSettingsRulePUT /rest/organizations/{organizationId}/sources/{sourceId}/mappings/types/{typeId}/rules/{ruleId}Update specific mapping rule
MappingsApiupdateMappingTypesBatchPOST /rest/organizations/{organizationId}/sources/{sourceId}/mappings/batch/updateUpdate mapping rules in batch
MappingsApiupdateMappingsConfigurationPUT /rest/organizations/{organizationId}/sources/{sourceId}/mappingsUpdate mapping configuration
MetadataApicreateMetadataReportPOST /rest/organizations/{organizationId}/sources/{sourceId}/metadataCreate metadata report for a source
MetadataApigetSourceMetadataReportGET /rest/organizations/{organizationId}/sources/{sourceId}/metadataRetrieve metadata report for a source
MetadataApigetSourceMetadataStatusGET /rest/organizations/{organizationId}/sources/{sourceId}/metadata/statusGet the status of metadata reports for a source
SalesforceSourceConfigurationApigenerateOTGPOST /rest/sourceconfiguration/salesforce/generateOTGGenerate an ObjectsToGet given a schema
SalesforceSourceConfigurationApigetDefaultObjectsGET /rest/sourceconfiguration/salesforce/objectsGet objects
SalesforceSourceConfigurationApigetFieldsGET /rest/sourceconfiguration/salesforce/objects/{objectName}/fieldsGet fields for a given object
SalesforceSourceConfigurationApigetObjectGET /rest/sourceconfiguration/salesforce/objects/{objectName}Get the information for a given object
SalesforceSourceConfigurationApigetRelationshipGET /rest/sourceconfiguration/salesforce/objects/{objectName}/{relationshipName}Get the information for a given object relationship
SalesforceSourceConfigurationApigetSchemaGET /rest/sourceconfiguration/salesforce/schemaGet complete schema (objects and fields)
SalesforceSourceConfigurationApiparseOTGPOST /rest/sourceconfiguration/salesforce/parseOTGParse an ObjectsToGet to a schema
SalesforceSourceConfigurationApirefreshFieldsPOST /rest/sourceconfiguration/salesforce/objects/{objectName}/fieldsRefresh fields for a given object
SalesforceSourceConfigurationApirefreshObjectsPOST /rest/sourceconfiguration/salesforce/objectsRefresh objects
SalesforceSourceConfigurationApirefreshSchemaPOST /rest/sourceconfiguration/salesforce/schemaRefresh complete schema (objects and fields)
SourceExtensionConfigurationsApigetSourceExtensionsGET /rest/organizations/{organizationId}/sources/{sourceId}/extensionsList extension configurations
SourceExtensionConfigurationsApisetSourceExtensionsPUT /rest/organizations/{organizationId}/sources/{sourceId}/extensionsUpdate extension configurations
SourceItemTypesApigetSourceItemTypesGET /rest/organizations/{organizationId}/sources/{sourceId}/itemTypesList item types
SourcesApiabortTaskForActivityPOST /rest/organizations/{organizationId}/sources/{sourceId}/tasks/abortAbort a source task related to a given activity.
SourcesApiapplyChangesPOST /rest/organizations/{organizationId}/sources/{sourceId}/applyChangesApply pending changes on a source
SourcesApicreateFieldPOST /rest/organizations/{organizationId}/sources/fieldsCreates a field for an organization
SourcesApicreateFieldsPOST /rest/organizations/{organizationId}/sources/fields/batch/createCreates fields for an organization
SourcesApicreateRawSourcePOST /rest/organizations/{organizationId}/sources/rawCreate a source from raw configuration
SourcesApicreateSourcePOST /rest/organizations/{organizationId}/sourcesCreate a source from simple configuration
SourcesApicreateSourceSchedulePOST /rest/organizations/{organizationId}/sources/{sourceId}/schedulesCreate a new schedule for the source
SourcesApideleteSourceDELETE /rest/organizations/{organizationId}/sources/{sourceId}Delete a source
SourcesApideleteSourceScheduleDELETE /rest/organizations/{organizationId}/sources/{sourceId}/schedules/{scheduleId}Delete a source schedule
SourcesApidisablePOST /rest/organizations/{organizationId}/sources/{sourceId}/disableDisable schedules on a source
SourcesApiduplicateSourcePOST /rest/organizations/{organizationId}/sources/{sourceId}/duplicateDuplicate a source
SourcesApienablePOST /rest/organizations/{organizationId}/sources/{sourceId}/enableEnable schedules on a source
SourcesApievictSchemaForSourcePOST /rest/organizations/{organizationId}/sources/{sourceId}/configuration/salesforce/evictEvict the salesforce schema of a source.
SourcesApifullRefreshPOST /rest/organizations/{organizationId}/sources/{sourceId}/fullRefreshApply a full refresh operation on a source
SourcesApigetAllRawSourcesGET /rest/organizations/{organizationId}/sources/raw/allGet the raw configuration of all sources
SourcesApigetFieldGET /rest/organizations/{organizationId}/sources/fields/{fieldId}Get a single field for an organization
SourcesApigetFields1GET /rest/organizations/{organizationId}/sources/page/fieldsGet a page of fields for an organization
SourcesApigetFields2GET /rest/organizations/{organizationId}/sources/fieldsGet all fields for an organization
SourcesApigetLightSourceGET /rest/organizations/{organizationId}/sources/{sourceId}/lightGet a single source
SourcesApigetRawSourceGET /rest/organizations/{organizationId}/sources/{sourceId}/rawGet the raw configuration of a source
SourcesApigetSalesforceFieldsForSourceGET /rest/organizations/{organizationId}/sources/{sourceId}/configuration/salesforce/objects/{objectName}/fieldsGet an object fields for a given source.
SourcesApigetSalesforceObjectForSourceGET /rest/organizations/{organizationId}/sources/{sourceId}/configuration/salesforce/objects/{objectName}Get an object fields for a given source.
SourcesApigetSalesforceRelationshipsForSourceGET /rest/organizations/{organizationId}/sources/{sourceId}/configuration/salesforce/objects/{objectName}/{relationshipName}Get a relationship for a given source and object.
SourcesApigetSourceGET /rest/organizations/{organizationId}/sources/{sourceId}Get a single source
SourcesApigetSourceSchedulesGET /rest/organizations/{organizationId}/sources/{sourceId}/schedulesGet all source schedules
SourcesApigetSourceSnapshotGET /rest/organizations/{organizationId}/sources/{sourceId}/configuration/snapshotGet the snapshot of the source configuration at the provided activity.
SourcesApigetSourcesGET /rest/organizations/{organizationId}/sourcesGet a subset of sources for an organization
SourcesApigetSourcesAndPageInformationsGET /rest/organizations/{organizationId}/sources/pagesGet a page containing a subset of sources for an organization.
SourcesApigetSourcesAndPageInformationsByIdsPOST /rest/organizations/{organizationId}/sources/pages/idsGet a page containing a subset of sources by ids for an organization.
SourcesApigetSourcesAndPageInformationsProjectIdGET /rest/organizations/{organizationId}/sources/pages/projectGet a page containing a subset of sources part of a project id. With the total number of sources and the total number of pages
SourcesApiincrementalRefreshPOST /rest/organizations/{organizationId}/sources/{sourceId}/incrementalRefreshApply an incremental refresh operation on a source
SourcesApipauseRefreshPOST /rest/organizations/{organizationId}/sources/{sourceId}/pauseRefreshPause the current refresh operation on a source
SourcesApirebuildPOST /rest/organizations/{organizationId}/sources/{sourceId}/rebuildApply a rebuild operation on a source
SourcesApiremoveFieldDELETE /rest/organizations/{organizationId}/sources/fields/{fieldId}Removes a specific field from an organization
SourcesApiremoveFieldsDELETE /rest/organizations/{organizationId}/sources/fields/batch/deleteRemoves fields from an organization
SourcesApiresumeRefreshPOST /rest/organizations/{organizationId}/sources/{sourceId}/resumeRefreshResume the current refresh operation on a source
SourcesApisetPushRefreshStatusPOST /rest/organizations/{organizationId}/sources/{sourceId}/pushRefreshSets the refreshing state of a push source
SourcesApistartRefreshPOST /rest/organizations/{organizationId}/sources/{sourceId}/startRefreshStart a refresh operation on a source
SourcesApistopRefreshPOST /rest/organizations/{organizationId}/sources/{sourceId}/stopRefreshStop the current refresh operation on a source
SourcesApiupdateFieldPUT /rest/organizations/{organizationId}/sources/fields/{fieldId}Update a field for an organization
SourcesApiupdateFieldsPUT /rest/organizations/{organizationId}/sources/fields/batch/updateUpdate a field for an organization
SourcesApiupdateRawSourcePUT /rest/organizations/{organizationId}/sources/{sourceId}/rawUpdate a source from raw configuration
SourcesApiupdateSourcePUT /rest/organizations/{organizationId}/sources/{sourceId}Update a source from simple configuration
SourcesApiupdateSourcePermissionsPUT /rest/organizations/{organizationId}/sources/{sourceId}/permissions/updateUpdate source permissions
SourcesApiupdateSourceSchedulePUT /rest/organizations/{organizationId}/sources/{sourceId}/schedules/{scheduleId}Update a source schedule

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