naftiko: 1.0.0-alpha2 info: label: Grafana HTTP API — Organizations description: 'Grafana HTTP API — Organizations. 7 operations. Lead operation: Search organizations. Self-contained Naftiko capability covering one Grafana business surface.' tags: - Grafana - Organizations created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: GRAFANA_API_KEY: GRAFANA_API_KEY capability: consumes: - type: http namespace: grafana-organizations baseUri: https://{instance}.grafana.net/api description: Grafana HTTP API — Organizations business capability. Self-contained, no shared references. resources: - name: orgs path: /orgs operations: - name: searchorgs method: GET description: Search organizations outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: query in: query type: string - name: page in: query type: integer - name: perpage in: query type: integer - name: createorg method: POST description: Create organization outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: orgs-orgId path: /orgs/{orgId} operations: - name: getorgbyid method: GET description: Get organization by ID outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: orgId in: path type: integer required: true - name: updateorg method: PUT description: Update organization outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: orgId in: path type: integer required: true - name: body in: body type: object description: Request body (JSON). required: true - name: deleteorg method: DELETE description: Delete organization outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: orgId in: path type: integer required: true - name: orgs-orgId-users path: /orgs/{orgId}/users operations: - name: getorgusers method: GET description: Get users in organization outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: orgId in: path type: integer required: true - name: addorguser method: POST description: Add user to organization outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: orgId in: path type: integer required: true - name: body in: body type: object description: Request body (JSON). required: true authentication: type: bearer token: '{{env.GRAFANA_API_KEY}}' exposes: - type: rest namespace: grafana-organizations-rest port: 8080 description: REST adapter for Grafana HTTP API — Organizations. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/orgs name: orgs description: REST surface for orgs. operations: - method: GET name: searchorgs description: Search organizations call: grafana-organizations.searchorgs with: query: rest.query page: rest.page perpage: rest.perpage outputParameters: - type: object mapping: $. - method: POST name: createorg description: Create organization call: grafana-organizations.createorg with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/orgs/{orgid} name: orgs-orgid description: REST surface for orgs-orgId. operations: - method: GET name: getorgbyid description: Get organization by ID call: grafana-organizations.getorgbyid with: orgId: rest.orgId outputParameters: - type: object mapping: $. - method: PUT name: updateorg description: Update organization call: grafana-organizations.updateorg with: orgId: rest.orgId body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: deleteorg description: Delete organization call: grafana-organizations.deleteorg with: orgId: rest.orgId outputParameters: - type: object mapping: $. - path: /v1/orgs/{orgid}/users name: orgs-orgid-users description: REST surface for orgs-orgId-users. operations: - method: GET name: getorgusers description: Get users in organization call: grafana-organizations.getorgusers with: orgId: rest.orgId outputParameters: - type: object mapping: $. - method: POST name: addorguser description: Add user to organization call: grafana-organizations.addorguser with: orgId: rest.orgId body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: grafana-organizations-mcp port: 9090 transport: http description: MCP adapter for Grafana HTTP API — Organizations. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: search-organizations description: Search organizations hints: readOnly: true destructive: false idempotent: true call: grafana-organizations.searchorgs with: query: tools.query page: tools.page perpage: tools.perpage outputParameters: - type: object mapping: $. - name: create-organization description: Create organization hints: readOnly: false destructive: false idempotent: false call: grafana-organizations.createorg with: body: tools.body outputParameters: - type: object mapping: $. - name: get-organization-id description: Get organization by ID hints: readOnly: true destructive: false idempotent: true call: grafana-organizations.getorgbyid with: orgId: tools.orgId outputParameters: - type: object mapping: $. - name: update-organization description: Update organization hints: readOnly: false destructive: false idempotent: true call: grafana-organizations.updateorg with: orgId: tools.orgId body: tools.body outputParameters: - type: object mapping: $. - name: delete-organization description: Delete organization hints: readOnly: false destructive: true idempotent: true call: grafana-organizations.deleteorg with: orgId: tools.orgId outputParameters: - type: object mapping: $. - name: get-users-organization description: Get users in organization hints: readOnly: true destructive: false idempotent: true call: grafana-organizations.getorgusers with: orgId: tools.orgId outputParameters: - type: object mapping: $. - name: add-user-organization description: Add user to organization hints: readOnly: false destructive: false idempotent: false call: grafana-organizations.addorguser with: orgId: tools.orgId body: tools.body outputParameters: - type: object mapping: $.