Last modified date?
Hello all,
I have a need to check the last modified date for all shared vaults to update a set of passwords on a 30 day schedule. I have pulled from shared vaults in the past and filtered on fields however I am not sure how to filter on the last modified date. Any ideas?
1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided
Comments
-
Hey @Kennyties ,
When you use
op get item xxxxx
you will see that one of the first things in the list of info it shows you is theupdatedAt
variable, which is structured like so:2021-03-16T08:09:04Z
.You can compare the
updatedAt
variable of every item in any vault with a specific date/time in your script, and if the last updated date is earlier than what the script requires, execute whichever commands you need to change the password.0 -
Yes @Kennyties ,
If you fetch an entire item and not a specific field, you'll get its metadata as well. Then, you can parse it in your script and check the last update date and do what you will with it :)
0 -
Thanks!
0 -
Glad I could help :+1:
0 -
Hey @ag_yaron just a quick update on this, I hit a few roadblocks on this but then I was reminded that I was not converting my request from JSON. So I created a variable to run on all share vaults and converted to JSON and then did $variablename.lastmodified to call the password.
Completely unrelated is there any plans to implement a code option in the forum here? It would be super helpful.0 -
Completely unrelated is there any plans to implement a code option in the forum here? It would be super helpful.
Edit:
You can already do this with a triple "`" character, so like this: "```" at the beginning and end of your code. Please see here an example.
0 -
You are very welcome @Kennyties, I am glad I could help :)
0