SwaggerHub · Capability

SwaggerHub Registry API — APIs

SwaggerHub Registry API — APIs. 13 operations. Lead operation: Get Owner APIs. Self-contained Naftiko capability covering one Swaggerhub business surface.

Run with Naftiko SwaggerhubAPIs

What You Can Do

GET
Getownerapis — Get Owner APIs
/v1/apis/{owner}
GET
Getapiversions — Get API Versions
/v1/apis/{owner}/{api}
POST
Createorupdateapi — Create or Update API
/v1/apis/{owner}/{api}
DELETE
Deleteapi — Delete API
/v1/apis/{owner}/{api}
POST
Renameapi — Rename API
/v1/apis/{owner}/{api}/rename
GET
Getapidefinition — Get API Definition
/v1/apis/{owner}/{api}/{version}
DELETE
Deleteapiversion — Delete API Version
/v1/apis/{owner}/{api}/{version}
POST
Cloneapiversion — Clone API Version
/v1/apis/{owner}/{api}/{version}/clone
GET
Getapicomments — Get API Comments
/v1/apis/{owner}/{api}/{version}/comments
POST
Addapicomment — Add API Comment
/v1/apis/{owner}/{api}/{version}/comments
POST
Forkapiversion — Fork API Version
/v1/apis/{owner}/{api}/{version}/fork
GET
Getapidefinitionjson — Get API Definition JSON
/v1/apis/{owner}/{api}/{version}/swagger-json
GET
Getapidefinitionyaml — Get API Definition YAML
/v1/apis/{owner}/{api}/{version}/swagger-yaml

MCP Tools

get-owner-apis

Get Owner APIs

read-only idempotent
get-api-versions

Get API Versions

read-only idempotent
create-update-api

Create or Update API

delete-api

Delete API

idempotent
rename-api

Rename API

get-api-definition

Get API Definition

read-only idempotent
delete-api-version

Delete API Version

idempotent
clone-api-version

Clone API Version

get-api-comments

Get API Comments

read-only idempotent
add-api-comment

Add API Comment

fork-api-version

Fork API Version

get-api-definition-json

Get API Definition JSON

read-only idempotent
get-api-definition-yaml

Get API Definition YAML

read-only idempotent

Capability Spec

registry-apis.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: SwaggerHub Registry API — APIs
  description: 'SwaggerHub Registry API — APIs. 13 operations. Lead operation: Get Owner APIs. Self-contained Naftiko capability
    covering one Swaggerhub business surface.'
  tags:
  - Swaggerhub
  - APIs
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SWAGGERHUB_API_KEY: SWAGGERHUB_API_KEY
capability:
  consumes:
  - type: http
    namespace: registry-apis
    baseUri: https://api.swaggerhub.com
    description: SwaggerHub Registry API — APIs business capability. Self-contained, no shared references.
    resources:
    - name: apis-owner
      path: /apis/{owner}
      operations:
      - name: getownerapis
        method: GET
        description: Get Owner APIs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: owner
          in: path
          type: string
          description: Owner username or organization name
          required: true
        - name: page
          in: query
          type: integer
        - name: limit
          in: query
          type: integer
    - name: apis-owner-api
      path: /apis/{owner}/{api}
      operations:
      - name: getapiversions
        method: GET
        description: Get API Versions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: owner
          in: path
          type: string
          required: true
        - name: api
          in: path
          type: string
          required: true
      - name: createorupdateapi
        method: POST
        description: Create or Update API
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: owner
          in: path
          type: string
          required: true
        - name: api
          in: path
          type: string
          required: true
        - name: version
          in: query
          type: string
          description: Version string (defaults to 0.0.1)
        - name: isPrivate
          in: query
          type: boolean
        - name: force
          in: query
          type: boolean
          description: Force update even if version is published
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteapi
        method: DELETE
        description: Delete API
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: owner
          in: path
          type: string
          required: true
        - name: api
          in: path
          type: string
          required: true
    - name: apis-owner-api-rename
      path: /apis/{owner}/{api}/rename
      operations:
      - name: renameapi
        method: POST
        description: Rename API
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: owner
          in: path
          type: string
          required: true
        - name: api
          in: path
          type: string
          required: true
        - name: newName
          in: query
          type: string
          required: true
    - name: apis-owner-api-version
      path: /apis/{owner}/{api}/{version}
      operations:
      - name: getapidefinition
        method: GET
        description: Get API Definition
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: owner
          in: path
          type: string
          required: true
        - name: api
          in: path
          type: string
          required: true
        - name: version
          in: path
          type: string
          required: true
      - name: deleteapiversion
        method: DELETE
        description: Delete API Version
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: owner
          in: path
          type: string
          required: true
        - name: api
          in: path
          type: string
          required: true
        - name: version
          in: path
          type: string
          required: true
    - name: apis-owner-api-version-clone
      path: /apis/{owner}/{api}/{version}/clone
      operations:
      - name: cloneapiversion
        method: POST
        description: Clone API Version
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: owner
          in: path
          type: string
          required: true
        - name: api
          in: path
          type: string
          required: true
        - name: version
          in: path
          type: string
          required: true
        - name: newVersion
          in: query
          type: string
    - name: apis-owner-api-version-comments
      path: /apis/{owner}/{api}/{version}/comments
      operations:
      - name: getapicomments
        method: GET
        description: Get API Comments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: owner
          in: path
          type: string
          required: true
        - name: api
          in: path
          type: string
          required: true
        - name: version
          in: path
          type: string
          required: true
      - name: addapicomment
        method: POST
        description: Add API Comment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: owner
          in: path
          type: string
          required: true
        - name: api
          in: path
          type: string
          required: true
        - name: version
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: apis-owner-api-version-fork
      path: /apis/{owner}/{api}/{version}/fork
      operations:
      - name: forkapiversion
        method: POST
        description: Fork API Version
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: owner
          in: path
          type: string
          required: true
        - name: api
          in: path
          type: string
          required: true
        - name: version
          in: path
          type: string
          required: true
        - name: newOwner
          in: query
          type: string
        - name: newApi
          in: query
          type: string
    - name: apis-owner-api-version-swagger.json
      path: /apis/{owner}/{api}/{version}/swagger.json
      operations:
      - name: getapidefinitionjson
        method: GET
        description: Get API Definition JSON
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: owner
          in: path
          type: string
          required: true
        - name: api
          in: path
          type: string
          required: true
        - name: version
          in: path
          type: string
          required: true
    - name: apis-owner-api-version-swagger.yaml
      path: /apis/{owner}/{api}/{version}/swagger.yaml
      operations:
      - name: getapidefinitionyaml
        method: GET
        description: Get API Definition YAML
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: owner
          in: path
          type: string
          required: true
        - name: api
          in: path
          type: string
          required: true
        - name: version
          in: path
          type: string
          required: true
    authentication:
      type: apikey
      key: Authorization
      value: '{{env.SWAGGERHUB_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: registry-apis-rest
    port: 8080
    description: REST adapter for SwaggerHub Registry API — APIs. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/apis/{owner}
      name: apis-owner
      description: REST surface for apis-owner.
      operations:
      - method: GET
        name: getownerapis
        description: Get Owner APIs
        call: registry-apis.getownerapis
        with:
          owner: rest.owner
          page: rest.page
          limit: rest.limit
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/apis/{owner}/{api}
      name: apis-owner-api
      description: REST surface for apis-owner-api.
      operations:
      - method: GET
        name: getapiversions
        description: Get API Versions
        call: registry-apis.getapiversions
        with:
          owner: rest.owner
          api: rest.api
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createorupdateapi
        description: Create or Update API
        call: registry-apis.createorupdateapi
        with:
          owner: rest.owner
          api: rest.api
          version: rest.version
          isPrivate: rest.isPrivate
          force: rest.force
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteapi
        description: Delete API
        call: registry-apis.deleteapi
        with:
          owner: rest.owner
          api: rest.api
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/apis/{owner}/{api}/rename
      name: apis-owner-api-rename
      description: REST surface for apis-owner-api-rename.
      operations:
      - method: POST
        name: renameapi
        description: Rename API
        call: registry-apis.renameapi
        with:
          owner: rest.owner
          api: rest.api
          newName: rest.newName
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/apis/{owner}/{api}/{version}
      name: apis-owner-api-version
      description: REST surface for apis-owner-api-version.
      operations:
      - method: GET
        name: getapidefinition
        description: Get API Definition
        call: registry-apis.getapidefinition
        with:
          owner: rest.owner
          api: rest.api
          version: rest.version
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteapiversion
        description: Delete API Version
        call: registry-apis.deleteapiversion
        with:
          owner: rest.owner
          api: rest.api
          version: rest.version
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/apis/{owner}/{api}/{version}/clone
      name: apis-owner-api-version-clone
      description: REST surface for apis-owner-api-version-clone.
      operations:
      - method: POST
        name: cloneapiversion
        description: Clone API Version
        call: registry-apis.cloneapiversion
        with:
          owner: rest.owner
          api: rest.api
          version: rest.version
          newVersion: rest.newVersion
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/apis/{owner}/{api}/{version}/comments
      name: apis-owner-api-version-comments
      description: REST surface for apis-owner-api-version-comments.
      operations:
      - method: GET
        name: getapicomments
        description: Get API Comments
        call: registry-apis.getapicomments
        with:
          owner: rest.owner
          api: rest.api
          version: rest.version
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: addapicomment
        description: Add API Comment
        call: registry-apis.addapicomment
        with:
          owner: rest.owner
          api: rest.api
          version: rest.version
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/apis/{owner}/{api}/{version}/fork
      name: apis-owner-api-version-fork
      description: REST surface for apis-owner-api-version-fork.
      operations:
      - method: POST
        name: forkapiversion
        description: Fork API Version
        call: registry-apis.forkapiversion
        with:
          owner: rest.owner
          api: rest.api
          version: rest.version
          newOwner: rest.newOwner
          newApi: rest.newApi
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/apis/{owner}/{api}/{version}/swagger-json
      name: apis-owner-api-version-swagger-json
      description: REST surface for apis-owner-api-version-swagger.json.
      operations:
      - method: GET
        name: getapidefinitionjson
        description: Get API Definition JSON
        call: registry-apis.getapidefinitionjson
        with:
          owner: rest.owner
          api: rest.api
          version: rest.version
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/apis/{owner}/{api}/{version}/swagger-yaml
      name: apis-owner-api-version-swagger-yaml
      description: REST surface for apis-owner-api-version-swagger.yaml.
      operations:
      - method: GET
        name: getapidefinitionyaml
        description: Get API Definition YAML
        call: registry-apis.getapidefinitionyaml
        with:
          owner: rest.owner
          api: rest.api
          version: rest.version
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: registry-apis-mcp
    port: 9090
    transport: http
    description: MCP adapter for SwaggerHub Registry API — APIs. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: get-owner-apis
      description: Get Owner APIs
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: registry-apis.getownerapis
      with:
        owner: tools.owner
        page: tools.page
        limit: tools.limit
      outputParameters:
      - type: object
        mapping: $.
    - name: get-api-versions
      description: Get API Versions
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: registry-apis.getapiversions
      with:
        owner: tools.owner
        api: tools.api
      outputParameters:
      - type: object
        mapping: $.
    - name: create-update-api
      description: Create or Update API
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: registry-apis.createorupdateapi
      with:
        owner: tools.owner
        api: tools.api
        version: tools.version
        isPrivate: tools.isPrivate
        force: tools.force
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-api
      description: Delete API
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: registry-apis.deleteapi
      with:
        owner: tools.owner
        api: tools.api
      outputParameters:
      - type: object
        mapping: $.
    - name: rename-api
      description: Rename API
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: registry-apis.renameapi
      with:
        owner: tools.owner
        api: tools.api
        newName: tools.newName
      outputParameters:
      - type: object
        mapping: $.
    - name: get-api-definition
      description: Get API Definition
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: registry-apis.getapidefinition
      with:
        owner: tools.owner
        api: tools.api
        version: tools.version
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-api-version
      description: Delete API Version
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: registry-apis.deleteapiversion
      with:
        owner: tools.owner
        api: tools.api
        version: tools.version
      outputParameters:
      - type: object
        mapping: $.
    - name: clone-api-version
      description: Clone API Version
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: registry-apis.cloneapiversion
      with:
        owner: tools.owner
        api: tools.api
        version: tools.version
        newVersion: tools.newVersion
      outputParameters:
      - type: object
        mapping: $.
    - name: get-api-comments
      description: Get API Comments
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: registry-apis.getapicomments
      with:
        owner: tools.owner
        api: tools.api
        version: tools.version
      outputParameters:
      - type: object
        mapping: $.
    - name: add-api-comment
      description: Add API Comment
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: registry-apis.addapicomment
      with:
        owner: tools.owner
        api: tools.api
        version: tools.version
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: fork-api-version
      description: Fork API Version
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: registry-apis.forkapiversion
      with:
        owner: tools.owner
        api: tools.api
        version: tools.version
        newOwner: tools.newOwner
        newApi: tools.newApi
      outputParameters:
      - type: object
        mapping: $.
    - name: get-api-definition-json
      description: Get API Definition JSON
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: registry-apis.getapidefinitionjson
      with:
        owner: tools.owner
        api: tools.api
        version: tools.version
      outputParameters:
      - type: object
        mapping: $.
    - name: get-api-definition-yaml
      description: Get API Definition YAML
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: registry-apis.getapidefinitionyaml
      with:
        owner: tools.owner
        api: tools.api
        version: tools.version
      outputParameters:
      - type: object
        mapping: $.