{
  "opencollection": "1.0.0",
  "info": {
    "name": "Permit.io Access Requests (EAP) Access Requests (EAP) Policy Git Repositories API",
    "version": "2.0.0"
  },
  "items": [
    {
      "info": {
        "name": "Policy Git Repositories",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Policy Repos",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v2/projects/:proj_id/repos",
            "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": "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 policy repositories under a given project."
        },
        {
          "info": {
            "name": "Create Policy Repo",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/v2/projects/:proj_id/repos",
            "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\")."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Creates a new policy repository configuration under a given project.\nThe given repository is created with status 'pending', it will be changed and used as the 'active' repository for\nthe policy only after a successful attempt to use it.\nThe repository main branch must be present in the remote."
        },
        {
          "info": {
            "name": "Get Active Policy Repo",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v2/projects/:proj_id/repos/active",
            "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\")."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Gets the currently active repository, if such repository exists."
        },
        {
          "info": {
            "name": "Disable Active Policy Repo",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "{{baseUrl}}/v2/projects/:proj_id/repos/disable",
            "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\")."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Disable the currently active policy repo, this action means to turn off the gitops feature.\nIf there is no active policy repo, this action will do nothing."
        },
        {
          "info": {
            "name": "Activate Policy Repo",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "{{baseUrl}}/v2/projects/:proj_id/repos/:repo_id/activate",
            "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": "repo_id",
                "value": "my_policy_repo",
                "type": "path",
                "description": "Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\")."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Disable the currently active policy repo, this action means to turn off the gitops feature.\nIf there is no active policy repo, this action will do nothing."
        },
        {
          "info": {
            "name": "Get Policy Repo",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/v2/projects/:proj_id/repos/:repo_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": "repo_id",
                "value": "my_policy_repo",
                "type": "path",
                "description": "Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\")."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Gets a single repository matching the given repo_id, if such repository exists."
        },
        {
          "info": {
            "name": "Delete Policy Repo",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/v2/projects/:proj_id/repos/:repo_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": "repo_id",
                "value": "my_policy_repo",
                "type": "path",
                "description": "Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\")."
              }
            ],
            "auth": {
              "type": "bearer",
              "token": "{{bearerToken}}"
            }
          },
          "docs": "Deletes an environment and all its related data."
        }
      ]
    }
  ],
  "bundled": true
}