All URIs are relative to http://localhost:4001, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
abortTransaction() | POST /app-api/v1/data/transaction/abort | Aborts a transaction |
commitTransaction() | POST /app-api/v1/data/transaction/commit | Commits a transaction |
createDocument() | POST /app-api/v1/data/colls/{coll}/docs | Creates a document in database |
createTransaction() | POST /app-api/v1/data/transaction | Creates a transaction |
deleteCollection() | DELETE /app-api/v1-api/v1/data/colls/{coll} | Deletes a collection from database |
deleteDocumentById() | DELETE /app-api/v1/data/colls/{coll}/docs/{id} | Deletes a document from database |
findDocuments() | POST /app-api/v1/data/colls/{coll}/find | Finds documents in database |
getDocumentById() | GET /app-api/v1/data/colls/{coll}/docs/{id} | Gets a document from database |
getDocuments() | GET /app-api/v1/data/colls/{coll}/docs | Gets documents from database |
updateDocumentById() | PUT /app-api/v1/data/colls/{coll}/docs/{id} | Updates a document in database |
updateManyDocuments() | POST /app-api/v1/data/colls/{coll}/updateMany | Updates many documents in database |
abortTransaction()
Aborts a transaction
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\DataApi(
// 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(),
$config
);
try {
$apiInstance->abortTransaction();
} catch (Exception $e) {
echo 'Exception when calling DataApi->abortTransaction: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
commitTransaction()
Commits a transaction
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\DataApi(
// 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(),
$config
);
try {
$apiInstance->commitTransaction();
} catch (Exception $e) {
echo 'Exception when calling DataApi->commitTransaction: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
createDocument($coll, $body): array<string,mixed>
Creates a document in database
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\DataApi(
// 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(),
$config
);
$coll = 'coll_example'; // string | The document collection name
$body = array('key' => new \stdClass); // object | The document to create
try {
$result = $apiInstance->createDocument($coll, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DataApi->createDocument: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
coll | string | The document collection name | |
body | object | The document to create |
array<string,mixed>
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
createTransaction(): string
Creates a transaction
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\DataApi(
// 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(),
$config
);
try {
$result = $apiInstance->createTransaction();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DataApi->createTransaction: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
string
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteCollection($coll)
Deletes a collection from database
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\DataApi(
// 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(),
$config
);
$coll = 'coll_example'; // string | The document collection name
try {
$apiInstance->deleteCollection($coll);
} catch (Exception $e) {
echo 'Exception when calling DataApi->deleteCollection: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
coll | string | The document collection name |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteDocumentById($coll, $id): array<string,mixed>
Deletes a document from database
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\DataApi(
// 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(),
$config
);
$coll = 'coll_example'; // string | The document collection name
$id = 'id_example'; // string | The document identifier
try {
$result = $apiInstance->deleteDocumentById($coll, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DataApi->deleteDocumentById: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
coll | string | The document collection name | |
id | string | The document identifier |
array<string,mixed>
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
findDocuments($coll, $find_documents_request): array<string,mixed>
Finds documents in database
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\DataApi(
// 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(),
$config
);
$coll = 'coll_example'; // string | The document collection name
$find_documents_request = new \OpenAPI\Client\Model\FindDocumentsRequest(); // \OpenAPI\Client\Model\FindDocumentsRequest | The query to find documents
try {
$result = $apiInstance->findDocuments($coll, $find_documents_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DataApi->findDocuments: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
coll | string | The document collection name | |
find_documents_request | \OpenAPI\Client\Model\FindDocumentsRequest | The query to find documents |
array<string,mixed>
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getDocumentById($coll, $id): array<string,mixed>
Gets a document from database
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\DataApi(
// 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(),
$config
);
$coll = 'coll_example'; // string | The document collection name
$id = 'id_example'; // string | The document identifier
try {
$result = $apiInstance->getDocumentById($coll, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DataApi->getDocumentById: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
coll | string | The document collection name | |
id | string | The document identifier |
array<string,mixed>
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getDocuments($coll): array[]
Gets documents from database
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\DataApi(
// 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(),
$config
);
$coll = 'coll_example'; // string | The document collection name
try {
$result = $apiInstance->getDocuments($coll);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DataApi->getDocuments: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
coll | string | The document collection name |
array[]
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateDocumentById($coll, $id, $data_document): array<string,mixed>
Updates a document in database
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\DataApi(
// 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(),
$config
);
$coll = 'coll_example'; // string | The document collection name
$id = 'id_example'; // string | The document identifier
$data_document = new \OpenAPI\Client\Model\DataDocument(); // \OpenAPI\Client\Model\DataDocument | The document to update
try {
$result = $apiInstance->updateDocumentById($coll, $id, $data_document);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DataApi->updateDocumentById: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
coll | string | The document collection name | |
id | string | The document identifier | |
data_document | \OpenAPI\Client\Model\DataDocument | The document to update |
array<string,mixed>
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateManyDocuments($coll, $update_many_documents_request): object
Updates many documents in database
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\DataApi(
// 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(),
$config
);
$coll = 'coll_example'; // string | The document collection name
$update_many_documents_request = new \OpenAPI\Client\Model\UpdateManyDocumentsRequest(); // \OpenAPI\Client\Model\UpdateManyDocumentsRequest | The query to find documents
try {
$result = $apiInstance->updateManyDocuments($coll, $update_many_documents_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DataApi->updateManyDocuments: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
coll | string | The document collection name | |
update_many_documents_request | \OpenAPI\Client\Model\UpdateManyDocumentsRequest | The query to find documents |
object
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]