neclimdul / coveo-field-api
API for Coveo Platform
2.0.0-alpha1
2024-10-21 14:15 UTC
Requires
- php: >=8.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2 || ^7.0
- neclimdul/openapi-php-helper: ^1.0@alpha
Requires (Dev)
- fakerphp/faker: ^1.20
- illuminate/support: >5.0.0
- neclimdul/openapi-php-testing: ^1.0
- php-parallel-lint/php-parallel-lint: ^1.2
- phpspec/prophecy-phpunit: ^2.0
- phpstan/phpstan: ^1.0.0
- phpunit/phpunit: ^8.0 | ^9.0
- squizlabs/php_codesniffer: ^3.7
- vimeo/psalm: ^5.9
This package is auto-updated.
Last update: 2024-10-22 18:32:36 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-field-api
Getting Started
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use NecLimDul\Coveo\FieldApi\ApiException;
// Configure OAuth2 access token for authorization: oauth2
$config = \NecLimDul\Coveo\FieldApi\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new \NecLimDul\Coveo\FieldApi\Api\FieldsApi(
// 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 /><b>Example:</b> `mycoveocloudv2organizationg8tp8wu3`
$field_model = new \NecLimDul\Coveo\FieldApi\Model\FieldModel(); // \NecLimDul\Coveo\FieldApi\Model\FieldModel
try {
$apiInstance->createField($organization_id, $field_model);
} catch (ApiException $e) {
echo 'Exception when calling FieldsApi->createField: ', $e->getMessage(), PHP_EOL;
}
API Endpoints
All URIs are relative to https://platform.cloud.coveo.com
Class | Method | HTTP request | Description |
---|---|---|---|
FieldsApi | createField | POST /rest/organizations/{organizationId}/indexes/fields | Create field |
FieldsApi | createFields | POST /rest/organizations/{organizationId}/indexes/fields/batch/create | Create fields |
FieldsApi | createFieldsBatch | POST /rest/organizations/{organizationId}/indexes/fields/batch/create/results | Create fields with individual results |
FieldsApi | getField | GET /rest/organizations/{organizationId}/indexes/fields/{fieldId} | Show field |
FieldsApi | getFields | POST /rest/organizations/{organizationId}/indexes/fields/search | List fields |
FieldsApi | removeField | DELETE /rest/organizations/{organizationId}/indexes/fields/{fieldId} | Delete field |
FieldsApi | removeFields | DELETE /rest/organizations/{organizationId}/indexes/fields/batch/delete | Delete fields |
FieldsApi | removeFieldsBatch | DELETE /rest/organizations/{organizationId}/indexes/fields/batch/delete/results | Delete fields with individual results |
FieldsApi | updateField | PUT /rest/organizations/{organizationId}/indexes/fields/{fieldId} | Update field |
FieldsApi | updateFields | PUT /rest/organizations/{organizationId}/indexes/fields/batch/update | Update fields |
FieldsApi | updateFieldsBatch | PUT /rest/organizations/{organizationId}/indexes/fields/batch/update/results | Update fields with individual results |
Models
- BatchOperationProgressModelFieldModel
- BatchOperationResourceStatusModelFieldModel
- FieldListingFilters
- FieldListingOptions
- FieldModel
- PageModelFieldModel
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