Will there ever be a CLI option or Connect Rest API to export all account data in .1pux format?

Options
Norkz
Norkz
Community Member

Hello,

Hope you are having a great day.

My goal:

I want to automatically backup my 1password account and export the 1pux file every week automatically.

Issue:

From what I have found the only way possible is by manually exporting from a 1password app. I want to be able to have different options of exporting a 1password account in the 1pux format.

Proposal:

Let's say that the 1password app export executes a client side API which triggers a series of API's or just one of them on the server for the 1password account which then curates the file and downloads it.

I believe it would be great if that same API were to be accessible via CLI with an option of export with the parameters of --account, --export-format, and --output.

For example:
op export --account="NAME_OF_ACCOUNT" --export-format="1PUX" --output="./"

As well via 1password/connect-api Rest API.

What I have done to get to the goal:

I have unzipped the 1pux file and looked over all the data and files that are now visible. I took a close look at the export.data file and thought of the idea to curate the file myself with 1password CLI, 1password/connect-api Rest API's, and the 1password Go SDK.

Below are two files, the export.data that I curated with all that I could find and the example export.data from the About the 1Password Unencrypted Export format site.

The one that I curated did not even come close the example export.data contents and I am going to brainstorm more ideas and test them to see if I can find a way around this as well.

At the beginning my first idea was to have a Virtual Machine in Windows or Linux and automate the 1password app export process and have it run weekly, although this is not what is needed but rather something smaller such as some scripts bundled together with dockerfiles and docker compose files which is apart of my goal.

1password CLI and Go SDK curated **export.data**:

{
  "accounts": [
    {
      "attrs": {
        "accountName": "xxx",
        "name": "xxx",
        "avatar": "profile-pic.png",
        "email": "example@example.com",
        "uuid": "xxx",
        "domain": "https://my.1password.com"
      },
      "vaults": [
        {
          "attrs": {
            "accountName": "",
            "name": "xxx",
            "avatar": "",
            "email": "",
            "uuid": "xxx",
            "domain": ""
          },
          "items": [
            {
              "id": "xxx",
              "title": "xxx",
              "version": 1,
              "vault": {
                "id": "xxx"
              },
              "category": "SSH_KEY",
              "fields": [
                {
                  "id": "notesPlain",
                  "type": "STRING",
                  "purpose": "NOTES",
                  "label": "notesPlain"
                },
                {
                  "id": "public_key",
                  "type": "STRING",
                  "label": "public key",
                  "value": "xxx"
                },
                {
                  "id": "fingerprint",
                  "type": "STRING",
                  "label": "fingerprint",
                  "value": "xxx"
                },
                {
                  "id": "private_key",
                  "type": "SSHKEY",
                  "label": "private key",
                  "value": "xxx"
                },
                {
                  "id": "key_type",
                  "type": "STRING",
                  "label": "key type",
                  "value": "rsa"
                }
              ],
              "lastEditedBy": "xxx",
              "createdAt": "xxx",
              "updatedAt": "xxx"
            }
          ]
        }
      ]
    }
  ]
}

export.data example from About the 1Password Unencrypted Export format

{
  "accounts": [
    {
      "attrs": {
        "accountName": "Wendy Appleseed",
        "name": "Wendy Appleseed",
        "avatar": "profile-pic.png",
        "email": "wendy.c.appleseed@gmail.com",
        "uuid": "D4RI47B7BJDT25C2LWA7LEJLHZ",
        "domain": "https://my.1password.com/"
      },
      "vaults": [
        {
          "attrs": {
            "uuid": "rr3lr6c2opoggvrete23q72ahi",
            "desc": "",
            "avatar": "pic.png",
            "name": "Personal",
            "type": "P"
          },
          "items": [
            {
              "uuid": "fkruyzrldvizuqlnavfj3gltfe",
              "favIndex": 1,
              "createdAt": 1614298956,
              "updatedAt": 1635346445,
              "state": "active",
              "categoryUuid": "001",
              "details": {
                "loginFields": [
                  {
                    "value": "most-secure-password-ever!",
                    "id": "",
                    "name": "password",
                    "fieldType": "P",
                    "designation": "password"
                  }
                ],
                "notesPlain": "This is a note. *bold*! _italic_!",
                "sections": [
                  {
                    "title": "Security",
                    "name": "Section_oazxddhvftfknycbbmh5ntwfa4",
                    "fields": [
                      {
                        "title": "PIN",
                        "id": "CCEF647B399604E8F6Q6C8C3W31AFD407",
                        "value": {
                          "concealed": "12345"
                        },
                        "indexAtSource": 0,
                        "guarded": false,
                        "multiline": false,
                        "dontGenerate": false,
                        "inputTraits": {
                          "keyboard": "default",
                          "correction": "default",
                          "capitalization": "default"
                        }
                      }
                    ]
                  }
                ],
                "passwordHistory": [
                  {
                    "value": "12345password",
                    "time": 1458322355
                  }
                ],
                "documentAttributes": {
                  "fileName": "My movie.mp4",
                  "documentId": "o2xjvw2q5j2yx6rtpxfjdqopom",
                  "decryptedSize": 3605932
                }
              },
              "overview": {
                "subtitle": "",
                "urls": [
                  {
                    "label": "",
                    "url": "https://www.dropbox.com/"
                  }
                ],
                "title": "Dropbox",
                "url": "https://www.dropbox.com/",
                "ps": 100,
                "pbe": 86.13621,
                "pgrng": true
              }
            }
          ]
        }
      ]
    }
  ]
}

What am I willing to do?

I am willing to contribute in any way possible to make this a reality.


1Password Version: latest
Extension Version: latest
OS Version: Linux
Browser: Brave

Comments

  • Norkz
    Norkz
    Community Member
    Options

    I have made a solution to this as a tool.