|
| 1 | +# Databox |
| 2 | + |
| 3 | +Push API resources Open API documentation |
| 4 | + |
| 5 | + |
| 6 | +## Installation & Usage |
| 7 | + |
| 8 | +### Requirements |
| 9 | + |
| 10 | +PHP 7.4 and later. |
| 11 | +Should also work with PHP 8.0. |
| 12 | + |
| 13 | +### Composer |
| 14 | + |
| 15 | +To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`: |
| 16 | + |
| 17 | +```json |
| 18 | +{ |
| 19 | + "repositories": [ |
| 20 | + { |
| 21 | + "type": "vcs", |
| 22 | + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" |
| 23 | + } |
| 24 | + ], |
| 25 | + "require": { |
| 26 | + "GIT_USER_ID/GIT_REPO_ID": "*@dev" |
| 27 | + } |
| 28 | +} |
| 29 | +``` |
| 30 | + |
| 31 | +Then run `composer install` |
| 32 | + |
| 33 | +### Manual Installation |
| 34 | + |
| 35 | +Download the files and include `autoload.php`: |
| 36 | + |
| 37 | +```php |
| 38 | +<?php |
| 39 | +require_once('/path/to/Databox/vendor/autoload.php'); |
| 40 | +``` |
| 41 | + |
| 42 | +## Getting Started |
| 43 | + |
| 44 | +Please follow the [installation procedure](#installation--usage) and then run the following: |
| 45 | + |
| 46 | +```php |
| 47 | +<?php |
| 48 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | +// Configure HTTP basic authorization: basicAuth |
| 53 | +$config = Databox\Configuration::getDefaultConfiguration() |
| 54 | + ->setUsername('YOUR_USERNAME') |
| 55 | + ->setPassword('YOUR_PASSWORD'); |
| 56 | + |
| 57 | + |
| 58 | +$apiInstance = new Databox\Api\DefaultApi( |
| 59 | + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. |
| 60 | + // This is optional, `GuzzleHttp\Client` will be used as default. |
| 61 | + new GuzzleHttp\Client(), |
| 62 | + $config |
| 63 | +); |
| 64 | + |
| 65 | +try { |
| 66 | + $apiInstance->dataDelete(); |
| 67 | +} catch (Exception $e) { |
| 68 | + echo 'Exception when calling DefaultApi->dataDelete: ', $e->getMessage(), PHP_EOL; |
| 69 | +} |
| 70 | + |
| 71 | +``` |
| 72 | + |
| 73 | +## API Endpoints |
| 74 | + |
| 75 | +All URIs are relative to *https://push.databox.com* |
| 76 | + |
| 77 | +Class | Method | HTTP request | Description |
| 78 | +------------ | ------------- | ------------- | ------------- |
| 79 | +*DefaultApi* | [**dataDelete**](docs/Api/DefaultApi.md#datadelete) | **DELETE** /data | |
| 80 | +*DefaultApi* | [**dataMetricKeyDelete**](docs/Api/DefaultApi.md#datametrickeydelete) | **DELETE** /data/{metricKey} | |
| 81 | +*DefaultApi* | [**dataPost**](docs/Api/DefaultApi.md#datapost) | **POST** /data | |
| 82 | +*DefaultApi* | [**metrickeysGet**](docs/Api/DefaultApi.md#metrickeysget) | **GET** /metrickeys | |
| 83 | +*DefaultApi* | [**metrickeysPost**](docs/Api/DefaultApi.md#metrickeyspost) | **POST** /metrickeys | |
| 84 | +*DefaultApi* | [**pingGet**](docs/Api/DefaultApi.md#pingget) | **GET** /ping | |
| 85 | + |
| 86 | +## Models |
| 87 | + |
| 88 | +- [ApiResponse](docs/Model/ApiResponse.md) |
| 89 | +- [PushData](docs/Model/PushData.md) |
| 90 | +- [PushDataAttribute](docs/Model/PushDataAttribute.md) |
| 91 | +- [State](docs/Model/State.md) |
| 92 | + |
| 93 | +## Authorization |
| 94 | + |
| 95 | +Authentication schemes defined for the API: |
| 96 | +### basicAuth |
| 97 | + |
| 98 | +- **Type**: HTTP basic authentication |
| 99 | + |
| 100 | +## Tests |
| 101 | + |
| 102 | +To run the tests, use: |
| 103 | + |
| 104 | +```bash |
| 105 | +composer install |
| 106 | +vendor/bin/phpunit |
| 107 | +``` |
| 108 | + |
| 109 | +## Author |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | +## About this package |
| 114 | + |
| 115 | +This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: |
| 116 | + |
| 117 | +- API version: `0.4.1` |
| 118 | + - Package version: `2.1.3` |
| 119 | + - Generator version: `7.6.0` |
| 120 | +- Build package: `org.openapitools.codegen.languages.PhpClientCodegen` |
0 commit comments