{ "opencollection": "1.0.0", "info": { "name": "Permit.io Access Requests (EAP) Access Requests (EAP) Tenants API", "version": "2.0.0" }, "items": [ { "info": { "name": "Tenants", "type": "folder" }, "items": [ { "info": { "name": "List Tenant Users", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/v2/facts/:proj_id/:env_id/tenants/:tenant_id/users", "params": [ { "name": "tenant_id", "value": "my_tenant", "type": "path", "description": "Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")." }, { "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": "search", "value": "", "type": "query", "description": "Text search for the email field" }, { "name": "role", "value": "", "type": "query", "description": "Match users with a specific role" }, { "name": "include_resource_instance_roles", "value": "", "type": "query", "description": "Should add resource instance roles" }, { "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": "List Tenant Users" }, { "info": { "name": "Add User To Tenant", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/v2/facts/:proj_id/:env_id/tenants/:tenant_id/users", "params": [ { "name": "tenant_id", "value": "my_tenant", "type": "path", "description": "Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")." }, { "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": "Create and add user to a tenant." }, { "info": { "name": "List Tenants", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/v2/facts/:proj_id/:env_id/tenants", "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": "search", "value": "", "type": "query", "description": "Text search for the tenant name or key" }, { "name": "include_total_count", "value": "", "type": "query", "description": "Include total count in response" }, { "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 tenants defined within an env." }, { "info": { "name": "Create Tenant", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/v2/facts/:proj_id/:env_id/tenants", "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 tenant inside the Permit.io system.\n\nIf the tenant is already created: will return 200 instead of 201,\nand will return the existing tenant object in the response body." }, { "info": { "name": "Get Tenant", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/v2/facts/:proj_id/:env_id/tenants/:tenant_id", "params": [ { "name": "tenant_id", "value": "my_tenant", "type": "path", "description": "Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")." }, { "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\")." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Gets a tenant, if such tenant exists. Otherwise returns 404." }, { "info": { "name": "Update Tenant", "type": "http" }, "http": { "method": "PATCH", "url": "{{baseUrl}}/v2/facts/:proj_id/:env_id/tenants/:tenant_id", "params": [ { "name": "tenant_id", "value": "my_tenant", "type": "path", "description": "Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")." }, { "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": "Partially updates the tenant definition.\nFields that will be provided will be completely overwritten." }, { "info": { "name": "Delete Tenant", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/v2/facts/:proj_id/:env_id/tenants/:tenant_id", "params": [ { "name": "tenant_id", "value": "my_tenant", "type": "path", "description": "Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")." }, { "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\")." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Deletes the tenant and all its related data." }, { "info": { "name": "Delete Tenant User", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/v2/facts/:proj_id/:env_id/tenants/:tenant_id/users/:user_id", "params": [ { "name": "tenant_id", "value": "my_tenant", "type": "path", "description": "Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\")." }, { "name": "user_id", "value": "my_user", "type": "path", "description": "Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\")." }, { "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\")." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Deletes a user under a tenant." } ] } ], "bundled": true }