naftiko: 1.0.0-alpha2 info: label: GitLab API — usage_data description: 'GitLab API — usage_data. 7 operations. Lead operation: Track usage data event. Self-contained Naftiko capability covering one Gitlab Ci business surface.' tags: - Gitlab Ci - usage_data created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: GITLAB_CI_API_KEY: GITLAB_CI_API_KEY capability: consumes: - type: http namespace: gitlab-ci-usage-data baseUri: https://gitlab.com description: GitLab API — usage_data business capability. Self-contained, no shared references. resources: - name: api-v4-usage_data-increment_counter path: /api/v4/usage_data/increment_counter operations: - name: postapiv4usagedataincrementcounter method: POST description: Track usage data event outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: postApiV4UsageDataIncrementCounter in: body type: string required: true - name: api-v4-usage_data-increment_unique_users path: /api/v4/usage_data/increment_unique_users operations: - name: postapiv4usagedataincrementuniqueusers method: POST description: Track usage data event for the current user outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: postApiV4UsageDataIncrementUniqueUsers in: body type: string required: true - name: api-v4-usage_data-non_sql_metrics path: /api/v4/usage_data/non_sql_metrics operations: - name: getapiv4usagedatanonsqlmetrics method: GET description: Get Non SQL usage ping metrics outputRawFormat: json outputParameters: - name: result type: object value: $. - name: api-v4-usage_data-queries path: /api/v4/usage_data/queries operations: - name: getapiv4usagedataqueries method: GET description: Get raw SQL queries for usage data SQL metrics outputRawFormat: json outputParameters: - name: result type: object value: $. - name: api-v4-usage_data-service_ping path: /api/v4/usage_data/service_ping operations: - name: getapiv4usagedataserviceping method: GET description: Get the latest ServicePing payload outputRawFormat: json outputParameters: - name: result type: object value: $. - name: api-v4-usage_data-track_event path: /api/v4/usage_data/track_event operations: - name: postapiv4usagedatatrackevent method: POST description: Track gitlab internal events outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: postApiV4UsageDataTrackEvent in: body type: string required: true - name: api-v4-usage_data-track_events path: /api/v4/usage_data/track_events operations: - name: postapiv4usagedatatrackevents method: POST description: Track multiple gitlab internal events outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: postApiV4UsageDataTrackEvents in: body type: string required: true exposes: - type: rest namespace: gitlab-ci-usage-data-rest port: 8080 description: REST adapter for GitLab API — usage_data. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/v4/usage-data/increment-counter name: api-v4-usage-data-increment-counter description: REST surface for api-v4-usage_data-increment_counter. operations: - method: POST name: postapiv4usagedataincrementcounter description: Track usage data event call: gitlab-ci-usage-data.postapiv4usagedataincrementcounter with: postApiV4UsageDataIncrementCounter: rest.postApiV4UsageDataIncrementCounter outputParameters: - type: object mapping: $. - path: /v1/api/v4/usage-data/increment-unique-users name: api-v4-usage-data-increment-unique-users description: REST surface for api-v4-usage_data-increment_unique_users. operations: - method: POST name: postapiv4usagedataincrementuniqueusers description: Track usage data event for the current user call: gitlab-ci-usage-data.postapiv4usagedataincrementuniqueusers with: postApiV4UsageDataIncrementUniqueUsers: rest.postApiV4UsageDataIncrementUniqueUsers outputParameters: - type: object mapping: $. - path: /v1/api/v4/usage-data/non-sql-metrics name: api-v4-usage-data-non-sql-metrics description: REST surface for api-v4-usage_data-non_sql_metrics. operations: - method: GET name: getapiv4usagedatanonsqlmetrics description: Get Non SQL usage ping metrics call: gitlab-ci-usage-data.getapiv4usagedatanonsqlmetrics outputParameters: - type: object mapping: $. - path: /v1/api/v4/usage-data/queries name: api-v4-usage-data-queries description: REST surface for api-v4-usage_data-queries. operations: - method: GET name: getapiv4usagedataqueries description: Get raw SQL queries for usage data SQL metrics call: gitlab-ci-usage-data.getapiv4usagedataqueries outputParameters: - type: object mapping: $. - path: /v1/api/v4/usage-data/service-ping name: api-v4-usage-data-service-ping description: REST surface for api-v4-usage_data-service_ping. operations: - method: GET name: getapiv4usagedataserviceping description: Get the latest ServicePing payload call: gitlab-ci-usage-data.getapiv4usagedataserviceping outputParameters: - type: object mapping: $. - path: /v1/api/v4/usage-data/track-event name: api-v4-usage-data-track-event description: REST surface for api-v4-usage_data-track_event. operations: - method: POST name: postapiv4usagedatatrackevent description: Track gitlab internal events call: gitlab-ci-usage-data.postapiv4usagedatatrackevent with: postApiV4UsageDataTrackEvent: rest.postApiV4UsageDataTrackEvent outputParameters: - type: object mapping: $. - path: /v1/api/v4/usage-data/track-events name: api-v4-usage-data-track-events description: REST surface for api-v4-usage_data-track_events. operations: - method: POST name: postapiv4usagedatatrackevents description: Track multiple gitlab internal events call: gitlab-ci-usage-data.postapiv4usagedatatrackevents with: postApiV4UsageDataTrackEvents: rest.postApiV4UsageDataTrackEvents outputParameters: - type: object mapping: $. - type: mcp namespace: gitlab-ci-usage-data-mcp port: 9090 transport: http description: MCP adapter for GitLab API — usage_data. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: track-usage-data-event description: Track usage data event hints: readOnly: false destructive: false idempotent: false call: gitlab-ci-usage-data.postapiv4usagedataincrementcounter with: postApiV4UsageDataIncrementCounter: tools.postApiV4UsageDataIncrementCounter outputParameters: - type: object mapping: $. - name: track-usage-data-event-current description: Track usage data event for the current user hints: readOnly: false destructive: false idempotent: false call: gitlab-ci-usage-data.postapiv4usagedataincrementuniqueusers with: postApiV4UsageDataIncrementUniqueUsers: tools.postApiV4UsageDataIncrementUniqueUsers outputParameters: - type: object mapping: $. - name: get-non-sql-usage-ping description: Get Non SQL usage ping metrics hints: readOnly: true destructive: false idempotent: true call: gitlab-ci-usage-data.getapiv4usagedatanonsqlmetrics outputParameters: - type: object mapping: $. - name: get-raw-sql-queries-usage description: Get raw SQL queries for usage data SQL metrics hints: readOnly: true destructive: false idempotent: true call: gitlab-ci-usage-data.getapiv4usagedataqueries outputParameters: - type: object mapping: $. - name: get-latest-serviceping-payload description: Get the latest ServicePing payload hints: readOnly: true destructive: false idempotent: true call: gitlab-ci-usage-data.getapiv4usagedataserviceping outputParameters: - type: object mapping: $. - name: track-gitlab-internal-events description: Track gitlab internal events hints: readOnly: false destructive: false idempotent: false call: gitlab-ci-usage-data.postapiv4usagedatatrackevent with: postApiV4UsageDataTrackEvent: tools.postApiV4UsageDataTrackEvent outputParameters: - type: object mapping: $. - name: track-multiple-gitlab-internal-events description: Track multiple gitlab internal events hints: readOnly: false destructive: false idempotent: false call: gitlab-ci-usage-data.postapiv4usagedatatrackevents with: postApiV4UsageDataTrackEvents: tools.postApiV4UsageDataTrackEvents outputParameters: - type: object mapping: $.