Skip to content

Add Anypoint CLI Analytics API (W-23536804) - #204

Open
shanu-nitt wants to merge 1 commit into
mulesoft:masterfrom
shanu-nitt:poc/add-anypoint-cli-analytics-api
Open

Add Anypoint CLI Analytics API (W-23536804)#204
shanu-nitt wants to merge 1 commit into
mulesoft:masterfrom
shanu-nitt:poc/add-anypoint-cli-analytics-api

Conversation

@shanu-nitt

Copy link
Copy Markdown

What

Adds the Anypoint CLI Analytics API to the Developer Hub as OpenAPI 3.0 under apis/anypoint-cli-analytics/.

This is the public API of the anypoint-cli-backend service (https://anypoint.mulesoft.com/cli/api/v1). It exposes:

  • POST /analytics/eventtrackCliEvent: Anypoint CLI command-usage telemetry (fire-and-forget, 204).
  • POST /analytics/errortrackCliError: Anypoint CLI command-error telemetry (fire-and-forget, 204).
  • POST /analytics/pdp-eventpublishPdpEvents: shared endpoint for any MuleSoft CLI plugin team to send a batch of PDP_ProductUsage events to Monitoring Cloud's Product Data Platform (PDP) via Funnel, with per-item partial acceptance (202 / 207 / 400).

Why

Publishes the CLI backend's analytics/telemetry API to the MuleSoft Developer Hub so plugin teams and AI agents can discover and consume the shared PDP ingestion endpoint. Work item: W-23536804.

How

  • Converted from the service's source spec (assets/oas/v1.yaml + schemas/*.yaml) to a single governed api.yaml.
  • Aligned to Developer Hub governance: title ends with "API", semver version, camelCase operationIds, per-operation summaries/descriptions, request-body descriptions, and response examples on every operation. Schemas carry field-level descriptions.
  • No path/query parameters, so no x-origin annotations are required.

Validation

Ran locally against the repo toolchain — all green:

  • make validate-api API=apis/anypoint-cli-analytics0 violations, 0 warnings (basic OAS + governance).
  • make validate-xoriginno violations.
  • make generate-portal → registry entry urn:api:anypoint-cli-analytics generated successfully.
  • Pre-commit and pre-push hooks passed.

Files

  • apis/anypoint-cli-analytics/api.yaml
  • apis/anypoint-cli-analytics/exchange.json

Publish the Anypoint CLI backend analytics API to the MuleSoft Developer
Hub as OpenAPI 3.0. Exposes the CLI command/error telemetry endpoints and
the shared /analytics/pdp-event endpoint used by CLI plugin teams to send
PDP_ProductUsage events to Monitoring Cloud via Funnel.

Converted from the service's assets/oas/v1.yaml and aligned to Developer
Hub governance (title, semver, camelCase operationIds, descriptions,
response examples). Validated with make validate-api, validate-xorigin,
and generate-portal (0 violations, 0 warnings).

Co-authored-by: Cursor <cursoragent@cursor.com>
@shanu-nitt
shanu-nitt requested review from a team as code owners August 4, 2026 16:22

@spezzirriemiliano spezzirriemiliano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New API spec (anypoint-cli-analytics) passes all governance validators with zero violations/warnings, examples correctly match their declared regex patterns, and the spec content matches the PR description exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants