Infisical SSH Hosts API

The SSH Hosts API from Infisical — 8 operation(s) for ssh hosts.

OpenAPI Specification

infisical-ssh-hosts-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Infisical Admin SSH Hosts API
  description: List of all available APIs that can be consumed
  version: 0.0.1
servers:
- url: https://us.infisical.com
  description: Production server (US)
- url: https://eu.infisical.com
  description: Production server (EU)
- url: http://localhost:8080
  description: Local server
tags:
- name: SSH Hosts
paths:
  /api/v1/ssh/hosts:
    get:
      tags:
      - SSH Hosts
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                    projectId:
                      type: string
                    hostname:
                      type: string
                    alias:
                      type: string
                      nullable: true
                    userCertTtl:
                      type: string
                    hostCertTtl:
                      type: string
                    userSshCaId:
                      type: string
                      format: uuid
                    hostSshCaId:
                      type: string
                      format: uuid
                    loginMappings:
                      type: array
                      items:
                        type: object
                        properties:
                          loginUser:
                            type: string
                          allowedPrincipals:
                            type: object
                            properties:
                              usernames:
                                type: array
                                items:
                                  type: string
                              groups:
                                type: array
                                items:
                                  type: string
                            additionalProperties: false
                          source:
                            type: string
                            enum:
                            - host
                            - hostGroup
                        required:
                        - loginUser
                        - allowedPrincipals
                        - source
                        additionalProperties: false
                  required:
                  - id
                  - projectId
                  - hostname
                  - userCertTtl
                  - hostCertTtl
                  - userSshCaId
                  - hostSshCaId
                  - loginMappings
                  additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 400
                  message:
                    type: string
                  error:
                    type: string
                  details: {}
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 401
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 403
                  message:
                    type: string
                  details: {}
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 404
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 422
                  message: {}
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 500
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
    post:
      tags:
      - SSH Hosts
      description: Register SSH Host
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                projectId:
                  type: string
                  description: The ID of the project to create the SSH host in.
                hostname:
                  type: string
                  minLength: 1
                  description: The hostname of the SSH host.
                alias:
                  type: string
                  minLength: 0
                  maxLength: 64
                  description: The alias for the SSH host.
                  default: ''
                userCertTtl:
                  type: string
                  default: 8h
                  description: The time to live for user certificates issued under this host.
                hostCertTtl:
                  type: string
                  default: 1y
                  description: The time to live for host certificates issued under this host.
                loginMappings:
                  type: array
                  items:
                    type: object
                    properties:
                      loginUser:
                        type: string
                      allowedPrincipals:
                        type: object
                        properties:
                          usernames:
                            type: array
                            items:
                              type: string
                          groups:
                            type: array
                            items:
                              type: string
                        additionalProperties: false
                    required:
                    - loginUser
                    - allowedPrincipals
                    additionalProperties: false
                  default: []
                  description: A list of login mappings for the SSH host. Each login mapping contains a login user and a list of corresponding allowed principals being usernames of users or groups slugs in the Infisical SSH project.
                userSshCaId:
                  type: string
                  description: The ID of the SSH CA to use for user certificates. If not specified, the default user SSH CA will be used if it exists.
                hostSshCaId:
                  type: string
                  description: The ID of the SSH CA to use for host certificates. If not specified, the default host SSH CA will be used if it exists.
              required:
              - projectId
              - hostname
              additionalProperties: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  projectId:
                    type: string
                  hostname:
                    type: string
                  alias:
                    type: string
                    nullable: true
                  userCertTtl:
                    type: string
                  hostCertTtl:
                    type: string
                  userSshCaId:
                    type: string
                    format: uuid
                  hostSshCaId:
                    type: string
                    format: uuid
                  loginMappings:
                    type: array
                    items:
                      type: object
                      properties:
                        loginUser:
                          type: string
                        allowedPrincipals:
                          type: object
                          properties:
                            usernames:
                              type: array
                              items:
                                type: string
                            groups:
                              type: array
                              items:
                                type: string
                          additionalProperties: false
                        source:
                          type: string
                          enum:
                          - host
                          - hostGroup
                      required:
                      - loginUser
                      - allowedPrincipals
                      - source
                      additionalProperties: false
                required:
                - id
                - projectId
                - hostname
                - userCertTtl
                - hostCertTtl
                - userSshCaId
                - hostSshCaId
                - loginMappings
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 400
                  message:
                    type: string
                  error:
                    type: string
                  details: {}
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 401
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 403
                  message:
                    type: string
                  details: {}
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 404
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 422
                  message: {}
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 500
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
  /api/v1/ssh/hosts/{sshHostId}:
    get:
      tags:
      - SSH Hosts
      parameters:
      - schema:
          type: string
        in: path
        name: sshHostId
        required: true
        description: The ID of the SSH host to get.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  projectId:
                    type: string
                  hostname:
                    type: string
                  alias:
                    type: string
                    nullable: true
                  userCertTtl:
                    type: string
                  hostCertTtl:
                    type: string
                  userSshCaId:
                    type: string
                    format: uuid
                  hostSshCaId:
                    type: string
                    format: uuid
                  loginMappings:
                    type: array
                    items:
                      type: object
                      properties:
                        loginUser:
                          type: string
                        allowedPrincipals:
                          type: object
                          properties:
                            usernames:
                              type: array
                              items:
                                type: string
                            groups:
                              type: array
                              items:
                                type: string
                          additionalProperties: false
                        source:
                          type: string
                          enum:
                          - host
                          - hostGroup
                      required:
                      - loginUser
                      - allowedPrincipals
                      - source
                      additionalProperties: false
                required:
                - id
                - projectId
                - hostname
                - userCertTtl
                - hostCertTtl
                - userSshCaId
                - hostSshCaId
                - loginMappings
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 400
                  message:
                    type: string
                  error:
                    type: string
                  details: {}
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 401
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 403
                  message:
                    type: string
                  details: {}
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 404
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 422
                  message: {}
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 500
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
    patch:
      tags:
      - SSH Hosts
      description: Update SSH Host
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                hostname:
                  type: string
                  minLength: 1
                  description: The hostname of the SSH host to update to.
                alias:
                  type: string
                  minLength: 0
                  maxLength: 64
                  description: The alias for the SSH host to update to.
                userCertTtl:
                  type: string
                  description: The time to live for user certificates issued under this host to update to.
                hostCertTtl:
                  type: string
                  description: The time to live for host certificates issued under this host to update to.
                loginMappings:
                  type: array
                  items:
                    type: object
                    properties:
                      loginUser:
                        type: string
                      allowedPrincipals:
                        type: object
                        properties:
                          usernames:
                            type: array
                            items:
                              type: string
                          groups:
                            type: array
                            items:
                              type: string
                        additionalProperties: false
                    required:
                    - loginUser
                    - allowedPrincipals
                    additionalProperties: false
                  description: A list of login mappings for the SSH host. Each login mapping contains a login user and a list of corresponding allowed principals being usernames of users or groups slugs in the Infisical SSH project.
              additionalProperties: false
      parameters:
      - schema:
          type: string
        in: path
        name: sshHostId
        required: true
        description: The ID of the SSH host to update.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  projectId:
                    type: string
                  hostname:
                    type: string
                  alias:
                    type: string
                    nullable: true
                  userCertTtl:
                    type: string
                  hostCertTtl:
                    type: string
                  userSshCaId:
                    type: string
                    format: uuid
                  hostSshCaId:
                    type: string
                    format: uuid
                  loginMappings:
                    type: array
                    items:
                      type: object
                      properties:
                        loginUser:
                          type: string
                        allowedPrincipals:
                          type: object
                          properties:
                            usernames:
                              type: array
                              items:
                                type: string
                            groups:
                              type: array
                              items:
                                type: string
                          additionalProperties: false
                        source:
                          type: string
                          enum:
                          - host
                          - hostGroup
                      required:
                      - loginUser
                      - allowedPrincipals
                      - source
                      additionalProperties: false
                required:
                - id
                - projectId
                - hostname
                - userCertTtl
                - hostCertTtl
                - userSshCaId
                - hostSshCaId
                - loginMappings
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 400
                  message:
                    type: string
                  error:
                    type: string
                  details: {}
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 401
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 403
                  message:
                    type: string
                  details: {}
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 404
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 422
                  message: {}
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                    - 500
                  message:
                    type: string
                  error:
                    type: string
                required:
                - reqId
                - statusCode
                - message
                - error
                additionalProperties: false
    delete:
      tags:
      - SSH Hosts
      description: Delete SSH Host
      parameters:
      - schema:
          type: string
        in: path
        name: sshHostId
        required: true
        description: The ID of the SSH host to delete.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  projectId:
                    type: string
                  hostname:
                    type: string
                  alias:
                    type: string
                    nullable: true
                  userCertTtl:
                    type: string
                  hostCertTtl:
                    type: string
                  userSshCaId:
                    type: string
                    format: uuid
                  hostSshCaId:
                    type: string
                    format: uuid
                  loginMappings:
                    type: array
                    items:
                      type: object
                      properties:
                        loginUser:
                          type: string
                        allowedPrincipals:
                          type: object
                          properties:
                            usernames:
                              type: array
                              items:
                                type: string
                            groups:
                              type: array
                              items:
                                type: string
                          additionalProperties: false
                        source:
                          type: string
                          enum:
                          - host
                          - hostGroup
                      required:
                      - loginUser
                      - allowedPrincipals
                      - source
                      additionalProperties: false
                required:
                - id
                - projectId
                - hostname
                - userCertTtl
                - hostCertTtl
                - userSshCaId
                - hostSshCaId
                - loginMappings
                additionalProperties: false
        '400':
          description: Default Response
      

# --- truncated at 32 KB (69 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/infisical/refs/heads/main/openapi/infisical-ssh-hosts-api-openapi.yml