Sonatype · Capability

Sonatype Lifecycle Public REST API — Organizations

Sonatype Lifecycle Public REST API — Organizations. 6 operations. Lead operation: Organizations. Self-contained Naftiko capability covering one Sonatype business surface.

Run with Naftiko SonatypeOrganizations

What You Can Do

GET
Getorganizations — Use this method to retrieve organizations with names matching those specified or all if not specified.
/v1/api/v2/organizations
POST
Addorganization — Use this method to add a new organization.
/v1/api/v2/organizations
GET
Getorganizationsbyids — Use this method to retrieve organizations by their internal IDs.
/v1/api/v2/organizations/byid
DELETE
Deleteorganization — Use this method to delete an existing organization, by providing the organization id.
/v1/api/v2/organizations/{organizationid}
GET
Getorganization — Use this method to retrieve the details of an organization by providing the organization id.
/v1/api/v2/organizations/{organizationid}
PUT
Moveorganization — Use this method to change the parent organization.
/v1/api/v2/organizations/{organizationid}/move/destination/{destinationid}

MCP Tools

use-this-method-retrieve-organizations

Use this method to retrieve organizations with names matching those specified or all if not specified.

read-only idempotent
use-this-method-add-new

Use this method to add a new organization.

use-this-method-retrieve-organizations-2

Use this method to retrieve organizations by their internal IDs.

read-only idempotent
use-this-method-delete-existing

Use this method to delete an existing organization, by providing the organization id.

idempotent
use-this-method-retrieve-details

Use this method to retrieve the details of an organization by providing the organization id.

read-only idempotent
use-this-method-change-parent

Use this method to change the parent organization.

idempotent

Capability Spec

lifecycle-organizations.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Sonatype Lifecycle Public REST API — Organizations
  description: 'Sonatype Lifecycle Public REST API — Organizations. 6 operations. Lead operation: Organizations. Self-contained
    Naftiko capability covering one Sonatype business surface.'
  tags:
  - Sonatype
  - Organizations
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SONATYPE_API_KEY: SONATYPE_API_KEY
capability:
  consumes:
  - type: http
    namespace: lifecycle-organizations
    baseUri: ''
    description: Sonatype Lifecycle Public REST API — Organizations business capability. Self-contained, no shared references.
    resources:
    - name: api-v2-organizations
      path: /api/v2/organizations
      operations:
      - name: getorganizations
        method: GET
        description: Use this method to retrieve organizations with names matching those specified or all if not specified.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: organizationName
          in: query
          type: array
          description: Enter the organization names.
      - name: addorganization
        method: POST
        description: Use this method to add a new organization.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-v2-organizations-byid
      path: /api/v2/organizations/byid
      operations:
      - name: getorganizationsbyids
        method: GET
        description: Use this method to retrieve organizations by their internal IDs.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: query
          type: array
          description: Enter the internal organization IDs.
    - name: api-v2-organizations-organizationId
      path: /api/v2/organizations/{organizationId}
      operations:
      - name: deleteorganization
        method: DELETE
        description: Use this method to delete an existing organization, by providing the organization id.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: organizationId
          in: path
          type: string
          description: Enter the organization id to be deleted.
          required: true
      - name: getorganization
        method: GET
        description: Use this method to retrieve the details of an organization by providing the organization id.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: organizationId
          in: path
          type: string
          description: Enter the organization id.
          required: true
    - name: api-v2-organizations-organizationId-move-destination-destinationId
      path: /api/v2/organizations/{organizationId}/move/destination/{destinationId}
      operations:
      - name: moveorganization
        method: PUT
        description: Use this method to change the parent organization.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: organizationId
          in: path
          type: string
          description: Enter the id for the organization to be moved under the new parent.
          required: true
        - name: destinationId
          in: path
          type: string
          description: Enter the id for the new parent organization.
          required: true
        - name: failEarlyOnError
          in: query
          type: boolean
    authentication:
      type: bearer
      token: '{{env.SONATYPE_API_KEY}}'
  exposes:
  - type: rest
    namespace: lifecycle-organizations-rest
    port: 8080
    description: REST adapter for Sonatype Lifecycle Public REST API — Organizations. One Spectral-compliant resource per
      consumed operation, prefixed with /v1.
    resources:
    - path: /v1/api/v2/organizations
      name: api-v2-organizations
      description: REST surface for api-v2-organizations.
      operations:
      - method: GET
        name: getorganizations
        description: Use this method to retrieve organizations with names matching those specified or all if not specified.
        call: lifecycle-organizations.getorganizations
        with:
          organizationName: rest.organizationName
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: addorganization
        description: Use this method to add a new organization.
        call: lifecycle-organizations.addorganization
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/organizations/byid
      name: api-v2-organizations-byid
      description: REST surface for api-v2-organizations-byid.
      operations:
      - method: GET
        name: getorganizationsbyids
        description: Use this method to retrieve organizations by their internal IDs.
        call: lifecycle-organizations.getorganizationsbyids
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/organizations/{organizationid}
      name: api-v2-organizations-organizationid
      description: REST surface for api-v2-organizations-organizationId.
      operations:
      - method: DELETE
        name: deleteorganization
        description: Use this method to delete an existing organization, by providing the organization id.
        call: lifecycle-organizations.deleteorganization
        with:
          organizationId: rest.organizationId
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: getorganization
        description: Use this method to retrieve the details of an organization by providing the organization id.
        call: lifecycle-organizations.getorganization
        with:
          organizationId: rest.organizationId
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/organizations/{organizationid}/move/destination/{destinationid}
      name: api-v2-organizations-organizationid-move-destination-destinationid
      description: REST surface for api-v2-organizations-organizationId-move-destination-destinationId.
      operations:
      - method: PUT
        name: moveorganization
        description: Use this method to change the parent organization.
        call: lifecycle-organizations.moveorganization
        with:
          organizationId: rest.organizationId
          destinationId: rest.destinationId
          failEarlyOnError: rest.failEarlyOnError
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: lifecycle-organizations-mcp
    port: 9090
    transport: http
    description: MCP adapter for Sonatype Lifecycle Public REST API — Organizations. One tool per consumed operation, routed
      inline through this capability's consumes block.
    tools:
    - name: use-this-method-retrieve-organizations
      description: Use this method to retrieve organizations with names matching those specified or all if not specified.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lifecycle-organizations.getorganizations
      with:
        organizationName: tools.organizationName
      outputParameters:
      - type: object
        mapping: $.
    - name: use-this-method-add-new
      description: Use this method to add a new organization.
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: lifecycle-organizations.addorganization
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: use-this-method-retrieve-organizations-2
      description: Use this method to retrieve organizations by their internal IDs.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lifecycle-organizations.getorganizationsbyids
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: use-this-method-delete-existing
      description: Use this method to delete an existing organization, by providing the organization id.
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: lifecycle-organizations.deleteorganization
      with:
        organizationId: tools.organizationId
      outputParameters:
      - type: object
        mapping: $.
    - name: use-this-method-retrieve-details
      description: Use this method to retrieve the details of an organization by providing the organization id.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lifecycle-organizations.getorganization
      with:
        organizationId: tools.organizationId
      outputParameters:
      - type: object
        mapping: $.
    - name: use-this-method-change-parent
      description: Use this method to change the parent organization.
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: lifecycle-organizations.moveorganization
      with:
        organizationId: tools.organizationId
        destinationId: tools.destinationId
        failEarlyOnError: tools.failEarlyOnError
      outputParameters:
      - type: object
        mapping: $.