Create multiple connections via API or by uploading a CSV, JSON, or YAML file
name,protocol,username,password,private-key,hostname,group,users,groups,guacd-encryption (attribute)
conn1,vnc,alice,pass1,,conn1.web.com,ROOT,guac user 1;guac user 2,Connection 1 Users,none
conn2,rdp,bob,pass2,,conn2.web.com,ROOT/Parent Group,guac user 1,,ssl
conn3,ssh,${KEEPER_SERVER_USERNAME},,${KEEPER_SERVER_KEY},conn3.web.com,ROOT/Parent Group/Child Group,guac user 2;guac user 3,,
conn4,kubernetes,,,,,,,,[
{
"name": "conn1",
"protocol": "vnc",
"parameters": { "username": "alice", "password": "pass1", "hostname": "conn1.web.com" },
"parentIdentifier": "ROOT",
"users": [ "guac user 1", "guac user 2" ],
"groups": [ "Connection 1 Users" ],
"attributes": { "guacd-encryption": "none" }
},
{
"name": "conn2",
"protocol": "rdp",
"parameters": { "username": "bob", "password": "pass2", "hostname": "conn2.web.com" },
"group": "ROOT/Parent Group",
"users": [ "guac user 1" ],
"attributes": { "guacd-encryption": "none" }
},
{
"name": "conn3",
"protocol": "ssh",
"parameters": { "username": "${KEEPER_SERVER_USERNAME}", "private-key": "${KEEPER_SERVER_KEY}", "hostname": "conn3.web.com" },
"group": "ROOT/Parent Group/Child Group",
"users": [ "guac user 2", "guac user 3" ]
},
{
"name": "conn4",
"protocol": "kubernetes"
}
]---
- name: conn1
protocol: vnc
parameters:
username: alice
password: pass1
hostname: conn1.web.com
group: ROOT
users:
- guac user 1
- guac user 2
groups:
- Connection 1 Users
attributes:
guacd-encryption: none
- name: conn2
protocol: rdp
parameters:
username: bob
password: pass2
hostname: conn2.web.com
group: ROOT/Parent Group
users:
- guac user 1
attributes:
guacd-encryption: none
- name: conn3
protocol: ssh
parameters:
username: ${KEEPER_SERVER_USERNAME}
private-key: ${KEEPER_SERVER_KEY}
hostname: conn3.web.com
group: ROOT/Parent Group/Child Group
users:
- guac user 2
- guac user 3
- name: conn4
protocol: kubernetescurl 'https://kcm.example.com/api/tokens' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'username=kcm_admin&password=kcm_admin_pass123'{
"authToken": "TG9YZW0GAXBZDW0GZG9SB3IGC2L0",
"username": "kcm_admin",
"dataSource": "mysql",
"availableDataSources": [
"mysql",
"mysql-shared"
]
}cat << 'EOF' | curl 'https://kcm.example.com/api/session/data/mysql/connections' \
-X 'PATCH' \
-H 'Content-Type: application/json' \
-H 'Guacamole-Token: TG9YZW0GAXBZDW0GZG9SB3IGC2L0' \
-d '@-'
[
{
"op": "add",
"path": "/",
"value": {
"parentIdentifier": "ROOT",
"name": "conn1 ssh",
"protocol": "ssh",
"parameters": {
"hostname": "conn1.web.com",
"color-scheme": "white-black",
"username": "${KEEPER_SERVER_USERNAME}",
"private-key": "${KEEPER_SERVER_KEY}"
},
"attributes": {
"guacd-encryption": "none"
}
}
},
{
"op": "add",
"path": "/",
"value": {
"parentIdentifier": "1",
"name": "conn2 vnc",
"protocol": "vnc",
"parameters": {
"hostname": "conn2.web.com",
"username": "alice",
"password": "password123"
},
"attributes": {}
}
}
]{
"patches": [
{
"op": "add",
"identifier": "1",
"path": "/"
},
{
"op": "add",
"identifier": "2",
"path": "/"
}
]
}cat << 'EOF' | curl 'https://kcm.example.com/api/session/data/mysql/connections' \
-X 'PATCH' \
-H 'Content-Type: application/json' \
-H 'Guacamole-Token: TG9YZW0GAXBZDW0GZG9SB3IGC2L0' \
-d '@-'
[
{
"op": "replace",
"path": "/1",
"value": {
"parentIdentifier": "ROOT",
"name": "conn1 ssh (updated)",
"protocol": "ssh",
"parameters": {
"hostname": "conn1-new.web.com",
"color-scheme": "white-black",
"username": "${KEEPER_SERVER_USERNAME}",
"private-key": "${KEEPER_SERVER_KEY}"
},
"attributes": {
"guacd-encryption": "ssl"
}
}
},
{
"op": "replace",
"path": "/2",
"value": {
"parentIdentifier": "1",
"name": "conn2 vnc (updated)",
"protocol": "vnc",
"parameters": {
"hostname": "conn2-new.web.com",
"username": "bob",
"password": "password12345"
},
"attributes": {}
}
}
]cat << 'EOF' | curl 'https://kcm.example.com/api/session/data/mysql/connections' \
-X 'PATCH' \
-H 'Content-Type: application/json' \
-H 'Guacamole-Token: TG9YZW0GAXBZDW0GZG9SB3IGC2L0' \
-d '@-'
[
{
"op": "remove",
"path": "/1"
},
{
"op": "add",
"path": "/",
"value": {
"parentIdentifier": "ROOT",
"name": "conn1 ssh (completely replaced)",
"protocol": "ssh",
"parameters": {
"hostname": "conn1-newest.web.com",
"username": "${KEEPER_SERVER_USERNAME}",
"private-key": "${KEEPER_SERVER_KEY}"
},
"attributes": {}
}
},
{
"op": "remove",
"path": "/2"
},
{
"op": "add",
"path": "/",
"value": {
"parentIdentifier": "1",
"name": "conn2 vnc (completely replaced)",
"protocol": "vnc",
"parameters": {
"hostname": "conn2-newest.web.com",
"username": "carol",
"password": "password123456789"
},
"attributes": {}
}
}
]cat << 'EOF' | curl 'https://kcm.example.com/api/session/data/mysql/users/KCM_User_1/permissions' \
-X 'PATCH' \
-H 'Content-Type: application/json' \
-H 'Guacamole-Token: TG9YZW0GAXBZDW0GZG9SB3IGC2L0' \
-d '@-'
[
{
"op": "add",
"path": "/connectionPermissions/1",
"value": "READ"
},
{
"op": "add",
"path": "/connectionPermissions/2",
"value": "READ"
}
]curl 'https://kcm.example.com/api/session' \
-X 'DELETE' \
-H 'Guacamole-Token: TG9YZW0GAXBZDW0GZG9SB3IGC2L0'{
"message": "The provided patches failed to apply.",
"translatableMessage": {
"key": "APP.TEXT_UNTRANSLATED",
"variables": {
"MESSAGE": "The provided patches failed to apply."
}
},
"statusCode": null,
"expected": null,
"patches": [
{
"op": "add",
"identifier": null,
"path": "/",
"error": {
"key": "APP.TEXT_UNTRANSLATED",
"variables": {
"MESSAGE": "The connection \"KCM connection 1\" already exists."
}
}
},
{
"op": "add",
"identifier": null,
"path": "/",
"error": {
"key": "APP.TEXT_UNTRANSLATED",
"variables": {
"MESSAGE": "The connection \"KCM connection 2\" already exists."
}
}
}
],
"type": "BAD_REQUEST"
}
