Sonatype · Capability

Sonatype Lifecycle Public REST API — Advanced Search

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

Run with Naftiko SonatypeAdvanced Search

What You Can Do

GET
Searchindex — Use this method to perform an Advanced Search.
/v1/api/v2/search/advanced
GET
Getexportresults — Use this method to generate a csv file containing your search results. The default delimiter in the generated file is comma. Use the advancedSearchCSVExportDelimiter property of the Configuration REST API to change the delimiter in the gene
/v1/api/v2/search/advanced/export/csv
POST
Createsearchindexasync — Use this method to create or rebuild the index for Advanced Search. This is a resource intensive operation. Avoid creating indexes during peak usage hours.
/v1/api/v2/search/advanced/index

MCP Tools

use-this-method-perform-advanced

Use this method to perform an Advanced Search.

read-only idempotent
use-this-method-generate-csv

Use this method to generate a csv file containing your search results. The default delimiter in the generated file is comma. Use the advancedSearchCSVExportDelimiter property of the Configuration REST API to change the delimiter in the gene

read-only idempotent
use-this-method-create-rebuild

Use this method to create or rebuild the index for Advanced Search. This is a resource intensive operation. Avoid creating indexes during peak usage hours.

read-only

Capability Spec

lifecycle-advanced-search.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Sonatype Lifecycle Public REST API — Advanced Search
  description: 'Sonatype Lifecycle Public REST API — Advanced Search. 3 operations. Lead operation: Advanced Search. Self-contained
    Naftiko capability covering one Sonatype business surface.'
  tags:
  - Sonatype
  - Advanced Search
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SONATYPE_API_KEY: SONATYPE_API_KEY
capability:
  consumes:
  - type: http
    namespace: lifecycle-advanced-search
    baseUri: ''
    description: Sonatype Lifecycle Public REST API — Advanced Search business capability. Self-contained, no shared references.
    resources:
    - name: api-v2-search-advanced
      path: /api/v2/search/advanced
      operations:
      - name: searchindex
        method: GET
        description: Use this method to perform an Advanced Search.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: query
          in: query
          type: string
          description: Enter your search query here
        - name: pageSize
          in: query
          type: integer
          description: Enter the no. of results that should be visible per page
        - name: page
          in: query
          type: integer
          description: Enter the page no. for the page containing results
        - name: allComponents
          in: query
          type: boolean
          description: Set to `true` to retrieve results that include components with no violations
        - name: mode
          in: query
          type: string
    - name: api-v2-search-advanced-export-csv
      path: /api/v2/search/advanced/export/csv
      operations:
      - name: getexportresults
        method: GET
        description: Use this method to generate a csv file containing your search results. The default delimiter in the generated
          file is comma. Use the advancedSearchCSVExportDelimiter property of the Configuration REST API to change the delimiter
          in the gene
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: query
          in: query
          type: string
          description: A well-formed search query.
          required: true
        - name: pageSize
          in: query
          type: integer
          description: Enter the no. of results that should be visible per page, unset gives all results
        - name: page
          in: query
          type: integer
          description: Enter the page no. for the page containing results
        - name: allComponents
          in: query
          type: boolean
          description: Set to `true` to retrieve results that include components with no violations.
        - name: mode
          in: query
          type: string
    - name: api-v2-search-advanced-index
      path: /api/v2/search/advanced/index
      operations:
      - name: createsearchindexasync
        method: POST
        description: Use this method to create or rebuild the index for Advanced Search. This is a resource intensive operation.
          Avoid creating indexes during peak usage hours.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.SONATYPE_API_KEY}}'
  exposes:
  - type: rest
    namespace: lifecycle-advanced-search-rest
    port: 8080
    description: REST adapter for Sonatype Lifecycle Public REST API — Advanced Search. One Spectral-compliant resource per
      consumed operation, prefixed with /v1.
    resources:
    - path: /v1/api/v2/search/advanced
      name: api-v2-search-advanced
      description: REST surface for api-v2-search-advanced.
      operations:
      - method: GET
        name: searchindex
        description: Use this method to perform an Advanced Search.
        call: lifecycle-advanced-search.searchindex
        with:
          query: rest.query
          pageSize: rest.pageSize
          page: rest.page
          allComponents: rest.allComponents
          mode: rest.mode
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/search/advanced/export/csv
      name: api-v2-search-advanced-export-csv
      description: REST surface for api-v2-search-advanced-export-csv.
      operations:
      - method: GET
        name: getexportresults
        description: Use this method to generate a csv file containing your search results. The default delimiter in the generated
          file is comma. Use the advancedSearchCSVExportDelimiter property of the Configuration REST API to change the delimiter
          in the gene
        call: lifecycle-advanced-search.getexportresults
        with:
          query: rest.query
          pageSize: rest.pageSize
          page: rest.page
          allComponents: rest.allComponents
          mode: rest.mode
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/search/advanced/index
      name: api-v2-search-advanced-index
      description: REST surface for api-v2-search-advanced-index.
      operations:
      - method: POST
        name: createsearchindexasync
        description: Use this method to create or rebuild the index for Advanced Search. This is a resource intensive operation.
          Avoid creating indexes during peak usage hours.
        call: lifecycle-advanced-search.createsearchindexasync
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: lifecycle-advanced-search-mcp
    port: 9090
    transport: http
    description: MCP adapter for Sonatype Lifecycle Public REST API — Advanced Search. One tool per consumed operation, routed
      inline through this capability's consumes block.
    tools:
    - name: use-this-method-perform-advanced
      description: Use this method to perform an Advanced Search.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lifecycle-advanced-search.searchindex
      with:
        query: tools.query
        pageSize: tools.pageSize
        page: tools.page
        allComponents: tools.allComponents
        mode: tools.mode
      outputParameters:
      - type: object
        mapping: $.
    - name: use-this-method-generate-csv
      description: Use this method to generate a csv file containing your search results. The default delimiter in the generated
        file is comma. Use the advancedSearchCSVExportDelimiter property of the Configuration REST API to change the delimiter
        in the gene
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lifecycle-advanced-search.getexportresults
      with:
        query: tools.query
        pageSize: tools.pageSize
        page: tools.page
        allComponents: tools.allComponents
        mode: tools.mode
      outputParameters:
      - type: object
        mapping: $.
    - name: use-this-method-create-rebuild
      description: Use this method to create or rebuild the index for Advanced Search. This is a resource intensive operation.
        Avoid creating indexes during peak usage hours.
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: lifecycle-advanced-search.createsearchindexasync
      outputParameters:
      - type: object
        mapping: $.