How to utilize PAM's API to create devices with Access Methods and Group Membership

Document ID : KB000117698
Last Modified Date : 17/10/2018
Show Technical Document Details
Introduction:
PAM Admin is not successful while trying to use our 

POST /api.php/v1/devices.json API

to create devices.  He is unable to utilize the JSON arrays to add multiple access methods and would like to see an example.
Environment:
PAM 3.x
Instructions:
Supplied the following successful example to our customer:


"description":"TestAPI", 
"deviceName":"dedke01-api", 
"domainName":"192.168.2.1", 
"location":"Test", 
"os":"Windows 2008", 
"deviceAccessMethods":[ 
{"id": "5", "type": "RDP", "customName": "", "port": "3389"}, 
{"id": "9", "type": "SSH", "customName": "", "port": "22"} 
], 
"deviceGroupMembershipIds":[9], 
"typeAccess": "t", 
"typePassword": "t", 
"typeA2A": "f", 
"provisionType": "Local"