Sonatype · Capability

Sonatype Lifecycle Public REST API — Policy Waiver Requests

Sonatype Lifecycle Public REST API — Policy Waiver Requests. 4 operations. Lead operation: Policy Waiver Requests. Self-contained Naftiko capability covering one Sonatype business surface.

Run with Naftiko SonatypePolicy Waiver Requests

What You Can Do

POST
Addpolicywaiverrequestbypolicyviolationid — Use this method to create a policy waiver request.
/v1/api/v2/policywaiverrequests/{ownertype}/{ownerid}/policyviolation/{policyviolationid}
POST
Reviewpolicywaiverrequest — Use this method to approve or reject a policy waiver request.
/v1/api/v2/policywaiverrequests/{ownertype}/{ownerid}/review/{policywaiverrequestid}
GET
Getpolicywaiverrequest — Use this method to retrieve policy waiver request details for the policyWaiverRequestId specified.
/v1/api/v2/policywaiverrequests/{ownertype}/{ownerid}/{policywaiverrequestid}
PUT
Updatepolicywaiverrequest — Use this method to update a policy waiver request.
/v1/api/v2/policywaiverrequests/{ownertype}/{ownerid}/{policywaiverrequestid}

MCP Tools

use-this-method-create-policy

Use this method to create a policy waiver request.

use-this-method-approve-reject

Use this method to approve or reject a policy waiver request.

use-this-method-retrieve-policy

Use this method to retrieve policy waiver request details for the policyWaiverRequestId specified.

read-only idempotent
use-this-method-update-policy

Use this method to update a policy waiver request.

idempotent

Capability Spec

lifecycle-policy-waiver-requests.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Sonatype Lifecycle Public REST API — Policy Waiver Requests
  description: 'Sonatype Lifecycle Public REST API — Policy Waiver Requests. 4 operations. Lead operation: Policy Waiver Requests.
    Self-contained Naftiko capability covering one Sonatype business surface.'
  tags:
  - Sonatype
  - Policy Waiver Requests
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SONATYPE_API_KEY: SONATYPE_API_KEY
capability:
  consumes:
  - type: http
    namespace: lifecycle-policy-waiver-requests
    baseUri: ''
    description: Sonatype Lifecycle Public REST API — Policy Waiver Requests business capability. Self-contained, no shared
      references.
    resources:
    - name: api-v2-policyWaiverRequests-ownerType-ownerId-policyViolation-policyViolationId
      path: /api/v2/policyWaiverRequests/{ownerType}/{ownerId}/policyViolation/{policyViolationId}
      operations:
      - name: addpolicywaiverrequestbypolicyviolationid
        method: POST
        description: Use this method to create a policy waiver request.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ownerType
          in: path
          type: string
          description: The scope of the policy waiver request. Possible values are application, organization, repository,
            repository_manager, repository_container.
          required: true
        - name: ownerId
          in: path
          type: string
          description: The id for the ownerType provided above. E.g. applicationId if the ownerType is application.
          required: true
        - name: policyViolationId
          in: path
          type: string
          description: The policyViolationId for the policy violation on which you want to create a policy waiver request.
            Use the Policy Violation REST API or Reports REST API to obt
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v2-policyWaiverRequests-ownerType-ownerId-review-policyWaiverRequestId
      path: /api/v2/policyWaiverRequests/{ownerType}/{ownerId}/review/{policyWaiverRequestId}
      operations:
      - name: reviewpolicywaiverrequest
        method: POST
        description: Use this method to approve or reject a policy waiver request.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ownerType
          in: path
          type: string
          description: The scope of the policy waiver request. Possible values are application, organization, repository,
            repository_manager, repository_container.
          required: true
        - name: ownerId
          in: path
          type: string
          description: The id for the ownerType provided above. E.g. applicationId if the ownerType is application.
          required: true
        - name: policyWaiverRequestId
          in: path
          type: string
          description: The policyWaiverRequestId for the policy waiver request to be approved or rejected.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v2-policyWaiverRequests-ownerType-ownerId-policyWaiverRequestId
      path: /api/v2/policyWaiverRequests/{ownerType}/{ownerId}/{policyWaiverRequestId}
      operations:
      - name: getpolicywaiverrequest
        method: GET
        description: Use this method to retrieve policy waiver request details for the policyWaiverRequestId specified.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ownerType
          in: path
          type: string
          description: The scope of the policy waiver request. Possible values are application,
          required: true
        - name: ownerId
          in: path
          type: string
          description: The id for the ownerType provided above.
          required: true
        - name: policyWaiverRequestId
          in: path
          type: string
          description: The policyWaiverRequestId for which you want to retrieve the details.
          required: true
      - name: updatepolicywaiverrequest
        method: PUT
        description: Use this method to update a policy waiver request.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ownerType
          in: path
          type: string
          description: The scope of the policy waiver request. Possible values are application, organization, repository,
            repository_manager, repository_container.
          required: true
        - name: ownerId
          in: path
          type: string
          description: The id for the ownerType provided above. E.g. applicationId if the ownerType is application.
          required: true
        - name: policyWaiverRequestId
          in: path
          type: string
          description: The id of the policy waiver request to be updated.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.SONATYPE_API_KEY}}'
  exposes:
  - type: rest
    namespace: lifecycle-policy-waiver-requests-rest
    port: 8080
    description: REST adapter for Sonatype Lifecycle Public REST API — Policy Waiver Requests. One Spectral-compliant resource
      per consumed operation, prefixed with /v1.
    resources:
    - path: /v1/api/v2/policywaiverrequests/{ownertype}/{ownerid}/policyviolation/{policyviolationid}
      name: api-v2-policywaiverrequests-ownertype-ownerid-policyviolation-policyviolationid
      description: REST surface for api-v2-policyWaiverRequests-ownerType-ownerId-policyViolation-policyViolationId.
      operations:
      - method: POST
        name: addpolicywaiverrequestbypolicyviolationid
        description: Use this method to create a policy waiver request.
        call: lifecycle-policy-waiver-requests.addpolicywaiverrequestbypolicyviolationid
        with:
          ownerType: rest.ownerType
          ownerId: rest.ownerId
          policyViolationId: rest.policyViolationId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/policywaiverrequests/{ownertype}/{ownerid}/review/{policywaiverrequestid}
      name: api-v2-policywaiverrequests-ownertype-ownerid-review-policywaiverrequestid
      description: REST surface for api-v2-policyWaiverRequests-ownerType-ownerId-review-policyWaiverRequestId.
      operations:
      - method: POST
        name: reviewpolicywaiverrequest
        description: Use this method to approve or reject a policy waiver request.
        call: lifecycle-policy-waiver-requests.reviewpolicywaiverrequest
        with:
          ownerType: rest.ownerType
          ownerId: rest.ownerId
          policyWaiverRequestId: rest.policyWaiverRequestId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/policywaiverrequests/{ownertype}/{ownerid}/{policywaiverrequestid}
      name: api-v2-policywaiverrequests-ownertype-ownerid-policywaiverrequestid
      description: REST surface for api-v2-policyWaiverRequests-ownerType-ownerId-policyWaiverRequestId.
      operations:
      - method: GET
        name: getpolicywaiverrequest
        description: Use this method to retrieve policy waiver request details for the policyWaiverRequestId specified.
        call: lifecycle-policy-waiver-requests.getpolicywaiverrequest
        with:
          ownerType: rest.ownerType
          ownerId: rest.ownerId
          policyWaiverRequestId: rest.policyWaiverRequestId
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updatepolicywaiverrequest
        description: Use this method to update a policy waiver request.
        call: lifecycle-policy-waiver-requests.updatepolicywaiverrequest
        with:
          ownerType: rest.ownerType
          ownerId: rest.ownerId
          policyWaiverRequestId: rest.policyWaiverRequestId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: lifecycle-policy-waiver-requests-mcp
    port: 9090
    transport: http
    description: MCP adapter for Sonatype Lifecycle Public REST API — Policy Waiver Requests. One tool per consumed operation,
      routed inline through this capability's consumes block.
    tools:
    - name: use-this-method-create-policy
      description: Use this method to create a policy waiver request.
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: lifecycle-policy-waiver-requests.addpolicywaiverrequestbypolicyviolationid
      with:
        ownerType: tools.ownerType
        ownerId: tools.ownerId
        policyViolationId: tools.policyViolationId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: use-this-method-approve-reject
      description: Use this method to approve or reject a policy waiver request.
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: lifecycle-policy-waiver-requests.reviewpolicywaiverrequest
      with:
        ownerType: tools.ownerType
        ownerId: tools.ownerId
        policyWaiverRequestId: tools.policyWaiverRequestId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: use-this-method-retrieve-policy
      description: Use this method to retrieve policy waiver request details for the policyWaiverRequestId specified.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lifecycle-policy-waiver-requests.getpolicywaiverrequest
      with:
        ownerType: tools.ownerType
        ownerId: tools.ownerId
        policyWaiverRequestId: tools.policyWaiverRequestId
      outputParameters:
      - type: object
        mapping: $.
    - name: use-this-method-update-policy
      description: Use this method to update a policy waiver request.
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: lifecycle-policy-waiver-requests.updatepolicywaiverrequest
      with:
        ownerType: tools.ownerType
        ownerId: tools.ownerId
        policyWaiverRequestId: tools.policyWaiverRequestId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.