All URIs are relative to https://localhost/v1
Method | HTTP request | Description |
---|---|---|
addResource | POST /resources | |
deleteResource | DELETE /resources/{id} | |
getResource | GET /resources/{id} | |
getResources | GET /resources | |
resourcesUploadPost | POST /resources/upload | |
updateResource | PUT /resources/{id} |
\Swagger\Client\Model\Resource addResource($resource)
Create a new resource
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
// Configure API key authorization: JWTHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Authorization-JWT', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Authorization-JWT', 'Bearer');
$api_instance = new Swagger\Client\Api\ResourcesApi();
$resource = new \Swagger\Client\Model\NewResource(); // \Swagger\Client\Model\NewResource |
try {
$result = $api_instance->addResource($resource);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ResourcesApi->addResource: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
resource | \Swagger\Client\Model\NewResource |
\Swagger\Client\Model\Resource
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Resource deleteResource($id)
Delete a resource
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
// Configure API key authorization: JWTHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Authorization-JWT', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Authorization-JWT', 'Bearer');
$api_instance = new Swagger\Client\Api\ResourcesApi();
$id = "id_example"; // string | Resource Id
try {
$result = $api_instance->deleteResource($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ResourcesApi->deleteResource: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | string | Resource Id |
\Swagger\Client\Model\Resource
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Resource getResource($id)
Get a resource
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
// Configure API key authorization: JWTHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Authorization-JWT', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Authorization-JWT', 'Bearer');
$api_instance = new Swagger\Client\Api\ResourcesApi();
$id = "id_example"; // string | Resource Id
try {
$result = $api_instance->getResource($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ResourcesApi->getResource: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | string | Resource Id |
\Swagger\Client\Model\Resource
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Resource[] getResources($type, $account_id, $scope)
Get all resources
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
// Configure API key authorization: JWTHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Authorization-JWT', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Authorization-JWT', 'Bearer');
$api_instance = new Swagger\Client\Api\ResourcesApi();
$type = "type_example"; // string |
$account_id = 56; // int |
$scope = "scope_example"; // string |
try {
$result = $api_instance->getResources($type, $account_id, $scope);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ResourcesApi->getResources: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
type | string | [optional] | |
account_id | int | [optional] | |
scope | string | [optional] |
\Swagger\Client\Model\Resource[]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Resource resourcesUploadPost($fid, $image, $description, $scope)
Upload image resource
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
// Configure API key authorization: JWTHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Authorization-JWT', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Authorization-JWT', 'Bearer');
$api_instance = new Swagger\Client\Api\ResourcesApi();
$fid = "fid_example"; // string |
$image = "/path/to/file.txt"; // \SplFileObject | image
$description = "description_example"; // string |
$scope = "scope_example"; // string |
try {
$result = $api_instance->resourcesUploadPost($fid, $image, $description, $scope);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ResourcesApi->resourcesUploadPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
fid | string | ||
image | \SplFileObject | image | |
description | string | [optional] | |
scope | string | [optional] |
\Swagger\Client\Model\Resource
- Content-Type: multipart/form-data, application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Resource updateResource($id, $resource)
Update a resource
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
// Configure API key authorization: JWTHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Authorization-JWT', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Authorization-JWT', 'Bearer');
$api_instance = new Swagger\Client\Api\ResourcesApi();
$id = "id_example"; // string | Resource Id
$resource = new \Swagger\Client\Model\UpdateResource(); // \Swagger\Client\Model\UpdateResource |
try {
$result = $api_instance->updateResource($id, $resource);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ResourcesApi->updateResource: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | string | Resource Id | |
resource | \Swagger\Client\Model\UpdateResource |
\Swagger\Client\Model\Resource
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]