neclimdul/coveo-push-api

The Push API allows you to *push* items and security identities, as opposed to letting standard Coveo Cloud V2 crawlers *pull* this data from a content repository. This is especially useful when you need to index content from a cloud or on-premises system for which no dedicated source type exists in

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

This package is auto-updated.

Last update: 2024-10-21 19:20:17 UTC


README

The Push API allows you to push items and security identities, as opposed to letting standard Coveo Cloud V2 crawlers pull this data from a content repository. This is especially useful when you need to index content from a cloud or on-premises system for which no dedicated source type exists in the Coveo Cloud V2 platform.

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

Getting Started

Please follow the installation procedure and then run the following:

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

use NecLimDul\Coveo\PushApi\ApiException;

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

$apiInstance = new \NecLimDul\Coveo\PushApi\Api\FileContainerApi(
    // 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 Coveo Cloud V2 organization.   **Example:** `mycoveocloudv2organizationg8tp8wu3`
$use_virtual_hosted_style_url = True; // bool | Whether to generate the presigned URL using the virtual hosted-style URL.   **Example of a virtual hosted-style url:** `https://coveo-nprod-customer-data.s3.us-east-1.amazonaws.com/proda/blobstore/mycoveocloudv2organizationg8tp8wu3/b5e8767e-8f0d-4a89-9095-1127915c89c7[...]`

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

API Endpoints

All URIs are relative to https://api.cloud.coveo.com/push/v1

ClassMethodHTTP requestDescription
FileContainerApiorganizationsOrganizationIdFilesPostPOST /organizations/{organizationId}/filesCreate a file container
ItemApiorganizationsOrganizationIdSourcesSourceIdDocumentsBatchPutPUT /organizations/{organizationId}/sources/{sourceId}/documents/batchAdd, update, and/or delete a batch of items
ItemApiorganizationsOrganizationIdSourcesSourceIdDocumentsDeleteDELETE /organizations/{organizationId}/sources/{sourceId}/documentsDelete an item and optionally its children
ItemApiorganizationsOrganizationIdSourcesSourceIdDocumentsOlderthanDeleteDELETE /organizations/{organizationId}/sources/{sourceId}/documents/olderthanDelete old items
ItemApiorganizationsOrganizationIdSourcesSourceIdDocumentsPutPUT /organizations/{organizationId}/sources/{sourceId}/documentsAdd or update an item
SecurityIdentityApiorganizationsOrganizationIdProvidersProviderIdMappingsPutPUT /organizations/{organizationId}/providers/{providerId}/mappingsAdd or update an alias
SecurityIdentityApiorganizationsOrganizationIdProvidersProviderIdPermissionsBatchPutPUT /organizations/{organizationId}/providers/{providerId}/permissions/batchAdd, update, and/or delete a batch of security identities
SecurityIdentityApiorganizationsOrganizationIdProvidersProviderIdPermissionsDeleteDELETE /organizations/{organizationId}/providers/{providerId}/permissionsDelete a security identity
SecurityIdentityApiorganizationsOrganizationIdProvidersProviderIdPermissionsOlderthanDeleteDELETE /organizations/{organizationId}/providers/{providerId}/permissions/olderthanDelete old security identities
SecurityIdentityApiorganizationsOrganizationIdProvidersProviderIdPermissionsPutPUT /organizations/{organizationId}/providers/{providerId}/permissionsAdd or update a security identity
SourceStatusApiorganizationsOrganizationIdSourcesSourceIdStatusPostPOST /organizations/{organizationId}/sources/{sourceId}/statusSet the status of a Push source
StreamApiorganizationsOrganizationIdSourcesSourceIdStreamDeleteolderthanEpochMillisecondsPostPOST /organizations/{organizationId}/sources/{sourceId}/stream/deleteolderthan/{epochMilliseconds}Delete old documents
StreamApiorganizationsOrganizationIdSourcesSourceIdStreamInlinePartialupdatePutPUT /organizations/{organizationId}/sources/{sourceId}/stream/inline/partialupdateUpdate a catalog stream source
StreamApiorganizationsOrganizationIdSourcesSourceIdStreamMergePutPUT /organizations/{organizationId}/sources/{sourceId}/stream/mergeMerge documents of a catalog stream source
StreamApiorganizationsOrganizationIdSourcesSourceIdStreamOpenPostPOST /organizations/{organizationId}/sources/{sourceId}/stream/openOpen a stream
StreamApiorganizationsOrganizationIdSourcesSourceIdStreamStreamIdChunkPostPOST /organizations/{organizationId}/sources/{sourceId}/stream/{streamId}/chunkGet a new chunk for a stream
StreamApiorganizationsOrganizationIdSourcesSourceIdStreamStreamIdClosePostPOST /organizations/{organizationId}/sources/{sourceId}/stream/{streamId}/closeClose a stream
StreamApiorganizationsOrganizationIdSourcesSourceIdStreamUpdatePutPUT /organizations/{organizationId}/sources/{sourceId}/stream/updateUpdate a catalog stream source

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: 2016-03-03T13:22:11Z
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen