Permit.io · Capability

Permit.io API — Resource Relations

Permit.io API — Resource Relations. 4 operations. Lead operation: List Resource Relations. Self-contained Naftiko capability covering one Permit Io business surface.

Run with Naftiko Permit IoResource Relations

What You Can Do

GET
Listresourcerelations — List Resource Relations
/v1/v2/schema/{proj-id}/{env-id}/resources/{resource-id}/relations
POST
Createresourcerelation — Create Resource Relation
/v1/v2/schema/{proj-id}/{env-id}/resources/{resource-id}/relations
GET
Getresourcerelation — Get Resource Relation
/v1/v2/schema/{proj-id}/{env-id}/resources/{resource-id}/relations/{relation-id}
DELETE
Deleteresourcerelation — Delete Resource Relation
/v1/v2/schema/{proj-id}/{env-id}/resources/{resource-id}/relations/{relation-id}

MCP Tools

list-resource-relations

List Resource Relations

read-only idempotent
create-resource-relation

Create Resource Relation

get-resource-relation

Get Resource Relation

read-only idempotent
delete-resource-relation

Delete Resource Relation

idempotent

Capability Spec

permit-io-resource-relations.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Permit.io API — Resource Relations
  description: 'Permit.io API — Resource Relations. 4 operations. Lead operation: List Resource Relations. Self-contained
    Naftiko capability covering one Permit Io business surface.'
  tags:
  - Permit Io
  - Resource Relations
  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-resource-relations
    baseUri: ''
    description: Permit.io API — Resource Relations business capability. Self-contained, no shared references.
    resources:
    - name: v2-schema-proj_id-env_id-resources-resource_id-relations
      path: /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations
      operations:
      - name: listresourcerelations
        method: GET
        description: List Resource Relations
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: resource_id
          in: path
          type: string
          description: 'Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug").'
          required: true
        - 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: env_id
          in: path
          type: string
          description: 'Either the unique id of the environment, or the URL-friendly key of the environment (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: createresourcerelation
        method: POST
        description: Create Resource Relation
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: resource_id
          in: path
          type: string
          description: 'Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug").'
          required: true
        - 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: env_id
          in: path
          type: string
          description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v2-schema-proj_id-env_id-resources-resource_id-relations-relation_id
      path: /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/relations/{relation_id}
      operations:
      - name: getresourcerelation
        method: GET
        description: Get Resource Relation
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: resource_id
          in: path
          type: string
          description: 'Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug").'
          required: true
        - name: relation_id
          in: path
          type: string
          description: 'Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the "slug").'
          required: true
        - 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: env_id
          in: path
          type: string
          description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
          required: true
      - name: deleteresourcerelation
        method: DELETE
        description: Delete Resource Relation
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: resource_id
          in: path
          type: string
          description: 'Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug").'
          required: true
        - name: relation_id
          in: path
          type: string
          description: 'Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the "slug").'
          required: true
        - 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: env_id
          in: path
          type: string
          description: 'Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").'
          required: true
    authentication:
      type: bearer
      token: '{{env.PERMIT_IO_API_KEY}}'
  exposes:
  - type: rest
    namespace: permit-io-resource-relations-rest
    port: 8080
    description: REST adapter for Permit.io API — Resource Relations. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/v2/schema/{proj-id}/{env-id}/resources/{resource-id}/relations
      name: v2-schema-proj-id-env-id-resources-resource-id-relations
      description: REST surface for v2-schema-proj_id-env_id-resources-resource_id-relations.
      operations:
      - method: GET
        name: listresourcerelations
        description: List Resource Relations
        call: permit-io-resource-relations.listresourcerelations
        with:
          resource_id: rest.resource_id
          proj_id: rest.proj_id
          env_id: rest.env_id
          page: rest.page
          per_page: rest.per_page
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createresourcerelation
        description: Create Resource Relation
        call: permit-io-resource-relations.createresourcerelation
        with:
          resource_id: rest.resource_id
          proj_id: rest.proj_id
          env_id: rest.env_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v2/schema/{proj-id}/{env-id}/resources/{resource-id}/relations/{relation-id}
      name: v2-schema-proj-id-env-id-resources-resource-id-relations-relation-id
      description: REST surface for v2-schema-proj_id-env_id-resources-resource_id-relations-relation_id.
      operations:
      - method: GET
        name: getresourcerelation
        description: Get Resource Relation
        call: permit-io-resource-relations.getresourcerelation
        with:
          resource_id: rest.resource_id
          relation_id: rest.relation_id
          proj_id: rest.proj_id
          env_id: rest.env_id
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteresourcerelation
        description: Delete Resource Relation
        call: permit-io-resource-relations.deleteresourcerelation
        with:
          resource_id: rest.resource_id
          relation_id: rest.relation_id
          proj_id: rest.proj_id
          env_id: rest.env_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: permit-io-resource-relations-mcp
    port: 9090
    transport: http
    description: MCP adapter for Permit.io API — Resource Relations. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-resource-relations
      description: List Resource Relations
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: permit-io-resource-relations.listresourcerelations
      with:
        resource_id: tools.resource_id
        proj_id: tools.proj_id
        env_id: tools.env_id
        page: tools.page
        per_page: tools.per_page
      outputParameters:
      - type: object
        mapping: $.
    - name: create-resource-relation
      description: Create Resource Relation
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: permit-io-resource-relations.createresourcerelation
      with:
        resource_id: tools.resource_id
        proj_id: tools.proj_id
        env_id: tools.env_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-resource-relation
      description: Get Resource Relation
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: permit-io-resource-relations.getresourcerelation
      with:
        resource_id: tools.resource_id
        relation_id: tools.relation_id
        proj_id: tools.proj_id
        env_id: tools.env_id
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-resource-relation
      description: Delete Resource Relation
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: permit-io-resource-relations.deleteresourcerelation
      with:
        resource_id: tools.resource_id
        relation_id: tools.relation_id
        proj_id: tools.proj_id
        env_id: tools.env_id
      outputParameters:
      - type: object
        mapping: $.