Perform SSL Certificate discovery (For a Range of IP Addresses)

POST

This API performs SSL certificate discovery for a specified range of IP addresses in PAM360. By providing the start and end IP, port, and timeout, the API scans the hosts and returns the discovery results.

Request URL

https://<Hostname-or-IP-address-of-PAM360-server>:<Port>/api/pki/restapi/sslCertRangeDiscovery

Header Parameters

{
	"AUTHTOKEN" : "<<Authtoken-generated-from-PAM360>>",
	"orgName"   : "<<org display name>>"
}	

ParameterDescriptionValues

AUTHTOKEN

Authentication token for the user to authorize the API request.
Type : String
Mandatory : Yes

Default Value : N/A

orgName

Organization name available in PAM360.
Type : String
Mandatory : No

Default Value : The organization to which the user belongs.

Body Parameters

INPUT_DATA={
	"operation":{
		"Details":{
		"StartIpAddress": "127.0.0.1",
		"EndIpAddress": "127.0.0.2",
		"TIMEOUT": "60",
		"PORT": "8282"
		}
	}
}	

ParametersDescriptionValues

StartIpAddress

Starting IP address of the range to scan.
Type : String
Mandatory : Yes

Default Value : N/A

EndIpAddress

Ending IP address of the range to scan.
Type : String
Mandatory : Yes

Default Value : N/A

TIMEOUT

Timeout value (in seconds) for scanning each host.
Type : Integer
Mandatory : Yes

Default Value : N/A

PORT

Port number to scan on the target hosts.
Type : Integer
Mandatory : Yes

Default Value : N/A

Sample Request

cURLPythonPowerShell
curl -X POST https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/api/pki/restapi/sslCertRangeDiscovery -H "AUTHTOKEN:<<Authtoken-generated-from-PAM360>>" -H 'Content-Type: application/json' -d INPUT_DATA={"operation":{"Details":{"StartIpAddress":"127.0.0.1","EndIpAddress":"127.0.0.2","TIMEOUT":"60","PORT":"8282"}}}	
import requests

url = "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/api/pki/restapi/sslCertRangeDiscovery"

data = {
	"INPUT_DATA": '{"operation":{"Details":{"StartIpAddress":"127.0.0.1","EndIpAddress":"127.0.0.2","TIMEOUT":"60","PORT":"8282"}}}'
}

headers = {
	"AUTHTOKEN": "<<Authtoken-generated-from-PAM360>>"
}

response = requests.post(url, headers=headers, data=data, verify=True)

print("Response:", response.text)
# Define URL
$url = "https://<Hostname-or-IP-address-of-PAM360-server>:<Port>/api/pki/restapi/sslCertRangeDiscovery"

# Headers with AUTHTOKEN
$headers = @{
	"AUTHTOKEN" = "<<Authtoken-generated-from-PAM360>>"; "Content-Type" = "application/x-www-form-urlencoded"
}

# Input JSON
$inputData = @{
	operation = @{
	Details = @{
	StartIpAddress = "192.168.1.1"; EndIpAddress = "192.168.1.2"; TIMEOUT = "3"; PORT = "443"
	}
	}
} | ConvertTo-Json -Compress

# Encode as query parameter
$params = @{ INPUT_DATA = $inputData }

# Perform SSL Certificate Range Discovery
$response = Invoke-RestMethod -Uri $url -Method POST -Headers $headers -Body $params
$response | ConvertTo-Json -Depth 5 
$response.Content

Sample Response

{
	"result": {
		"message": "SSL discovery completed successfully",
		"status": "Success"
	},
	"name": "Get SSL Discovery",
	"details": {
		"127.0.0.2": [
			"SUCCESS",
			"SSL Certificate already available, john-3022 certificate found at port 8282"
		],
		"127.0.0.1": [
			"SUCCESS",
			"SSL Certificate already available, john-3022 certificate found at port 8282"
		]
	},
	"totalRows": 2
}



Top