Sonatype · Capability

Sonatype Lifecycle Public REST API — Source Control Metrics

Sonatype Lifecycle Public REST API — Source Control Metrics. 1 operations. Lead operation: Source Control Metrics. Self-contained Naftiko capability covering one Sonatype business surface.

Run with Naftiko SonatypeSource Control Metrics

What You Can Do

GET
Getsourcecontrol — Use this method to view the source control pull request metrics.
/v1/api/v2/sourcecontrolmetrics/{ownertype}/{internalownerid}

MCP Tools

use-this-method-view-source

Use this method to view the source control pull request metrics.

read-only idempotent

Capability Spec

lifecycle-source-control-metrics.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Sonatype Lifecycle Public REST API — Source Control Metrics
  description: 'Sonatype Lifecycle Public REST API — Source Control Metrics. 1 operations. Lead operation: Source Control
    Metrics. Self-contained Naftiko capability covering one Sonatype business surface.'
  tags:
  - Sonatype
  - Source Control Metrics
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SONATYPE_API_KEY: SONATYPE_API_KEY
capability:
  consumes:
  - type: http
    namespace: lifecycle-source-control-metrics
    baseUri: ''
    description: Sonatype Lifecycle Public REST API — Source Control Metrics business capability. Self-contained, no shared
      references.
    resources:
    - name: api-v2-sourceControlMetrics-ownerType-internalOwnerId
      path: /api/v2/sourceControlMetrics/{ownerType}/{internalOwnerId}
      operations:
      - name: getsourcecontrol
        method: GET
        description: Use this method to view the source control pull request metrics.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ownerType
          in: path
          type: string
          description: Select the ownerType for the pull requests.
          required: true
        - name: internalOwnerId
          in: path
          type: string
          description: Enter the ownerId corresponding to the ownerType.
          required: true
    authentication:
      type: bearer
      token: '{{env.SONATYPE_API_KEY}}'
  exposes:
  - type: rest
    namespace: lifecycle-source-control-metrics-rest
    port: 8080
    description: REST adapter for Sonatype Lifecycle Public REST API — Source Control Metrics. One Spectral-compliant resource
      per consumed operation, prefixed with /v1.
    resources:
    - path: /v1/api/v2/sourcecontrolmetrics/{ownertype}/{internalownerid}
      name: api-v2-sourcecontrolmetrics-ownertype-internalownerid
      description: REST surface for api-v2-sourceControlMetrics-ownerType-internalOwnerId.
      operations:
      - method: GET
        name: getsourcecontrol
        description: Use this method to view the source control pull request metrics.
        call: lifecycle-source-control-metrics.getsourcecontrol
        with:
          ownerType: rest.ownerType
          internalOwnerId: rest.internalOwnerId
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: lifecycle-source-control-metrics-mcp
    port: 9090
    transport: http
    description: MCP adapter for Sonatype Lifecycle Public REST API — Source Control Metrics. One tool per consumed operation,
      routed inline through this capability's consumes block.
    tools:
    - name: use-this-method-view-source
      description: Use this method to view the source control pull request metrics.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lifecycle-source-control-metrics.getsourcecontrol
      with:
        ownerType: tools.ownerType
        internalOwnerId: tools.internalOwnerId
      outputParameters:
      - type: object
        mapping: $.