All URIs are relative to http://obs.node.obada.io, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
batchSave() | POST /obits/batch | Batch Save Obit |
get() | GET /obits/{key} | Get Obit by DID or USN |
history() | GET /obits/{key}/history | Get Obit history by DID or USN |
save() | POST /obits | Save Obit |
search() | GET /obits | Search obits by query |
batchSave($batchSaveObitRequest): \Obada\ClientHelper\Obit[]
Batch Save Obit
Returns Obit with updated checksum if data was changed.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Obada\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Obada\Api\ObitApi(
// 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
);
$batchSaveObitRequest = new \Obada\ClientHelper\BatchSaveObitRequest(); // \Obada\ClientHelper\BatchSaveObitRequest
try {
$result = $apiInstance->batchSave($batchSaveObitRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ObitApi->batchSave: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
batchSaveObitRequest | \Obada\ClientHelper\BatchSaveObitRequest | [optional] |
- Content-Type:
application/json:
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get($key): \Obada\ClientHelper\Obit
Get Obit by DID or USN
Get a single Obit by given ObitDID or USN
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Obada\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Obada\Api\ObitApi(
// 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
);
$key = did:obada:fe096095-e0f0-4918-9607-6567bd5756b5; // string | The given ObitDID or USN argument
try {
$result = $apiInstance->get($key);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ObitApi->get: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
key | string | The given ObitDID or USN argument |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
history($key): array<string,\Obada\ClientHelper\ObitHistoryValue>
Get Obit history by DID or USN
Shows the history of changes by given Obit with ObitDID or USN
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Obada\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Obada\Api\ObitApi(
// 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
);
$key = did:obada:fe096095-e0f0-4918-9607-6567bd5756b5; // string | The given ObitDID or USN argument
try {
$result = $apiInstance->history($key);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ObitApi->history: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
key | string | The given ObitDID or USN argument |
array<string,\Obada\ClientHelper\ObitHistoryValue>
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
save($saveObitRequest): \Obada\ClientHelper\Obit
Save Obit
Returns Obit with updated checksum if data was changed.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Obada\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Obada\Api\ObitApi(
// 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
);
$saveObitRequest = new \Obada\ClientHelper\SaveObitRequest(); // \Obada\ClientHelper\SaveObitRequest
try {
$result = $apiInstance->save($saveObitRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ObitApi->save: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
saveObitRequest | \Obada\ClientHelper\SaveObitRequest | [optional] |
- Content-Type:
application/json:
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
search($q, $offset): \Obada\ClientHelper\Obits
Search obits by query
Implements a fulltext search for obits by "searchTerm".
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: bearerAuth
$config = Obada\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Obada\Api\ObitApi(
// 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
);
$q = fe403a1afe16203f4b8bb3a0e72d3e17567897bc15293e4a87b663e441030aea; // string | Query argument that used for a fulltext search
$offset = 0; // int | Number of records to skip for pagination.
try {
$result = $apiInstance->search($q, $offset);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ObitApi->search: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
q | string | Query argument that used for a fulltext search | [optional] |
offset | int | Number of records to skip for pagination. | [optional] [default to 0] |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]