naftiko: 1.0.0-alpha2 info: label: Bitbucket API — Reports description: 'Bitbucket API — Reports. 9 operations. Lead operation: List reports. Self-contained Naftiko capability covering one Bitbucket business surface.' tags: - Bitbucket - Reports created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: BITBUCKET_API_KEY: BITBUCKET_API_KEY capability: consumes: - type: http namespace: cloud-rest-reports baseUri: https://api.bitbucket.org/2.0 description: Bitbucket API — Reports business capability. Self-contained, no shared references. resources: - name: repositories-workspace-repo_slug-commit-commit-reports path: /repositories/{workspace}/{repo_slug}/commit/{commit}/reports operations: - name: getreportsforcommit method: GET description: List reports outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace in: path type: string description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true - name: repo_slug in: path type: string description: The repository. required: true - name: commit in: path type: string description: The commit for which to retrieve reports. required: true - name: repositories-workspace-repo_slug-commit-commit-reports-reportId path: /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId} operations: - name: createorupdatereport method: PUT description: Create or update a report outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace in: path type: string description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true - name: repo_slug in: path type: string description: The repository. required: true - name: commit in: path type: string description: The commit the report belongs to. required: true - name: reportId in: path type: string description: Either the uuid or external-id of the report. required: true - name: _body in: body type: string description: The report to create or update required: true - name: getreport method: GET description: Get a report outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace in: path type: string description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true - name: repo_slug in: path type: string description: The repository. required: true - name: commit in: path type: string description: The commit the report belongs to. required: true - name: reportId in: path type: string description: Either the uuid or external-id of the report. required: true - name: deletereport method: DELETE description: Delete a report outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace in: path type: string description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true - name: repo_slug in: path type: string description: The repository. required: true - name: commit in: path type: string description: The commit the report belongs to. required: true - name: reportId in: path type: string description: Either the uuid or external-id of the report. required: true - name: repositories-workspace-repo_slug-commit-commit-reports-reportId-annotations path: /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations operations: - name: getannotationsforreport method: GET description: List annotations outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace in: path type: string description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true - name: repo_slug in: path type: string description: The repository. required: true - name: commit in: path type: string description: The commit for which to retrieve reports. required: true - name: reportId in: path type: string description: Uuid or external-if of the report for which to get annotations for. required: true - name: bulkcreateorupdateannotations method: POST description: Bulk create or update annotations outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace in: path type: string description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true - name: repo_slug in: path type: string description: The repository. required: true - name: commit in: path type: string description: The commit for which to retrieve reports. required: true - name: reportId in: path type: string description: Uuid or external-if of the report for which to get annotations for. required: true - name: _body in: body type: array description: The annotations to create or update required: true - name: repositories-workspace-repo_slug-commit-commit-reports-reportId-annotations-anno path: /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId} operations: - name: getannotation method: GET description: Get an annotation outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace in: path type: string description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true - name: repo_slug in: path type: string description: The repository. required: true - name: commit in: path type: string description: The commit the report belongs to. required: true - name: reportId in: path type: string description: Either the uuid or external-id of the report. required: true - name: annotationId in: path type: string description: Either the uuid or external-id of the annotation. required: true - name: createorupdateannotation method: PUT description: Create or update an annotation outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace in: path type: string description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true - name: repo_slug in: path type: string description: The repository. required: true - name: commit in: path type: string description: The commit the report belongs to. required: true - name: reportId in: path type: string description: Either the uuid or external-id of the report. required: true - name: annotationId in: path type: string description: Either the uuid or external-id of the annotation. required: true - name: _body in: body type: string description: The annotation to create or update required: true - name: deleteannotation method: DELETE description: Delete an annotation outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: workspace in: path type: string description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true - name: repo_slug in: path type: string description: The repository. required: true - name: commit in: path type: string description: The commit the annotation belongs to. required: true - name: reportId in: path type: string description: Either the uuid or external-id of the annotation. required: true - name: annotationId in: path type: string description: Either the uuid or external-id of the annotation. required: true exposes: - type: rest namespace: cloud-rest-reports-rest port: 8080 description: REST adapter for Bitbucket API — Reports. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/repositories/{workspace}/{repo-slug}/commit/{commit}/reports name: repositories-workspace-repo-slug-commit-commit-reports description: REST surface for repositories-workspace-repo_slug-commit-commit-reports. operations: - method: GET name: getreportsforcommit description: List reports call: cloud-rest-reports.getreportsforcommit with: workspace: rest.workspace repo_slug: rest.repo_slug commit: rest.commit outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/commit/{commit}/reports/{reportid} name: repositories-workspace-repo-slug-commit-commit-reports-reportid description: REST surface for repositories-workspace-repo_slug-commit-commit-reports-reportId. operations: - method: PUT name: createorupdatereport description: Create or update a report call: cloud-rest-reports.createorupdatereport with: workspace: rest.workspace repo_slug: rest.repo_slug commit: rest.commit reportId: rest.reportId _body: rest._body outputParameters: - type: object mapping: $. - method: GET name: getreport description: Get a report call: cloud-rest-reports.getreport with: workspace: rest.workspace repo_slug: rest.repo_slug commit: rest.commit reportId: rest.reportId outputParameters: - type: object mapping: $. - method: DELETE name: deletereport description: Delete a report call: cloud-rest-reports.deletereport with: workspace: rest.workspace repo_slug: rest.repo_slug commit: rest.commit reportId: rest.reportId outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/commit/{commit}/reports/{reportid}/annotations name: repositories-workspace-repo-slug-commit-commit-reports-reportid-annotations description: REST surface for repositories-workspace-repo_slug-commit-commit-reports-reportId-annotations. operations: - method: GET name: getannotationsforreport description: List annotations call: cloud-rest-reports.getannotationsforreport with: workspace: rest.workspace repo_slug: rest.repo_slug commit: rest.commit reportId: rest.reportId outputParameters: - type: object mapping: $. - method: POST name: bulkcreateorupdateannotations description: Bulk create or update annotations call: cloud-rest-reports.bulkcreateorupdateannotations with: workspace: rest.workspace repo_slug: rest.repo_slug commit: rest.commit reportId: rest.reportId _body: rest._body outputParameters: - type: object mapping: $. - path: /v1/repositories/{workspace}/{repo-slug}/commit/{commit}/reports/{reportid}/annotations/{annotationid} name: repositories-workspace-repo-slug-commit-commit-reports-reportid-annotations-anno description: REST surface for repositories-workspace-repo_slug-commit-commit-reports-reportId-annotations-anno. operations: - method: GET name: getannotation description: Get an annotation call: cloud-rest-reports.getannotation with: workspace: rest.workspace repo_slug: rest.repo_slug commit: rest.commit reportId: rest.reportId annotationId: rest.annotationId outputParameters: - type: object mapping: $. - method: PUT name: createorupdateannotation description: Create or update an annotation call: cloud-rest-reports.createorupdateannotation with: workspace: rest.workspace repo_slug: rest.repo_slug commit: rest.commit reportId: rest.reportId annotationId: rest.annotationId _body: rest._body outputParameters: - type: object mapping: $. - method: DELETE name: deleteannotation description: Delete an annotation call: cloud-rest-reports.deleteannotation with: workspace: rest.workspace repo_slug: rest.repo_slug commit: rest.commit reportId: rest.reportId annotationId: rest.annotationId outputParameters: - type: object mapping: $. - type: mcp namespace: cloud-rest-reports-mcp port: 9090 transport: http description: MCP adapter for Bitbucket API — Reports. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-reports description: List reports hints: readOnly: true destructive: false idempotent: true call: cloud-rest-reports.getreportsforcommit with: workspace: tools.workspace repo_slug: tools.repo_slug commit: tools.commit outputParameters: - type: object mapping: $. - name: create-update-report description: Create or update a report hints: readOnly: false destructive: false idempotent: true call: cloud-rest-reports.createorupdatereport with: workspace: tools.workspace repo_slug: tools.repo_slug commit: tools.commit reportId: tools.reportId _body: tools._body outputParameters: - type: object mapping: $. - name: get-report description: Get a report hints: readOnly: true destructive: false idempotent: true call: cloud-rest-reports.getreport with: workspace: tools.workspace repo_slug: tools.repo_slug commit: tools.commit reportId: tools.reportId outputParameters: - type: object mapping: $. - name: delete-report description: Delete a report hints: readOnly: false destructive: true idempotent: true call: cloud-rest-reports.deletereport with: workspace: tools.workspace repo_slug: tools.repo_slug commit: tools.commit reportId: tools.reportId outputParameters: - type: object mapping: $. - name: list-annotations description: List annotations hints: readOnly: true destructive: false idempotent: true call: cloud-rest-reports.getannotationsforreport with: workspace: tools.workspace repo_slug: tools.repo_slug commit: tools.commit reportId: tools.reportId outputParameters: - type: object mapping: $. - name: bulk-create-update-annotations description: Bulk create or update annotations hints: readOnly: false destructive: false idempotent: false call: cloud-rest-reports.bulkcreateorupdateannotations with: workspace: tools.workspace repo_slug: tools.repo_slug commit: tools.commit reportId: tools.reportId _body: tools._body outputParameters: - type: object mapping: $. - name: get-annotation description: Get an annotation hints: readOnly: true destructive: false idempotent: true call: cloud-rest-reports.getannotation with: workspace: tools.workspace repo_slug: tools.repo_slug commit: tools.commit reportId: tools.reportId annotationId: tools.annotationId outputParameters: - type: object mapping: $. - name: create-update-annotation description: Create or update an annotation hints: readOnly: false destructive: false idempotent: true call: cloud-rest-reports.createorupdateannotation with: workspace: tools.workspace repo_slug: tools.repo_slug commit: tools.commit reportId: tools.reportId annotationId: tools.annotationId _body: tools._body outputParameters: - type: object mapping: $. - name: delete-annotation description: Delete an annotation hints: readOnly: false destructive: true idempotent: true call: cloud-rest-reports.deleteannotation with: workspace: tools.workspace repo_slug: tools.repo_slug commit: tools.commit reportId: tools.reportId annotationId: tools.annotationId outputParameters: - type: object mapping: $.