naftiko: 1.0.0-alpha2 info: label: Swetrix Admin API — Views description: 'Swetrix Admin API — Views. 5 operations. Lead operation: List Project Views. Self-contained Naftiko capability covering one Swetrix business surface.' tags: - Swetrix - Views created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: SWETRIX_API_KEY: SWETRIX_API_KEY capability: consumes: - type: http namespace: admin-views baseUri: https://api.swetrix.com description: Swetrix Admin API — Views business capability. Self-contained, no shared references. resources: - name: v1-project-pid-views path: /v1/project/{pid}/views operations: - name: listviews method: GET description: List Project Views outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: pid in: path type: string description: Project ID required: true - name: createview method: POST description: Create Project View outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: pid in: path type: string description: Project ID required: true - name: body in: body type: object description: Request body (JSON). required: true - name: v1-project-pid-views-viewId path: /v1/project/{pid}/views/{viewId} operations: - name: getview method: GET description: Get Project View outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: pid in: path type: string required: true - name: viewId in: path type: string required: true - name: updateview method: PATCH description: Update Project View outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: pid in: path type: string required: true - name: viewId in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: true - name: deleteview method: DELETE description: Delete Project View outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: pid in: path type: string required: true - name: viewId in: path type: string required: true authentication: type: apikey key: X-Api-Key value: '{{env.SWETRIX_API_KEY}}' placement: header exposes: - type: rest namespace: admin-views-rest port: 8080 description: REST adapter for Swetrix Admin API — Views. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/v1/project/{pid}/views name: v1-project-pid-views description: REST surface for v1-project-pid-views. operations: - method: GET name: listviews description: List Project Views call: admin-views.listviews with: pid: rest.pid outputParameters: - type: object mapping: $. - method: POST name: createview description: Create Project View call: admin-views.createview with: pid: rest.pid body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v1/project/{pid}/views/{viewid} name: v1-project-pid-views-viewid description: REST surface for v1-project-pid-views-viewId. operations: - method: GET name: getview description: Get Project View call: admin-views.getview with: pid: rest.pid viewId: rest.viewId outputParameters: - type: object mapping: $. - method: PATCH name: updateview description: Update Project View call: admin-views.updateview with: pid: rest.pid viewId: rest.viewId body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: deleteview description: Delete Project View call: admin-views.deleteview with: pid: rest.pid viewId: rest.viewId outputParameters: - type: object mapping: $. - type: mcp namespace: admin-views-mcp port: 9090 transport: http description: MCP adapter for Swetrix Admin API — Views. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-project-views description: List Project Views hints: readOnly: true destructive: false idempotent: true call: admin-views.listviews with: pid: tools.pid outputParameters: - type: object mapping: $. - name: create-project-view description: Create Project View hints: readOnly: false destructive: false idempotent: false call: admin-views.createview with: pid: tools.pid body: tools.body outputParameters: - type: object mapping: $. - name: get-project-view description: Get Project View hints: readOnly: true destructive: false idempotent: true call: admin-views.getview with: pid: tools.pid viewId: tools.viewId outputParameters: - type: object mapping: $. - name: update-project-view description: Update Project View hints: readOnly: false destructive: false idempotent: true call: admin-views.updateview with: pid: tools.pid viewId: tools.viewId body: tools.body outputParameters: - type: object mapping: $. - name: delete-project-view description: Delete Project View hints: readOnly: false destructive: true idempotent: true call: admin-views.deleteview with: pid: tools.pid viewId: tools.viewId outputParameters: - type: object mapping: $.