REST API - 'Get session management of platform' API expects int64 value for PlatformID
Symptom
When using the 'Get session management policy of platform' REST API call (as documented here:- https://<PVWA_Server_address>/PasswordVault/API/Platforms/Targets/{PlatformId}/PrivilegedSessionManagement/), using the PlatformID returned from the 'Get target platforms' REST API call (https://docs.cyberark.com/pam-self-hosted/12.6/en/content/sdk/session%20mngmnt%20-%20get_session_management_policy_platform.htm?TocPath=Developer%7CREST%20APIs%7CSession%20Management%7C_____4), the following error is returned:-
{"Details":[{"ErrorCode":"","ErrorMessage":"The value '<PlatformID previously entered>' is not valid for Int64.","ParameterName":"platformID"}],"ErrorCode":"PASWS167E","ErrorMessage":"There are some invalid parameters"}
Environment
11.5;12.2;12.6;13.0;13.2;14.0;14.2;14.3 Privileged Access Manager (PAM, self-hosted) Cyber-Ark API/SDK Cyber-Ark API/SDK REST API
Cause
The value for PlatformID is incorrect. The PlatformID property in the 'Get session management policy of platform' API call is expected to be an integer value
The correct parameter to use from the 'Get target platforms' API call is 'ID', which is an integer value, and not 'PlatformID', which is a string value.
Resolution
Use the 'ID' parameter from the 'Get target platforms' REST API call output for the 'PlatformID' value in the 'Get session management policy of platform' REST API call