Custom Template Encoding?
I'm using the op
tool to get a custom template and the json response appears to be encoded. Is this expected, and if so what is the best way to decode it? Here's an example:
> op get template MyTemplate
{"notesPlain":"","passwordHistory":[],"sections":[{"fields":[{"k":"string","n":"ajo2aydubilfut22zujmyxjkcy","t":"","v":""}],"name":"gtm3wc6jvivxa6r6q3mbvdbeni","title":""}]}
This does not appear to be the case for the built-in templates:
> op get template login
{"fields":[{"designation":"username","name":"username","type":"T","value":""},{"designation":"password","name":"password","type":"P","value":""}],"notesPlain":"","passwordHistory":[],"sections":[]}
1Password Version: 1.8.0
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided
Comments
-
Hey @tkeeler ,
Perhaps you'll find this post helpful: https://1password.community/discussion/comment/588416/#Comment_588416
As you can see from the example command there, you do need to tell the CLI to encode the items.Let me know if that helped.
0 -
Thanks, I did come across this when I was originally searching for an answer. It doesn't directly help, but it does help me understand the key/value structure a bit more.
I believe the issue is creating a custom template on the 1Password site. It appears the
n
value gets set to a random ID and thet
value doesn't get set properly. In my template the field name is set to 'Testing' but it doesn't appear in myop get template MyTemplate
response. I'm assuming this is a bug?Is there another method to create a template?
0 -
Thank you for the follow-up!
0 -
No problem :+1:
0