API Scripts and Usage Audits

Well, it s a new year and it is time to go back and review and quantify my existence.  Via the API it is possible to added fields to a script.  I'd like to add a field that is a counter that incrementally adds a value to the the number field every time the script is used.  Was hoping you Shotgun guys might be able to share with me a way to do so.  Maybe a small python example.  I'd also like the ability to link the event of the usage to the script to a specified user.  Right now it appears that all events are linked to the script and that is good, but I need to know which users are using what scripts and how often.  Any insight as to how to set this up would be of great value to users especially starting a new year and reviewing the last year.



1 条评论

  • 0
    Mike Romey

    Well, I think I figured out how to do this. It was actually quite simple.  You can create and API command that generates and Event Log.  So for every tool developed I added a custom audit creation event that links to the script, user and project.  I was able to deploy it early this morning and within hours was able to monitor the usage of many of our tools.  To help with the auditing process I created some custom fields for usage time and dollars to calculate the time and money saved by using the new tool vs. the old tools.  I think with in a short period of time I should be able to calculate the ROI ( return of Investment ) on our development.  The problem now is back logging.  I think I need to create custom fix-it script to calculate how many times the tool was used prior to my deployment.   In itself this is fairly styraight forward the catch is that I need the events to be back dated for the create_at filed. Id' like to eventually calculate the rate of adoption of the tools.  But it appears as though the create_at field is locked.  Might need to find a way to unlock this as well as unlock the ability to delete test-it entries.