{ "opencollection": "1.0.0", "info": { "name": "Permit.io Access Requests (EAP) Access Requests (EAP) Resource Instances API", "version": "2.0.0" }, "items": [ { "info": { "name": "Resource Instances", "type": "folder" }, "items": [ { "info": { "name": "List Resource Instances Detailed", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/v2/facts/:proj_id/:env_id/resource_instances/detailed", "params": [ { "name": "proj_id", "value": "my_project", "type": "path", "description": "Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")." }, { "name": "env_id", "value": "my_environment", "type": "path", "description": "Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")." }, { "name": "tenant", "value": "", "type": "query", "description": "The tenant key or id to filter by" }, { "name": "resource", "value": "", "type": "query", "description": "The resource key or id to filter by" }, { "name": "search", "value": "", "type": "query", "description": "The resource instance key or id to filter by (supports multi-value like this url?search=key-1&search=key-2)" }, { "name": "page", "value": "", "type": "query", "description": "Page number of the results to fetch, starting at 1." }, { "name": "per_page", "value": "", "type": "query", "description": "The number of results per page (max 100)." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Lists all the resource instances defined within an environment." }, { "info": { "name": "List Resource Instances", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/v2/facts/:proj_id/:env_id/resource_instances", "params": [ { "name": "proj_id", "value": "my_project", "type": "path", "description": "Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")." }, { "name": "env_id", "value": "my_environment", "type": "path", "description": "Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")." }, { "name": "tenant", "value": "", "type": "query", "description": "The tenant key or id to filter by" }, { "name": "resource", "value": "", "type": "query", "description": "The resource key or id to filter by" }, { "name": "search", "value": "", "type": "query", "description": "The resource instance key or id to filter by (supports multi-value like this url?search=key-1&search=key-2)" }, { "name": "detailed", "value": "", "type": "query", "description": "If true, will return the relationships of the resource instance." }, { "name": "include_total_count", "value": "", "type": "query", "description": "Include total count in response(will make the request slower)" }, { "name": "page", "value": "", "type": "query", "description": "Page number of the results to fetch, starting at 1." }, { "name": "per_page", "value": "", "type": "query", "description": "The number of results per page (max 100)." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Lists all the resource instances defined within an environment." }, { "info": { "name": "Create Resource Instance", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/v2/facts/:proj_id/:env_id/resource_instances", "params": [ { "name": "proj_id", "value": "my_project", "type": "path", "description": "Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")." }, { "name": "env_id", "value": "my_environment", "type": "path", "description": "Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Creates a new instance inside the Permit.io system.\n\nIf the instance is already created: will return 200 instead of 201,\nand will return the existing instance object in the response body." }, { "info": { "name": "Get Resource Instance", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/v2/facts/:proj_id/:env_id/resource_instances/:instance_id", "params": [ { "name": "proj_id", "value": "my_project", "type": "path", "description": "Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")." }, { "name": "env_id", "value": "my_environment", "type": "path", "description": "Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")." }, { "name": "instance_id", "value": "", "type": "path", "description": "f'Either the unique id of the resource instance, or the URL-friendly key of the (i.e: file:my_file.txt).'" }, { "name": "detailed", "value": "", "type": "query", "description": "If true, will return the relationships of the resource instance." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Gets a instance, if such instance exists. Otherwise returns 404." }, { "info": { "name": "Update Resource Instance", "type": "http" }, "http": { "method": "PATCH", "url": "{{baseUrl}}/v2/facts/:proj_id/:env_id/resource_instances/:instance_id", "params": [ { "name": "proj_id", "value": "my_project", "type": "path", "description": "Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")." }, { "name": "env_id", "value": "my_environment", "type": "path", "description": "Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")." }, { "name": "instance_id", "value": "", "type": "path", "description": "f'Either the unique id of the resource instance, or the URL-friendly key of the (i.e: file:my_file.txt).'" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Partially updates the instance definition.\nFields that will be provided will be completely overwritten." }, { "info": { "name": "Delete Resource Instance", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/v2/facts/:proj_id/:env_id/resource_instances/:instance_id", "params": [ { "name": "proj_id", "value": "my_project", "type": "path", "description": "Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\")." }, { "name": "env_id", "value": "my_environment", "type": "path", "description": "Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\")." }, { "name": "instance_id", "value": "", "type": "path", "description": "f'Either the unique id of the resource instance, or the URL-friendly key of the (i.e: file:my_file.txt).'" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Deletes the instance and all its related data." } ] } ], "bundled": true }