POST
/
api
/
v1
/
ssh
/
host-groups
cURL
curl --request POST \
  --url https://us.infisical.com/api/v1/ssh/host-groups \
  --header 'Content-Type: application/json' \
  --data '{
  "projectId": "<string>",
  "name": "<string>",
  "loginMappings": []
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "projectId": "<string>",
  "name": "<string>",
  "loginMappings": [
    {
      "loginUser": "<string>",
      "allowedPrincipals": {
        "usernames": [
          "<string>"
        ],
        "groups": [
          "<string>"
        ]
      }
    }
  ]
}

Body

application/json
projectId
string
required

The ID of the project to create the SSH host group in.

name
string
required

The name of the SSH host group.

Required string length: 1 - 64
loginMappings
object[]

A list of default login mappings to include on each host in the SSH host group. Each login mapping contains a login user and a list of corresponding allowed principals being usernames of users in the Infisical SSH project.

Response

Default Response

id
string<uuid>
required
projectId
string
required
name
string
required
loginMappings
object[]
required