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 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}/issue-user-cert: post: tags: - SSH Hosts description: Issue SSH certificate for user requestBody: required: true content: application/json: schema: type: object properties: loginUser: type: string description: The login user to issue the SSH credentials for. required: - loginUser additionalProperties: false parameters: - schema: type: string in: path name: sshHostId required: true description: The ID of the SSH host to issue the SSH credentials for. responses: '200': description: Default Response content: application/json: schema: type: object properties: serialNumber: type: string description: The serial number of the issued SSH certificate. signedKey: type: string description: The SSH certificate or signed SSH public key. privateKey: type: string description: The private key corresponding to the issued SSH certificate. publicKey: type: string description: The public key of the issued SSH certificate. keyAlgorithm: type: string enum: - RSA_2048 - RSA_4096 - EC_prime256v1 - EC_secp384r1 - ED25519 description: The type of public key algorithm and size, in bits, of the key pair for the SSH host. required: - serialNumber - signedKey - privateKey - publicKey - keyAlgorithm 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}/issue-host-cert: post: tags: - SSH Hosts description: Issue SSH certificate for host requestBody: required: true content: application/json: schema: type: object properties: publicKey: type: string description: The SSH public key to issue the SSH certificate for. required: - publicKey additionalProperties: false parameters: - schema: type: string in: path name: sshHostId required: true description: The ID of the SSH host to issue the SSH certificate for. responses: '200': description: Default Response content: application/json: schema: type: object properties: serialNumber: type: string description: The serial number of the issued SSH certificate. signedKey: type: string description: The SSH certificate or signed SSH public key. required: - serialNumber - signedKey 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}/user-ca-public-key: get: tags: - SSH Hosts description: Get public key of the user SSH CA linked to the host parameters: - schema: type: string in: path name: sshHostId required: true description: The ID of the SSH host to get the user SSH CA public key for. responses: '200': description: The public key of the user SSH CA linked to the SSH host. content: application/json: schema: type: string description: The public key of the user SSH CA linked to the SSH host. '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}/host-ca-public-key: get: tags: - SSH Hosts description: Get public key of the host SSH CA linked to the host parameters: - schema: type: string in: path name: sshHostId required: true description: The ID of the SSH host to get the host SSH CA public key for. responses: '200': description: The public key of the host SSH CA linked to the SSH host. content: application/json: schema: type: string description: The public key of the host SSH CA linked to the SSH host. '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/projects/{projectId}/ssh-hosts: get: operationId: listProjectSshHosts tags: - SSH Hosts parameters: - schema: type: string in: path name: projectId required: true description: The ID of the project to list SSH hosts for. responses: '200': description: Default Response content: application/json: schema: type: object properties: hosts: 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 required: - hosts 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/v2/workspace/{projectId}/ssh-hosts: get: tags: - SSH Hosts parameters: - schema: type: string in: path name: projectId required: true description: The ID of the project to list SSH hosts for. responses: '200': description: Default Response content: application/json: schema: type: object properties: hosts: 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 required: - hosts 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 components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: An access token in Infisical