Ownkube SSH API

The SSH API from Ownkube — 5 operation(s) for ssh.

GitHub OpenAPI

Operations 6

GET /v1/ssh-keys List your SSH keys #
POST /v1/ssh-keys Add an SSH key #
POST /v1/ssh-keys/github Import SSH keys from GitHub #
DELETE /v1/ssh-keys/{id} Remove an SSH key #
GET /v1/connect/regions List regions with shell access #
GET /v1/deployments/{deploymentId}/ssh-target Resolve where to SSH for a deployment #

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ownkube-io:ownkube-io-ssh-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ownkube-io-ssh-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ownkube CLI SSH API
  version: 1.15.0
  description: API for the Ownkube CLI tool. Authenticate via browser-based flow, then use x-api-key header for subsequent requests.
servers:
- url: /api/cli
security:
- apiKey: []
tags:
- name: SSH
paths:
  /v1/ssh-keys:
    get:
      tags:
      - SSH
      summary: List your SSH keys
      description: Lists the SSH public keys registered to your account.
      security:
      - apiKey: []
      responses:
        '200':
          description: Your SSH keys
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SshKeyList'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '412':
          description: Precondition failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited; retry after the Retry-After header's seconds
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getV1SshKeys
      x-operation-id-source: derived
    post:
      tags:
      - SSH
      summary: Add an SSH key
      description: 'Registers an SSH public key. Idempotent for your own key (`created: false`). Errors: `SSH_KEY_INVALID`, `SSH_KEY_IN_USE` (registered to another account), `SSH_KEY_LIMIT`.'
      security:
      - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 200
                  default: ''
                publicKey:
                  type: string
                  minLength: 1
                  maxLength: 16384
                  description: OpenSSH public key line, e.g. `ssh-ed25519 AAAA... me@laptop`.
              required:
              - publicKey
      responses:
        '200':
          description: The registered key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddSshKeyResult'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '412':
          description: Precondition failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited; retry after the Retry-After header's seconds
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: postV1SshKeys
      x-operation-id-source: derived
  /v1/ssh-keys/github:
    post:
      tags:
      - SSH
      summary: Import SSH keys from GitHub
      description: Registers the public keys published on a GitHub account. Keys registered to another account, and keys too weak to accept, are skipped.
      security:
      - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  nullable: true
                  maxLength: 39
                  default: null
                  description: GitHub username. Null uses the GitHub account you signed in with.
      responses:
        '200':
          description: Keys now registered from that account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SshKeyList'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '412':
          description: Precondition failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited; retry after the Retry-After header's seconds
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: postV1SshKeysGithub
      x-operation-id-source: derived
  /v1/ssh-keys/{id}:
    delete:
      tags:
      - SSH
      summary: Remove an SSH key
      description: Removes one of your SSH keys. Open sessions using it end within a few minutes.
      security:
      - apiKey: []
      parameters:
      - schema:
          type: string
        required: true
        name: id
        in: path
      responses:
        '200':
          description: Removed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveSshKeyResult'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '412':
          description: Precondition failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited; retry after the Retry-After header's seconds
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: deleteV1SshKeysById
      x-operation-id-source: derived
  /v1/connect/regions:
    get:
      tags:
      - SSH
      summary: List regions with shell access
      description: Regions where SSH and the browser shell are enabled, with their pinned host keys.
      security:
      - apiKey: []
      responses:
        '200':
          description: Regions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectRegionList'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '412':
          description: Precondition failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited; retry after the Retry-After header's seconds
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getV1ConnectRegions
      x-operation-id-source: derived
  /v1/deployments/{deploymentId}/ssh-target:
    get:
      tags:
      - SSH
      summary: Resolve where to SSH for a deployment
      description: Host, username, host keys, and instances for `okctl ssh`. Owners and admins only, on Ownkube Compute. Refused with `SSH_NOT_AVAILABLE` otherwise.
      security:
      - apiKey: []
      parameters:
      - schema:
          type: string
        required: true
        name: deploymentId
        in: path
      responses:
        '200':
          description: SSH target
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SshTarget'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '412':
          description: Precondition failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited; retry after the Retry-After header's seconds
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getV1DeploymentsByDeploymentIdSshTarget
      x-operation-id-source: derived
components:
  schemas:
    AddSshKeyResult:
      allOf:
      - $ref: '#/components/schemas/SshKey'
      - type: object
        properties:
          created:
            type: boolean
            description: False when the key was already registered to you.
        required:
        - created
    ConnectRegionList:
      type: object
      properties:
        regions:
          type: array
          items:
            type: object
            properties:
              region:
                type: string
                description: Public region name.
              label:
                type: string
              sshHost:
                type: string
              sshPort:
                type: number
              connectUrl:
                type: string
                description: Browser shell origin.
              hostKeys:
                type: array
                items:
                  type: string
                description: Pinned SSH host public keys for `known_hosts`.
            required:
            - region
            - label
            - sshHost
            - sshPort
            - connectUrl
            - hostKeys
      required:
      - regions
    RemoveSshKeyResult:
      type: object
      properties:
        removed:
          type: boolean
      required:
      - removed
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: Machine-readable error code
      required:
      - error
      - code
    SshKeyList:
      type: object
      properties:
        keys:
          type: array
          items:
            $ref: '#/components/schemas/SshKey'
      required:
      - keys
    SshKey:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        algorithm:
          type: string
          description: Key type, e.g. `ssh-ed25519`.
        fingerprint:
          type: string
          description: '`SHA256:` fingerprint.'
        source:
          type: string
          enum:
          - cli
          - dashboard
          - github
        createdAt:
          type: string
        lastUsedAt:
          type: string
          nullable: true
      required:
      - id
      - name
      - algorithm
      - fingerprint
      - source
      - createdAt
      - lastUsedAt
    SshTarget:
      type: object
      properties:
        deploymentId:
          type: string
        name:
          type: string
        kind:
          type: string
          enum:
          - app
          - database
          - cache
        region:
          type: string
          description: Public region name.
        sshHost:
          type: string
        sshPort:
          type: number
        username:
          type: string
          description: SSH username; append `+n` to pick instance n.
        instances:
          type: array
          items:
            type: object
            properties:
              index:
                type: number
              ready:
                type: boolean
            required:
            - index
            - ready
        hostKeys:
          type: array
          items:
            type: string
      required:
      - deploymentId
      - name
      - kind
      - region
      - sshHost
      - sshPort
      - username
      - instances
      - hostKeys
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API key issued by the browser-based CLI authorization flow.