All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
create_resource_instance | POST /v2/facts/{proj_id}/{env_id}/resource_instances | Create Resource Instance |
delete_resource_instance | DELETE /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id} | Delete Resource Instance |
get_resource_instance | GET /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id} | Get Resource Instance |
list_resource_instances | GET /v2/facts/{proj_id}/{env_id}/resource_instances | List Resource Instances |
update_resource_instance | PATCH /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id} | Update Resource Instance |
models::ResourceInstanceRead create_resource_instance(proj_id, env_id, resource_instance_create) Create Resource Instance
Creates a new instance inside the Permit.io system. If the instance is already created: will return 200 instead of 201, and will return the existing instance object in the response body.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
proj_id | String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | [required] | |
env_id | String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | [required] | |
resource_instance_create | ResourceInstanceCreate | [required] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_resource_instance(proj_id, env_id, instance_id) Delete Resource Instance
Deletes the instance and all its related data.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
proj_id | String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | [required] | |
env_id | String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | [required] | |
instance_id | String | Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the "slug"). | [required] |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
models::ResourceInstanceRead get_resource_instance(proj_id, env_id, instance_id) Get Resource Instance
Gets a instance, if such instance exists. Otherwise returns 404.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
proj_id | String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | [required] | |
env_id | String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | [required] | |
instance_id | String | Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the "slug"). | [required] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Vecmodels::ResourceInstanceRead list_resource_instances(proj_id, env_id, tenant, resource, detailed, page, per_page, search) List Resource Instances
Lists all the resource instances defined within an environment.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
proj_id | String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | [required] | |
env_id | String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | [required] | |
tenant | Option<String> | The tenant key or id to filter by | ||
resource | Option<String> | The resource key or id to filter by | ||
detailed | Option<bool> | If true, will return the relationships of the resource instance. | [default to false] | |
page | Option<i32> | Page number of the results to fetch, starting at 1. | [default to 1] | |
per_page | Option<i32> | The number of results per page (max 100). | [default to 30] | |
search | Option<String> | Text search for the object name or key |
Vecmodels::ResourceInstanceRead
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
models::ResourceInstanceRead update_resource_instance(proj_id, env_id, instance_id, resource_instance_update) Update Resource Instance
Partially updates the instance definition. Fields that will be provided will be completely overwritten.
Name | Type | Description | Required | Notes |
---|---|---|---|---|
proj_id | String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). | [required] | |
env_id | String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). | [required] | |
instance_id | String | Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the "slug"). | [required] | |
resource_instance_update | ResourceInstanceUpdate | [required] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]