In playing with audits and adding them to some katello models, I’m curious if anyone can help me with the API. You can see an audit below with the json. I’ve added audited associated_with :repository to a couple models and then has_associated_audits to the Repository model. This all seems to work great.
So first thing is, should I create a new audits api endpoint in katello to handle the auto-complete values, etc?
Regardless of new endpoint or enhance the existing, should I change some params allowable in the search or the index call?
In my case, I’d like to pass in a Lifecycle Environment ID and find the audits for all the associated Repository models. Similarly for Content View or Product ID. Note that those two objects are not currently audited themselves but referenced repositories.
Alternatively, I could add an audits endpoint to the repositories controller.
Thoughts?
action: "update"
associated_id: null
associated_name: null
associated_type: null
auditable_id: 42
auditable_name: "alpine"
auditable_type: "Katello::Repository"
audited_changes:
last_pulled_at: ["2018-06-07T18:17:55.806Z", "2018-06-07T18:18:01.575Z"]
comment: "pull 'alpine' by digest 'sha256:2441496fb9f0d938e5f8b27aba5cc367b24078225ceed82a9a5e67f0d6738c80'"
created_at: "2018-06-07 14:18:01 -0400"
id: 239
remote_address: "127.0.0.1"
user_id: 4
user_name: null
user_type: null
version: 3