IBM-Security / ibmsecurity

Idempotent functions for IBM Security Appliance REST APIs. Currently covering ISAM and ISDS Appliances.
Apache License 2.0
47 stars 73 forks source link

On ISAM `application_logs.clear` and `application_logs.delete`, `file_id` parameter should be `file_path` instead #174

Open kalemontes opened 5 years ago

kalemontes commented 5 years ago

Leaving the parameter name to file_id on application_logs.clear and application_logs.delete is misleading. This API call actually uses the file_path as the other /isam/application_logs functions.

For instance, when calling /isam/application_logs/get_all we will get the following response body :

{
    "contents": [
        {
            "path": "access_control/auditing",
            "name": "audit.log",
            "id": 0,
            "type": "File",
            "version": "1545058628",
            "file_size": 0
        }
    ]
}

If you use the real file id, here it would be 0, when calling we usually get the following response "message": "The requested resource does not exist." while using the full file path, here it would be access_control/auditing/audit.log, it will do the expected job.

ram-ibm commented 5 years ago

The intention was to match the REST API documentation for the variables used in the function - so we did not have to document it again.

Looks like both clear() and delete() should simply take "files". Will look into updating it - problem is it may cause folks playbooks to break. Will need to think about how to maintain backward compatibility...