An open API service indexing awesome lists of open source software.

https://github.com/harness/ff-php-client-api

Feature Flag Client API
https://github.com/harness/ff-php-client-api

Last synced: 11 months ago
JSON representation

Feature Flag Client API

Awesome Lists containing this project

README

          

# OpenAPIClient-php

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

For more information, please visit [https://www.harness.io](https://www.harness.io).

## Installation & Usage

### Requirements

PHP 7.4 and later.
Should also work with PHP 8.0.

### Composer

To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`:

```json
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/harness/ff-php-client-api.git"
}
],
"require": {
"harness/ff-php-client-api": "*@dev"
}
}
```

Then run `composer install`

### Manual Installation

Download the files and include `autoload.php`:

```php
authenticate($authentication_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ClientApi->authenticate: ', $e->getMessage(), PHP_EOL;
}

```

## API Endpoints

All URIs are relative to *http://localhost/api/1.0*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ClientApi* | [**authenticate**](docs/Api/ClientApi.md#authenticate) | **POST** /client/auth | Authenticate with the admin server.
*ClientApi* | [**getAllSegments**](docs/Api/ClientApi.md#getallsegments) | **GET** /client/env/{environmentUUID}/target-segments | Retrieve all segments.
*ClientApi* | [**getEvaluationByIdentifier**](docs/Api/ClientApi.md#getevaluationbyidentifier) | **GET** /client/env/{environmentUUID}/target/{target}/evaluations/{feature} | Get feature evaluations for target
*ClientApi* | [**getEvaluations**](docs/Api/ClientApi.md#getevaluations) | **GET** /client/env/{environmentUUID}/target/{target}/evaluations | Get feature evaluations for target
*ClientApi* | [**getFeatureConfig**](docs/Api/ClientApi.md#getfeatureconfig) | **GET** /client/env/{environmentUUID}/feature-configs | Get all feature flags activations
*ClientApi* | [**getFeatureConfigByIdentifier**](docs/Api/ClientApi.md#getfeatureconfigbyidentifier) | **GET** /client/env/{environmentUUID}/feature-configs/{identifier} | Get feature config
*ClientApi* | [**getSegmentByIdentifier**](docs/Api/ClientApi.md#getsegmentbyidentifier) | **GET** /client/env/{environmentUUID}/target-segments/{identifier} | Retrieve a segment by identifier
*ClientApi* | [**stream**](docs/Api/ClientApi.md#stream) | **GET** /stream | Stream endpoint.
*MetricsApi* | [**postMetrics**](docs/Api/MetricsApi.md#postmetrics) | **POST** /metrics/{environment} | Send metrics to the Analytics server.

## Models

- [AuthenticationRequest](docs/Model/AuthenticationRequest.md)
- [AuthenticationRequestTarget](docs/Model/AuthenticationRequestTarget.md)
- [AuthenticationResponse](docs/Model/AuthenticationResponse.md)
- [Clause](docs/Model/Clause.md)
- [Distribution](docs/Model/Distribution.md)
- [Error](docs/Model/Error.md)
- [Evaluation](docs/Model/Evaluation.md)
- [FeatureConfig](docs/Model/FeatureConfig.md)
- [FeatureState](docs/Model/FeatureState.md)
- [KeyValue](docs/Model/KeyValue.md)
- [Metrics](docs/Model/Metrics.md)
- [MetricsData](docs/Model/MetricsData.md)
- [Pagination](docs/Model/Pagination.md)
- [Prerequisite](docs/Model/Prerequisite.md)
- [Segment](docs/Model/Segment.md)
- [Serve](docs/Model/Serve.md)
- [ServingRule](docs/Model/ServingRule.md)
- [Tag](docs/Model/Tag.md)
- [Target](docs/Model/Target.md)
- [TargetData](docs/Model/TargetData.md)
- [TargetMap](docs/Model/TargetMap.md)
- [Variation](docs/Model/Variation.md)
- [VariationMap](docs/Model/VariationMap.md)
- [WeightedVariation](docs/Model/WeightedVariation.md)

## Authorization

### ApiKeyAuth

- **Type**: API key
- **API key parameter name**: api-key
- **Location**: HTTP header

### BearerAuth

- **Type**: Bearer authentication (JWT)

## Tests

To run the tests, use:

```bash
composer install
vendor/bin/phpunit
```

## Author

cf@harness.io

## About this package

This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

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