All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| createResource() | POST /v2/schema/{proj_id}/{env_id}/resources | Create Resource |
| deleteResource() | DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id} | Delete Resource |
| getResource() | GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id} | Get Resource |
| listResources() | GET /v2/schema/{proj_id}/{env_id}/resources | List Resources |
| replaceResource() | PUT /v2/schema/{proj_id}/{env_id}/resources/{resource_id} | Replace Resource |
| updateResource() | PATCH /v2/schema/{proj_id}/{env_id}/resources/{resource_id} | Update Resource |
createResource($proj_id, $env_id, $resource_create): \OpenAPI\Client\Model\ResourceReadCreate Resource
Creates a new resource (a type of object you may protect with permissions).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\ResourcesApi(
// 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
);
$proj_id = 'proj_id_example'; // string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
$env_id = 'env_id_example'; // string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
$resource_create = new \OpenAPI\Client\Model\ResourceCreate(); // \OpenAPI\Client\Model\ResourceCreate
try {
$result = $apiInstance->createResource($proj_id, $env_id, $resource_create);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ResourcesApi->createResource: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| proj_id | string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | |
| env_id | string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | |
| resource_create | \OpenAPI\Client\Model\ResourceCreate |
\OpenAPI\Client\Model\ResourceRead
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteResource($proj_id, $env_id, $resource_id)Delete Resource
Deletes the resource and all its related data.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\ResourcesApi(
// 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
);
$proj_id = 'proj_id_example'; // string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
$env_id = 'env_id_example'; // string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
$resource_id = 'resource_id_example'; // string | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").
try {
$apiInstance->deleteResource($proj_id, $env_id, $resource_id);
} catch (Exception $e) {
echo 'Exception when calling ResourcesApi->deleteResource: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| proj_id | string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | |
| env_id | string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | |
| resource_id | string | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug"). |
void (empty response body)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getResource($proj_id, $env_id, $resource_id): \OpenAPI\Client\Model\ResourceReadGet Resource
Gets a single resource, if such resource exists.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\ResourcesApi(
// 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
);
$proj_id = 'proj_id_example'; // string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
$env_id = 'env_id_example'; // string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
$resource_id = 'resource_id_example'; // string | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").
try {
$result = $apiInstance->getResource($proj_id, $env_id, $resource_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ResourcesApi->getResource: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| proj_id | string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | |
| env_id | string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | |
| resource_id | string | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug"). |
\OpenAPI\Client\Model\ResourceRead
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listResources($proj_id, $env_id, $include_built_in, $page, $per_page): \OpenAPI\Client\Model\ResourceRead[]List Resources
Lists all the resources defined in your schema.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\ResourcesApi(
// 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
);
$proj_id = 'proj_id_example'; // string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
$env_id = 'env_id_example'; // string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
$include_built_in = false; // bool | Whether to include or exclude built-in resources, default is False
$page = 1; // int | Page number of the results to fetch, starting at 1.
$per_page = 30; // int | The number of results per page (max 100).
try {
$result = $apiInstance->listResources($proj_id, $env_id, $include_built_in, $page, $per_page);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ResourcesApi->listResources: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| proj_id | string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | |
| env_id | string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | |
| include_built_in | bool | Whether to include or exclude built-in resources, default is False | [optional] [default to false] |
| page | int | Page number of the results to fetch, starting at 1. | [optional] [default to 1] |
| per_page | int | The number of results per page (max 100). | [optional] [default to 30] |
\OpenAPI\Client\Model\ResourceRead[]
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
replaceResource($proj_id, $env_id, $resource_id, $resource_replace): \OpenAPI\Client\Model\ResourceReadReplace Resource
Completely replaces the resource definition. - If the resource key is changed, all role and permissions assignments for the the resource will be revoked. - If the resource key is unchanged, but some actions are removed or renamed from the resource definition, role and permissions assignments for these actions will be revoked. TODO: we need to decide if we are auto-revoking, or if we are rejecting the PUT completely while there are permissions that can be affected.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\ResourcesApi(
// 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
);
$proj_id = 'proj_id_example'; // string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
$env_id = 'env_id_example'; // string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
$resource_id = 'resource_id_example'; // string | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").
$resource_replace = new \OpenAPI\Client\Model\ResourceReplace(); // \OpenAPI\Client\Model\ResourceReplace
try {
$result = $apiInstance->replaceResource($proj_id, $env_id, $resource_id, $resource_replace);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ResourcesApi->replaceResource: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| proj_id | string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | |
| env_id | string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | |
| resource_id | string | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug"). | |
| resource_replace | \OpenAPI\Client\Model\ResourceReplace |
\OpenAPI\Client\Model\ResourceRead
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateResource($proj_id, $env_id, $resource_id, $resource_update): \OpenAPI\Client\Model\ResourceReadUpdate Resource
Partially updates the resource definition. Fields that will be provided will be completely overwritten.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OpenAPI\Client\Api\ResourcesApi(
// 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
);
$proj_id = 'proj_id_example'; // string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
$env_id = 'env_id_example'; // string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
$resource_id = 'resource_id_example'; // string | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").
$resource_update = new \OpenAPI\Client\Model\ResourceUpdate(); // \OpenAPI\Client\Model\ResourceUpdate
try {
$result = $apiInstance->updateResource($proj_id, $env_id, $resource_id, $resource_update);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ResourcesApi->updateResource: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| proj_id | string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | |
| env_id | string | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | |
| resource_id | string | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug"). | |
| resource_update | \OpenAPI\Client\Model\ResourceUpdate |
\OpenAPI\Client\Model\ResourceRead
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]