naftiko: 1.0.0-alpha2 info: label: Permit.io API — Policy Git Repositories description: 'Permit.io API — Policy Git Repositories. 7 operations. Lead operation: List Policy Repos. Self-contained Naftiko capability covering one Permit Io business surface.' tags: - Permit Io - Policy Git Repositories created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: PERMIT_IO_API_KEY: PERMIT_IO_API_KEY capability: consumes: - type: http namespace: permit-io-policy-git-repositories baseUri: '' description: Permit.io API — Policy Git Repositories business capability. Self-contained, no shared references. resources: - name: v2-projects-proj_id-repos path: /v2/projects/{proj_id}/repos operations: - name: listpolicyrepos method: GET description: List Policy Repos outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: proj_id in: path type: string description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").' required: true - name: page in: query type: integer description: Page number of the results to fetch, starting at 1. - name: per_page in: query type: integer description: The number of results per page (max 100). - name: createpolicyrepo method: POST description: Create Policy Repo outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: proj_id in: path type: string description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").' required: true - name: body in: body type: object description: Request body (JSON). required: true - name: v2-projects-proj_id-repos-active path: /v2/projects/{proj_id}/repos/active operations: - name: getactivepolicyrepo method: GET description: Get Active Policy Repo outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: proj_id in: path type: string description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").' required: true - name: v2-projects-proj_id-repos-disable path: /v2/projects/{proj_id}/repos/disable operations: - name: disableactivepolicyrepo method: PUT description: Disable Active Policy Repo outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: proj_id in: path type: string description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").' required: true - name: v2-projects-proj_id-repos-repo_id path: /v2/projects/{proj_id}/repos/{repo_id} operations: - name: getpolicyrepo method: GET description: Get Policy Repo outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: proj_id in: path type: string description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").' required: true - name: repo_id in: path type: string description: 'Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the "slug").' required: true - name: deletepolicyrepo method: DELETE description: Delete Policy Repo outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: proj_id in: path type: string description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").' required: true - name: repo_id in: path type: string description: 'Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the "slug").' required: true - name: v2-projects-proj_id-repos-repo_id-activate path: /v2/projects/{proj_id}/repos/{repo_id}/activate operations: - name: activatepolicyrepo method: PUT description: Activate Policy Repo outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: proj_id in: path type: string description: 'Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").' required: true - name: repo_id in: path type: string description: 'Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the "slug").' required: true authentication: type: bearer token: '{{env.PERMIT_IO_API_KEY}}' exposes: - type: rest namespace: permit-io-policy-git-repositories-rest port: 8080 description: REST adapter for Permit.io API — Policy Git Repositories. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/v2/projects/{proj-id}/repos name: v2-projects-proj-id-repos description: REST surface for v2-projects-proj_id-repos. operations: - method: GET name: listpolicyrepos description: List Policy Repos call: permit-io-policy-git-repositories.listpolicyrepos with: proj_id: rest.proj_id page: rest.page per_page: rest.per_page outputParameters: - type: object mapping: $. - method: POST name: createpolicyrepo description: Create Policy Repo call: permit-io-policy-git-repositories.createpolicyrepo with: proj_id: rest.proj_id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v2/projects/{proj-id}/repos/active name: v2-projects-proj-id-repos-active description: REST surface for v2-projects-proj_id-repos-active. operations: - method: GET name: getactivepolicyrepo description: Get Active Policy Repo call: permit-io-policy-git-repositories.getactivepolicyrepo with: proj_id: rest.proj_id outputParameters: - type: object mapping: $. - path: /v1/v2/projects/{proj-id}/repos/disable name: v2-projects-proj-id-repos-disable description: REST surface for v2-projects-proj_id-repos-disable. operations: - method: PUT name: disableactivepolicyrepo description: Disable Active Policy Repo call: permit-io-policy-git-repositories.disableactivepolicyrepo with: proj_id: rest.proj_id outputParameters: - type: object mapping: $. - path: /v1/v2/projects/{proj-id}/repos/{repo-id} name: v2-projects-proj-id-repos-repo-id description: REST surface for v2-projects-proj_id-repos-repo_id. operations: - method: GET name: getpolicyrepo description: Get Policy Repo call: permit-io-policy-git-repositories.getpolicyrepo with: proj_id: rest.proj_id repo_id: rest.repo_id outputParameters: - type: object mapping: $. - method: DELETE name: deletepolicyrepo description: Delete Policy Repo call: permit-io-policy-git-repositories.deletepolicyrepo with: proj_id: rest.proj_id repo_id: rest.repo_id outputParameters: - type: object mapping: $. - path: /v1/v2/projects/{proj-id}/repos/{repo-id}/activate name: v2-projects-proj-id-repos-repo-id-activate description: REST surface for v2-projects-proj_id-repos-repo_id-activate. operations: - method: PUT name: activatepolicyrepo description: Activate Policy Repo call: permit-io-policy-git-repositories.activatepolicyrepo with: proj_id: rest.proj_id repo_id: rest.repo_id outputParameters: - type: object mapping: $. - type: mcp namespace: permit-io-policy-git-repositories-mcp port: 9090 transport: http description: MCP adapter for Permit.io API — Policy Git Repositories. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-policy-repos description: List Policy Repos hints: readOnly: true destructive: false idempotent: true call: permit-io-policy-git-repositories.listpolicyrepos with: proj_id: tools.proj_id page: tools.page per_page: tools.per_page outputParameters: - type: object mapping: $. - name: create-policy-repo description: Create Policy Repo hints: readOnly: false destructive: false idempotent: false call: permit-io-policy-git-repositories.createpolicyrepo with: proj_id: tools.proj_id body: tools.body outputParameters: - type: object mapping: $. - name: get-active-policy-repo description: Get Active Policy Repo hints: readOnly: true destructive: false idempotent: true call: permit-io-policy-git-repositories.getactivepolicyrepo with: proj_id: tools.proj_id outputParameters: - type: object mapping: $. - name: disable-active-policy-repo description: Disable Active Policy Repo hints: readOnly: false destructive: false idempotent: true call: permit-io-policy-git-repositories.disableactivepolicyrepo with: proj_id: tools.proj_id outputParameters: - type: object mapping: $. - name: get-policy-repo description: Get Policy Repo hints: readOnly: true destructive: false idempotent: true call: permit-io-policy-git-repositories.getpolicyrepo with: proj_id: tools.proj_id repo_id: tools.repo_id outputParameters: - type: object mapping: $. - name: delete-policy-repo description: Delete Policy Repo hints: readOnly: false destructive: true idempotent: true call: permit-io-policy-git-repositories.deletepolicyrepo with: proj_id: tools.proj_id repo_id: tools.repo_id outputParameters: - type: object mapping: $. - name: activate-policy-repo description: Activate Policy Repo hints: readOnly: false destructive: false idempotent: true call: permit-io-policy-git-repositories.activatepolicyrepo with: proj_id: tools.proj_id repo_id: tools.repo_id outputParameters: - type: object mapping: $.