public_key
string
required
User's public key
hostid
string
uuid
Target host UUID
hostname
string
Target hostname
username
string
Target username
service
string
Target hots service, "SSH", "RDP" or "WEB"
roleid
string
uuid
UUID of role that is used for accessing the target host
Authorization
string
required
A base64 encoded json formatted signedAuthorizationObject
- Default
- "Bearer a-proper-signed-authorization-goes-here"
oauth
Required Scopes:
user
service
Get target host credentials for the user.
All Scopes
-
access-groups-manage
· User with "access-groups-manage" -
admin
· Admin scope - used for built-in SSH PrivX admin account -
api-clients-manage
· User with "api-clients-manage" permission -
certificates-view
· User with "certificates-view" -
hosts-manage
· User with "hosts-manage" permission -
service
· Microservice scope - used for communication between SSH PrivX microservices -
user
· Normal users
- Flow Type:
- authorization_code
- Auth URL:
- https://api.x.com/v1/auth/auth
- Token URL:
- https://api.x.com/v1/auth/auth
Request
{
"public_key": "string",
"hostid": "5bf77342-221c-11ee-be56-0242ac120002",
"hostname": "string",
"username": "string",
"service": "string",
"roleid": "5bf77342-221c-11ee-be56-0242ac120002"
}
Response
Successful response, returns the user key & certificate to access target hosts
{
"principal_keys": {
"size": 123,
"name": "string",
"comment": "string",
"public_key": "string",
"type": "string",
"public_key_string": "string"
},
"certificates": {
"data": "string",
"data_string": "ssh-rsa-cert-v01@openssh.com AAAAHHNzaC1yc2EtY2VydC12MDFAb3BlbnNzaC5jb20AAAAgDnz3tCJXR8xi7APJ5cynEYjD+v8nJkRpF4ExMIdYVNAAAAADAQABAAABAQDTGo9L+eIYS3gfYS2soIhDssdzRgorjf6agqGrEG7Nki4f6AUWWLCbuRIXFRTpe/x+fcpaPQoTysqXK9aMtjTJ1/eUAsf0qyf+4S4/4ac+zHzCNxX9CTVm+Dan+Y7dg61999v33BCszYc0GQJHU7sGMWCJRbedsr6ZRv8yLhLkYg2hnp1KSHC5YQHjKq17R6jFGwvQuyEs8OOIOEyt/89qNjb2jpJrpAjUYgVKeX7Zee+WyXNfwKikTwUuK+b0CV6i6AoFGMqtMoCVT5inM9H9XFNqNxINMxmxR7V/+KodyE0Z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WBchTWVIXH6OJet1I9Idum/ywreChWzVPwNbq1JN8aE9uH14Q1qOtAAACDwAAAAdzc2gtcnNhAAACALUt++Nk+loiF6zVltXnzq5e/JGC3jK27X3XtMFKWBVRvk6++Nhays+XLMvaw2lT1uxSkXjZjiI8woqthCJX+mzpHj7vN6Z3vV9u16OPP9HXDy4VkGhbhm4wwwqZJr/Jdc+5gw+DPacijaA92e2cKTeSXAe72nN5z8vpuB1+mgmzBRMDemje2yW30c+euOdgh2Hf1UVcvZSt4xsZ75E4D5k9GCz+dMdnc6Yi96c4mYXH+WHsJb68FKi0u1hnOFMeiHi/DRTaWmAG8E8p7HJYlHEkbCxU3W+ULYNEnsuYs3WwThBdjPv0RzWrCJ3jCD2FImxJtzLGYXXRd8+mj49ev6jEFpxdxg2kdRgIRARKWzV7sDDO3uBLZeaflg9TP9oV6F2i7WvkyA+p7g4zT1STXRRItUpqfdXuYDDv6m5FiN+AgTC6LTyDVfcgYqLNqiqnf1LuvYRBDLk0ztMXCks6lB5MblenCFl9nRkUD/2oEhUw7QSqMlIY1rhHU9KGI+LZoTmiUu1DF+E+PjsXT/lFUDv7HzcbsE/GliJrqlbnpHko7RNztJhu2Coqfv1ZtCsYc+5lGNbzx8qAXePt3C6zDnoU8bIlOjoSMfErVGs/Ku20j6mAINx3ESrifUhn/NCGTSlVEQUUpLuuRPDB1lXifoobarfoobarfoobarfoobar PrivX OpenSSH certificate (ssh-rsa signature)",
"type": "OpenSSH"
},
"passphrase": "string"
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Bad request
{
"error_code": "GENERAL_ERROR",
"error_message": "string",
"property": "string",
"details": [
null
]
}
Unauthorized request, OAuth2 authorization missing or invalid
{
"error_code": "GENERAL_ERROR",
"error_message": "string",
"property": "string",
"details": [
null
]
}
Unauthorized request, OAuth2 authorization OK but scope insufficient
{
"error_code": "GENERAL_ERROR",
"error_message": "string",
"property": "string",
"details": [
null
]
}
Resource not found
{
"error_code": "GENERAL_ERROR",
"error_message": "string",
"property": "string",
"details": [
null
]
}
Internal server error
{
"error_code": "GENERAL_ERROR",
"error_message": "string",
"property": "string",
"details": [
null
]
}
error_code
string
required
Standard error code denoting the error type
- Enum
-
- GENERAL_ERROR
- BAD_REQUEST
- PERMISSION_DENIED
- INVALID_REQUEST_DATA
- REQUIRED_VALUE_MISSING
- VALUE_OUT_OF_BOUNDS
- VALUE_INCORRECT_TYPE
- VALUE_INCORRECT_FORMAT
- VALUE_DUPLICATE
- CONFIGURATION_ERROR
- OUT_OF_RESOURCES
- MAX_LOAD
- TOO_MANY_CONNECTIONS
- DATABASE_ERROR
- CACHE_ERROR
- INTRA_SERVICE_COMMUNICATION_ERROR
error_message
string
Textual, human readable error message
property
string
The property name causing an error
details
array[]
An array of errors describing error in more detail
reference (error)
recursiveerror_code
string
required
Standard error code denoting the error type
- Enum
-
- GENERAL_ERROR
- BAD_REQUEST
- PERMISSION_DENIED
- INVALID_REQUEST_DATA
- REQUIRED_VALUE_MISSING
- VALUE_OUT_OF_BOUNDS
- VALUE_INCORRECT_TYPE
- VALUE_INCORRECT_FORMAT
- VALUE_DUPLICATE
- CONFIGURATION_ERROR
- OUT_OF_RESOURCES
- MAX_LOAD
- TOO_MANY_CONNECTIONS
- DATABASE_ERROR
- CACHE_ERROR
- INTRA_SERVICE_COMMUNICATION_ERROR
error_message
string
Textual, human readable error message
property
string
The property name causing an error
details
array[]
An array of errors describing error in more detail
reference (error)
recursiveerror_code
string
required
Standard error code denoting the error type
- Enum
-
- GENERAL_ERROR
- BAD_REQUEST
- PERMISSION_DENIED
- INVALID_REQUEST_DATA
- REQUIRED_VALUE_MISSING
- VALUE_OUT_OF_BOUNDS
- VALUE_INCORRECT_TYPE
- VALUE_INCORRECT_FORMAT
- VALUE_DUPLICATE
- CONFIGURATION_ERROR
- OUT_OF_RESOURCES
- MAX_LOAD
- TOO_MANY_CONNECTIONS
- DATABASE_ERROR
- CACHE_ERROR
- INTRA_SERVICE_COMMUNICATION_ERROR
error_message
string
Textual, human readable error message
property
string
The property name causing an error
details
array[]
An array of errors describing error in more detail
reference (error)
recursiveerror_code
string
required
Standard error code denoting the error type
- Enum
-
- GENERAL_ERROR
- BAD_REQUEST
- PERMISSION_DENIED
- INVALID_REQUEST_DATA
- REQUIRED_VALUE_MISSING
- VALUE_OUT_OF_BOUNDS
- VALUE_INCORRECT_TYPE
- VALUE_INCORRECT_FORMAT
- VALUE_DUPLICATE
- CONFIGURATION_ERROR
- OUT_OF_RESOURCES
- MAX_LOAD
- TOO_MANY_CONNECTIONS
- DATABASE_ERROR
- CACHE_ERROR
- INTRA_SERVICE_COMMUNICATION_ERROR
error_message
string
Textual, human readable error message
property
string
The property name causing an error
details
array[]
An array of errors describing error in more detail
reference (error)
recursiveerror_code
string
required
Standard error code denoting the error type
- Enum
-
- GENERAL_ERROR
- BAD_REQUEST
- PERMISSION_DENIED
- INVALID_REQUEST_DATA
- REQUIRED_VALUE_MISSING
- VALUE_OUT_OF_BOUNDS
- VALUE_INCORRECT_TYPE
- VALUE_INCORRECT_FORMAT
- VALUE_DUPLICATE
- CONFIGURATION_ERROR
- OUT_OF_RESOURCES
- MAX_LOAD
- TOO_MANY_CONNECTIONS
- DATABASE_ERROR
- CACHE_ERROR
- INTRA_SERVICE_COMMUNICATION_ERROR
error_message
string
Textual, human readable error message
property
string
The property name causing an error
details
array[]
An array of errors describing error in more detail
reference (error)
recursiveprincipal_keys
object (principal_keys)
Principal key for the user
size
int
name
string
comment
string
public_key
string
type
string
public_key_string
string
certificates
object (certificates)
Certificate for the user
data
string
If type is OpenSSH then this field contains the base64 encoded (no padding) OpenSSH certificate
data_string
string
If type is OpenSSH then this field contains the OpenSSH certificate in OpenSSH compatible format
- Example
- "ssh-rsa-cert-v01@openssh.com AAAAHHNzaC1yc2EtY2VydC12MDFAb3BlbnNzaC5jb20AAAAgDnz3tCJXR8xi7APJ5cynEYjD+v8nJkRpF4ExMIdYVNAAAAADAQABAAABAQDTGo9L+eIYS3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enum
-
- OpenSSH
passphrase
string
Target account passphrase
Was this page helpful?