{
  "opencollection": "1.0.0",
  "info": {
    "name": "Permit.io Access Requests (EAP) Access Requests (EAP) Groups API",
    "version": "2.0.0"
  },
  "items": [
    {
      "info": {
        "name": "Groups",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Direct Group",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v2/schema/:proj_id/:env_id/groups/direct",
            "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": "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)."
              },
              {
                "name": "search",
                "value": "",
                "type": "query",
                "description": "Text search for the object name or key"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Paginated list of groups with various filters."
        },
        {
          "info": {
            "name": "Get Direct Group",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v2/schema/:proj_id/:env_id/groups/direct/:group_instance_key",
            "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": "group_instance_key",
                "value": "my_instance_group",
                "type": "path",
                "description": "Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Retrieve a specific group by its instance key."
        },
        {
          "info": {
            "name": "List group children (EAP)",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v2/schema/:proj_id/:env_id/groups/:group_instance_key/children",
            "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": "group_instance_key",
                "value": "my_instance_group",
                "type": "path",
                "description": "Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."
              },
              {
                "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 group children of a specific group."
        },
        {
          "info": {
            "name": "List group parents (EAP)",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v2/schema/:proj_id/:env_id/groups/:group_instance_key/parents",
            "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": "group_instance_key",
                "value": "my_instance_group",
                "type": "path",
                "description": "Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."
              },
              {
                "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 group parents of a specific group."
        },
        {
          "info": {
            "name": "List group users (EAP)",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v2/schema/:proj_id/:env_id/groups/:group_instance_key/users",
            "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": "group_instance_key",
                "value": "my_instance_group",
                "type": "path",
                "description": "Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."
              },
              {
                "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": "Paginated list of all users in a group."
        },
        {
          "info": {
            "name": "List group roles (EAP)",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v2/schema/:proj_id/:env_id/groups/:group_instance_key/roles",
            "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": "group_instance_key",
                "value": "my_instance_group",
                "type": "path",
                "description": "Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."
              },
              {
                "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": "Paginated list of all roles assigned to a group."
        },
        {
          "info": {
            "name": "Assign Role To Group",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/v2/schema/:proj_id/:env_id/groups/:group_instance_key/roles",
            "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": "group_instance_key",
                "value": "my_instance_group",
                "type": "path",
                "description": "Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Assign a role to a group -\nIt will create relation between the group and the resource, relationship between the resource instances and derivation from the member role to this role."
        },
        {
          "info": {
            "name": "Remove Role From Group",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/v2/schema/:proj_id/:env_id/groups/:group_instance_key/roles",
            "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": "group_instance_key",
                "value": "my_instance_group",
                "type": "path",
                "description": "Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Remove a role from a group-\nIt will remove the derivation from the member role to this role."
        },
        {
          "info": {
            "name": "Get Group",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v2/schema/:proj_id/:env_id/groups/:group_instance_key",
            "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": "group_instance_key",
                "value": "my_instance_group",
                "type": "path",
                "description": "Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Retrieve a specific group by its instance key."
        },
        {
          "info": {
            "name": "Delete Group",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/v2/schema/:proj_id/:env_id/groups/:group_instance_key",
            "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": "group_instance_key",
                "value": "my_instance_group",
                "type": "path",
                "description": "Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Delete a group by its instance key."
        },
        {
          "info": {
            "name": "List Group",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v2/schema/:proj_id/:env_id/groups",
            "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": "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)."
              },
              {
                "name": "search",
                "value": "",
                "type": "query",
                "description": "Text search for the object name or key"
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "List all groups."
        },
        {
          "info": {
            "name": "Create Group",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/v2/schema/:proj_id/:env_id/groups",
            "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": "Create a new group."
        },
        {
          "info": {
            "name": "Assign User To Group",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "{{baseUrl}}/v2/schema/:proj_id/:env_id/groups/:group_instance_key/users/:user_id",
            "params": [
              {
                "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\")."
              },
              {
                "name": "group_instance_key",
                "value": "my_instance_group",
                "type": "path",
                "description": "Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Assign a user to a group -\nThis user will inherit the group's roles."
        },
        {
          "info": {
            "name": "Remove User From Group",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/v2/schema/:proj_id/:env_id/groups/:group_instance_key/users/:user_id",
            "params": [
              {
                "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\")."
              },
              {
                "name": "group_instance_key",
                "value": "my_instance_group",
                "type": "path",
                "description": "Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Remove a user from a group-\nThis user will be removed from the member role of the group, and will no longer inherit the group's roles."
        },
        {
          "info": {
            "name": "Assign Group To Group",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "{{baseUrl}}/v2/schema/:proj_id/:env_id/groups/:group_instance_key/assign_group",
            "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": "group_instance_key",
                "value": "my_instance_group",
                "type": "path",
                "description": "Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Assign a group to a group -\nThis group will inherit the group's roles."
        },
        {
          "info": {
            "name": "Remove Group From Group",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/v2/schema/:proj_id/:env_id/groups/:group_instance_key/assign_group",
            "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": "group_instance_key",
                "value": "my_instance_group",
                "type": "path",
                "description": "Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\")."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Remove a group from a group-\nThis group will be removed from the member role of the group, and will no longer inherit the group's roles."
        }
      ]
    }
  ],
  "bundled": true
}