mumia / aerospike-client-rest-php

Generated REST API stubs for PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenAPIClient-php

REST Interface for Aerospike Database.

For more information, please visit https://www.aerospike.com.

Installation & Usage

Requirements

PHP 7.2 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

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




$apiInstance = new OpenAPI\Client\Api\AdminOperationsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$user = 'user_example'; // string | user
$password = 'password_example'; // string | password
$authorization = 'authorization_example'; // string | Authorization

try {
    $apiInstance->changePassword($user, $password, $authorization);
} catch (Exception $e) {
    echo 'Exception when calling AdminOperationsApi->changePassword: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to http://localhost:8080

Class Method HTTP request Description
AdminOperationsApi changePassword PATCH /v1/admin/user/{user} Change the password of the specified user.
AdminOperationsApi createRole POST /v1/admin/role Create a role on the Aerospike cluster.
AdminOperationsApi createUser POST /v1/admin/user Create a new user.
AdminOperationsApi dropRole DELETE /v1/admin/role/{name} Remove a specific role from the Aerospike cluster.
AdminOperationsApi dropUser DELETE /v1/admin/user/{user} Remove a user.
AdminOperationsApi getRole GET /v1/admin/role/{name} Get information about a specific role.
AdminOperationsApi getRoles GET /v1/admin/role Return a list of all roles registered with the Aerospike cluster.
AdminOperationsApi getUser GET /v1/admin/user/{user} Return information about a specific user.
AdminOperationsApi getUsers GET /v1/admin/user Return a list of information about users.
AdminOperationsApi grantPrivileges POST /v1/admin/role/{name}/privilege Grant a list of privileges to a specific role.
AdminOperationsApi grantRoles POST /v1/admin/user/{user}/role Grant a set of roles to the specified user.
AdminOperationsApi revokePrivileges PATCH /v1/admin/role/{name}/privilege/delete Remove a list of privileges from a specific role.
AdminOperationsApi revokeRoles PATCH /v1/admin/user/{user}/role/delete Revoke a set of roles from the specified user.
BatchReadOperationsApi performBatchGet POST /v1/batch Return multiple records from the server in a single request.
ClusterInformationOperationsApi getClusterInfo GET /v1/cluster Return an object containing information about the Aerospike cluster.
ExecuteOperationsApi executeScanNamespace POST /v1/execute/scan/{namespace} Perform multiple operations in background scan/query.
ExecuteOperationsApi executeScanNamespaceSet POST /v1/execute/scan/{namespace}/{set} Perform multiple operations in background scan/query.
ExecuteOperationsApi executeScanStatus GET /v1/execute/scan/status/{taskId} Get status of background scan by task id.
InfoOperationsApi infoAny POST /v1/info Send a list of info commands to a random node in the cluster
InfoOperationsApi infoNode POST /v1/info/{node} Send a list of info commands to a specific node in the cluster.
KeyValueOperationsApi createRecordNamespaceKey POST /v1/kvs/{namespace}/{key} Create a new record with the provided bins into the record.
KeyValueOperationsApi createRecordNamespaceSetKey POST /v1/kvs/{namespace}/{set}/{key} Create a new record with the provided bins into the record.
KeyValueOperationsApi deleteRecordNamespaceKey DELETE /v1/kvs/{namespace}/{key} Delete the specified record.
KeyValueOperationsApi deleteRecordNamespaceSetKey DELETE /v1/kvs/{namespace}/{set}/{key} Delete the specified record.
KeyValueOperationsApi getRecordNamespaceKey GET /v1/kvs/{namespace}/{key} Return the metadata and bins for a record.
KeyValueOperationsApi getRecordNamespaceSetKey GET /v1/kvs/{namespace}/{set}/{key} Return the metadata and bins for a record.
KeyValueOperationsApi recordExistsNamespaceKey HEAD /v1/kvs/{namespace}/{key} Check if a record exists
KeyValueOperationsApi recordExistsNamespaceSetKey HEAD /v1/kvs/{namespace}/{set}/{key} Check if a record exists
KeyValueOperationsApi replaceRecordNamespaceKey PUT /v1/kvs/{namespace}/{key} Replace the bins of the specified record.
KeyValueOperationsApi replaceRecordNamespaceSetKey PUT /v1/kvs/{namespace}/{set}/{key} Replace the bins of the specified record.
KeyValueOperationsApi updateRecordNamespaceKey PATCH /v1/kvs/{namespace}/{key} Merge the provided bins into the record.
KeyValueOperationsApi updateRecordNamespaceSetKey PATCH /v1/kvs/{namespace}/{set}/{key} Merge the provided bins into the record.
OperateOperationsApi operateNamespaceKey POST /v1/operate/{namespace}/{key} Perform multiple operations atomically on the specified record.
OperateOperationsApi operateNamespaceSetKey POST /v1/operate/{namespace}/{set}/{key} Perform multiple operations atomically on the specified record.
ScanOperationsApi performScan GET /v1/scan/{namespace}/{set} Return multiple records from the server in a scan request.
ScanOperationsApi performScan1 GET /v1/scan/{namespace} Return multiple records from the server in a scan request.
SecondaryIndexMethodsApi createIndex POST /v1/index Create a secondary index.
SecondaryIndexMethodsApi dropIndex DELETE /v1/index/{namespace}/{name} Remove a secondary Index
SecondaryIndexMethodsApi getIndexStats GET /v1/index/{namespace}/{name} Get Information about a single secondary index.
SecondaryIndexMethodsApi indexInformation GET /v1/index Return information about multiple secondary indices.
TruncateOperationsApi truncateNamespace DELETE /v1/truncate/{namespace} Truncate records in a specified namespace.
TruncateOperationsApi truncateSet DELETE /v1/truncate/{namespace}/{set} Truncate records in a specified namespace and set.

Models

Authorization

All endpoints do not require authorization.

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.6.2
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

About

Generated REST API stubs for PHP

License:Apache License 2.0


Languages

Language:PHP 100.0%