Create an API User

POST

This API creates a new API user in PAM360. The response confirms that the user has been added successfully and provides the user ID along with the generated AUTHTOKEN for API access.

Request URL

https://<Hostname-or-IP-address-of-PAM360-server>:<Port>/restapi/json/v1/user

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": {
	"FIRSTNAME": "Jason",
	"LASTNAME": "J",
	"USERNAME": "Jason",
	"EMAIL": "jason@opmanager.com",
	"SECONDARYEMAILID": "jade@opmanager.com",
	"ROLE": "administator",
	"ROLEID": 301,
	"DEPARTMENT": "NOC",
	"LOCATION": "Level 10 - South Wing",
	"USERGROUPNAME": "Demo",
	"RESTAPIACCESS": true,
	"SDKACCESS": true,
	"ISAPIUSER": true, 
	"OWNERNAMEOPTION": false,
	"EXPIRYDATE": "2024-10-30",
	"TOKENVALIDITYDAYS": 100,
	"HOSTCHECK": true,
	"HOSTNAME": "john-1234"
		}
	}
}

ParametersDescriptionValues

FIRSTNAME

First name of the user.
Type : String
Mandatory : Yes

Default Value : N/A

LASTNAME

Last name of the user.
Type : String
Mandatory : Yes

Default Value : N/A

USERNAME

Unique username for the user.
Type : String
Mandatory : Yes

Default Value : N/A

EMAIL

Primary email address of the user.
Type : Email
Mandatory : Yes

Default Value : N/A

SECONDARYEMAILID

Secondary email address of the user.
Type : Email
Mandatory : No

Default Value : N/A

ROLE

Role assigned to the user.
Type : String
Mandatory : No

Default Value : N/A

ROLEID

ID of the assigned role.
Type : Integer
Mandatory : No

Default Value : N/A

DEPARTMENT

Department to which the user belongs.
Type : String
Mandatory : No

Default Value : N/A

LOCATION

Location of the user.
Type : String
Mandatory : No

Default Value : N/A

USERGROUPNAME

Name of the user group to which the user is assigned.
Type : String
Mandatory : No

Default Value : N/A

RESTAPIACCESS

Enables REST API access for the user.
Type : Boolean
Mandatory : No

Default Value : N/A

SDKACCESS

Enables SDK access for the user.
Type : Boolean
Mandatory : No

Default Value : N/A

ISAPIUSER

Creates a strict REST API-only user.
Type : Boolean
Mandatory : No

Default Value : N/A

OWNERNAMEOPTION

This allows the user to create resources for another user.
Type : Boolean
Mandatory : No

Default Value : N/A

EXPIRYDATE

Validity period for authentication tokens, specified in the date format.
Type : String
Mandatory : No

Default Value : N/A

TOKENVALIDITYDAYS

Validity period (in days) for authentication tokens.
Type : Integer
Mandatory : No

Default Value : N/A

HOSTCHECK

Enables hostname validation for API access.
Type : Boolean
Mandatory : No

Default Value : N/A

HOSTNAME

Hostname from which the user can access PAM360.
Type : String
Mandatory : No

Default Value : N/A

Sample Request

cURLPythonPowerShell
curl -X POST -H "AUTHTOKEN: <<Authtoken-generated-from-PAM360>>" -H "Content-Type: application/x-www-form-urlencoded" "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/restapi/json/v1/user" --data-urlencode "INPUT_DATA={\"operation\":{\"Details\":{\"FIRSTNAME\":\"Jason\",\"LASTNAME\":\"J\",\"USERNAME\":\"Jason\",\"EMAIL\":\"jason@opmanager.com\",\"ROLE\":\"Administrator\",\"DEPARTMENT\":\"NOC\",\"LOCATION\":\"Level 10 - South Wing\",\"ISSUPERADMIN\":false,\"WEBACCESS\":true,\"POLICY\":\"Strong\",\"PASSWORD\":\"Test@123\",\"ENABLEMOBILEACCESS\":true,\"ENABLEADDONACCESS\":true,\"REMOTECONNECTACCESS\":true,\"REMOTECONNECTVIASSHPROXY\":false,\"ENABLETWOFACTOR\":true,\"RSAUSERNAME\":\"Jason\",\"RADIUSUSERNAME\":\"Jason\",\"PHONEFACTOR_USERNAME\":\"Jason\",\"DUOUSERNAME\":\"Jason\",\"PRIMARYCONTACT\":\"Mobile\",\"MOBILE_COUNTRYCODE\":\"91\",\"MOBILE\":\"9876543210\",\"LANDLINE\":\"12312311\",\"LANDLINE_COUNTRYCODE\":\"355\",\"LANDLINE_EXT\":\"907\",\"RESTAPIACCESS\":true,\"SDKACCESS\":true,\"OWNERNAMEOPTION\":false,\"EXPIRYDATE\":\"2025-10-30\",\"HOSTCHECK\":true,\"HOSTNAME\":\"john-1234\"}}}"		
import requests
import json

url = "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/restapi/json/v1/user"

headers = {
	"AUTHTOKEN": "<<Authtoken-generated-from-PAM360>>",
	"Content-Type": "application/x-www-form-urlencoded"
}

details = {
	"operation": {
		"Details": {
			"USERNAME": "jason",
			"FIRSTNAME": "Jason",
			"LASTNAME": "Thomas",
			"EMAIL": "jason@opmanager.com",
			"POLICY": "Strong",
			"ROLE": "Password User",
			"DEPARTMENT": "NOC",
			"LOCATION": "Level 10 - South Wing",
			"ISAPIUSER": "true",
			"HOSTNAME": "admin-2100",
			"EXPIRYDATE": "2025-12-30"
		}
	}
}

payload = {
	"INPUT_DATA": json.dumps(details)
}

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

print("Status Code:", response.status_code)
print("Response:", response.text)
$url = "https://<Host-Name or IP-Address-of-PAM360-Server>:<Port>/restapi/json/v1/user"
$Body = @{
	INPUT_DATA = '{"operation":{"Details":{
		USERNAME: "jason",
		FIRSTNAME: "Jason",
		LASTNAME: "Thomas",
		EMAIL: "jason@opmanager.com",
		POLICY: "Strong",
		ROLE: "Password User",
		DEPARTMENT: "NOC",
		LOCATION: "Level 10 - South Wing",
		ISAPIUSER: "true",
		HOSTNAME: "admin-2100",
		EXPIRYDATE: "2024-12-30"
	}}}'
}
$Header = @{
	"AUTHTOKEN" = "<<Authtoken-generated-from-PAM360>>"
}
$response = Invoke-WebRequest -Method Post -Headers $Header -Uri $url -Body $Body
$response.Content

Sample Response

{
	"operation": {
		"result": {
			"message": "User jason has been added successfully.",
			"status": "true"
		},
		"Details": {
			"AUTHTOKEN": "8B29C152-449B-42B8-8911-B35484F9FC32",
			"USERID": "603"
		},
		"name": "CREATE_USER"
	}
}



Top