Rest API call PUT /api.php/v1/devices.json returns 204 (No Content) instead of the documented 200 (OK)
search cancel

Rest API call PUT /api.php/v1/devices.json returns 204 (No Content) instead of the documented 200 (OK)

book

Article ID: 196330

calendar_today

Updated On: 10-21-2021

Products

CA Privileged Access Manager (PAM)

Issue/Introduction

We are rewriting our on-boarding scripts with Python v3 to accommodate for Red Hat 8 entering the environment. The systems programmer is getting a 204 status code returned when executing

PUT /api.php/v1/devices.json

to update an existing device in PAM. The Settings > Api Doc page states that the return code should be 200. Is this a documentation mistake, or is our PAM server not responding as expected?

 

Environment

This affects all supported PAM releases as of July 2020 with 3.4.1 being the latest release.

Cause

The API call in fact is implemented to return no content and status code 204. The Rest API documentation is incorrect.

Resolution

PAM Engineering confirmed that the returned status code of 204 is correct, and that the description in Api Doc will be updated in future releases to reflect the actual API behavior.

Additional Information

In PAM 3.4.5 and 4.0.1 - we document successful is return code 204 for this API