List of Custom Field Types for login items and any other items

PeterCharleston
PeterCharleston
Community Member

In the Browser you can select "Password" in the CLI you specify: "concealed"

I am looking specifically for the CLI Custom field for "URL" please and if there is a full list somewhere that would be great
I have Tried 'URL' and 'WebSite' both of which did not work


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided

Comments

  • Hello @PeterCharleston

    There are two different methods of adding a URL to a new item, depending on how you want them to appear in 1Password.

    1. The --url flag

    First, If you want the item to be auto-filled by the 1Password extension, then I would recommend using the --url flag when creating an item.

    For example, if I have already saved a JSON file with the other fields I want stored, I could use:

     op create item Login --title 'New Item' --url 'https://example.com/new-item' --template login.json
    

    which would result in this Login item in my 1Password app:

    Due to a current limitation in the command-line tool, you can only store one URL this way, even though our other 1Password apps and extension allow for several possible URLs to be autofilled (for example, I know that ticketmaster.ca and ticketmaster.com share the same credentials

    2. The URL kind

    Second, if you want to store multiple URLs that will not get autofilled, then you can add them into the template JSON file using a "k": "URL". Here is an example Login template file that I've filled in with some URLs:

    {
      "fields": [
        {
          "designation": "username",
          "name": "username",
          "type": "T",
          "value": "the-username"
        }
      ],
      "notesPlain": "",
      "passwordHistory": [],
      "sections": [
          {
              "fields": [
                {
                    "t": "some expiration date",
                    "n": "some-expiration-date",
                    "k": "monthYear",
                    "v": 200601
                },
                {
                    "t": "backup url",
                    "n": "backup-url",
                    "k": "URL",
                    "v": "https://example.com/backup-url"
                },
                {
                    "t": "change password url",
                    "n": "change-password-url",
                    "k": "URL",
                    "v": "https://example.com/change-password"
                }
              ],
              "name": "the-name",
              "title": "Section Number 1"
          }
      ]
    }
    
    

    I can use this to create a new Login vault item:

     op create item Login --vault V --generate-password --title 'With Kind URLs' --template login.json
    

    You had also asked for a list of the possible kinds of values:

    • address
    • cctype
    • concealed
    • date
    • email
    • gender
    • menu
    • monthYear
    • phone
    • reference
    • string
    • URL
    • file

    with a few extra details:

    • the concealed type can also have a "n" field that starts with totp for one-time passcodes
    • the string type can also have a "n" field that starts with ccnum, for 16-digit credit card numbers

    I hope that this helps. Please feel to let me know if you have any additional questions or if I missed or misunderstood one of your points.

    Michael

  • PeterCharleston
    PeterCharleston
    Community Member

    Hey Michael,

    thanks alot.
    This is great and just what I needed

    Peter

  • ag_ana
    ag_ana
    1Password Alumni

    On behalf of Michael, you are welcome @PeterCharleston! If you have any other questions, please feel free to reach out anytime.

    Have a wonderful day :)

This discussion has been closed.