neclimdul/coveo-push-api
Composer 安装命令:
composer require 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
README 文档
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-customerdata.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
| Class | Method | HTTP request | Description |
|---|---|---|---|
| FileContainerApi | organizationsOrganizationIdFilesPost | POST /organizations/{organizationId}/files | Create a file container |
| ItemApi | organizationsOrganizationIdSourcesSourceIdDocumentsBatchPut | PUT /organizations/{organizationId}/sources/{sourceId}/documents/batch | Add, update, and/or delete a batch of items |
| ItemApi | organizationsOrganizationIdSourcesSourceIdDocumentsDelete | DELETE /organizations/{organizationId}/sources/{sourceId}/documents | Delete an item and optionally its children |
| ItemApi | organizationsOrganizationIdSourcesSourceIdDocumentsOlderthanDelete | DELETE /organizations/{organizationId}/sources/{sourceId}/documents/olderthan | Delete old items |
| ItemApi | organizationsOrganizationIdSourcesSourceIdDocumentsPut | PUT /organizations/{organizationId}/sources/{sourceId}/documents | Add or update an item |
| SecurityIdentityApi | organizationsOrganizationIdProvidersProviderIdMappingsPut | PUT /organizations/{organizationId}/providers/{providerId}/mappings | Add or update an alias |
| SecurityIdentityApi | organizationsOrganizationIdProvidersProviderIdPermissionsBatchPut | PUT /organizations/{organizationId}/providers/{providerId}/permissions/batch | Add, update, and/or delete a batch of security identities |
| SecurityIdentityApi | organizationsOrganizationIdProvidersProviderIdPermissionsDelete | DELETE /organizations/{organizationId}/providers/{providerId}/permissions | Delete a security identity |
| SecurityIdentityApi | organizationsOrganizationIdProvidersProviderIdPermissionsOlderthanDelete | DELETE /organizations/{organizationId}/providers/{providerId}/permissions/olderthan | Delete old security identities |
| SecurityIdentityApi | organizationsOrganizationIdProvidersProviderIdPermissionsPut | PUT /organizations/{organizationId}/providers/{providerId}/permissions | Add or update a security identity |
| SourceStatusApi | organizationsOrganizationIdSourcesSourceIdStatusPost | POST /organizations/{organizationId}/sources/{sourceId}/status | Set the status of a Push source |
| StreamApi | organizationsOrganizationIdSourcesSourceIdStreamDeleteolderthanEpochMillisecondsPost | POST /organizations/{organizationId}/sources/{sourceId}/stream/deleteolderthan/{epochMilliseconds} | Delete old documents |
| StreamApi | organizationsOrganizationIdSourcesSourceIdStreamMergePut | PUT /organizations/{organizationId}/sources/{sourceId}/stream/merge | Merge documents of a catalog stream source |
| StreamApi | organizationsOrganizationIdSourcesSourceIdStreamOpenPost | POST /organizations/{organizationId}/sources/{sourceId}/stream/open | Open a stream |
| StreamApi | organizationsOrganizationIdSourcesSourceIdStreamStreamIdChunkPost | POST /organizations/{organizationId}/sources/{sourceId}/stream/{streamId}/chunk | Get a new chunk for a stream |
| StreamApi | organizationsOrganizationIdSourcesSourceIdStreamStreamIdClosePost | POST /organizations/{organizationId}/sources/{sourceId}/stream/{streamId}/close | Close a stream |
| StreamApi | organizationsOrganizationIdSourcesSourceIdStreamUpdatePut | PUT /organizations/{organizationId}/sources/{sourceId}/stream/update | Update a catalog stream source |
Models
- BaseIdentityBody
- CatalogStreamOutArgs
- ChunkOutArgs
- DocumentBody
- EntityUpdateResult
- Error
- GatewayTimeoutError
- Identity
- IdentityBody
- InlineUpdateBody
- MappedIdentity
- MappedIdentityBody
- OpenStreamOutArgs
- PermissionIdentityModel
- PermissionSetsModel
- PresignedUploadUrl
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.PhpNextgenClientCodegen
统计信息
- 总下载量: 3.4k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-09-03