Villkor en Bitwarden .csv eller .json
Den här artikeln definierar formatet du ska använda när du manuellt konditionerar en .csv
eller .json
för import till Bitwarden. Det här formatet är identiskt med det som används av .csv-
eller .json-filer
skapade genom att exportera ditt Bitwarden-valv.
Se till att du använder rätt format beroende på om du importerar data till ditt valv eller till ett organisationsvalv.
Villkor a .csv
tip
Bitwarden .csv
files will only handle logins and secure notes. If you need to import or export identities and cards as well, use JSON.
.csv för individuellt valv
Skapa en UTF-8-kodad klartextfil med följande rubrik som första rad i filen:
Bashfolder,favorite,type,name,notes,fields,reprompt,login_uri,login_username,login_password,login_totp
Till exempel:
Bashfolder,favorite,type,name,notes,fields,reprompt,login_uri,login_username,login_password,login_totp
Social,1,login,Twitter,,,0,twitter.com,me@example.com,password123,
,,login,EVGA,,,,https://www.evga.com/support/login.asp,hello@bitwarden.com,fakepassword,TOTPSEED123
,,login,My Bank,Bank PIN is 1234,"PIN: 1234",,https://www.wellsfargo.com/home.jhtml,john.smith,password123456,
,,note,My Note,"This is a secure note.",,,,,
När du importerar den här filen, välj Bitwarden (csv) som ditt filformat.
.csv för organisation
Skapa en UTF-8-kodad klartextfil med följande rubrik som första rad i filen:
Bashcollections,type,name,notes,fields,reprompt,login_uri,login_username,login_password,login_totp
Till exempel,
Bashcollections,type,name,notes,fields,reprompt,login_uri,login_username,login_password,login_totp
"Social,Marketing",login,Twitter,,,0,twitter.com,me@example.com,password123,
"Finance",login,My Bank,"Bank PIN is 1234","PIN: 1234",0,https://www.wellsfargo.com/home.jhtml,john.smith,password123456,
"Finance",login,EVGA,,,0,https://www.evga.com/support/login.asp,hello@bitwarden.com,fakepassword,TOTPSEED123
"Finance",note,My Note,"This is a secure note.",,0,,,
tip
If you're conditioning a .csv
with nested collections, create dedicated entries for each collection that does not have an an item in it, for example:
Bashcollections,type,name,notes,fields,reprompt,login_uri,login_username,login_password,login_totp Parent Collection,,,,,,,,,, Parent Collection/First Child Collection,,,,,,,,,, Parent Collection/First Child Collection/Second Child Collection,login,Shared Credential,,,,https://website.com,username,password,,
När du importerar den här filen, välj Bitwarden (csv) som ditt filformat.
Minsta nödvändiga värden
Du kanske inte har data för alla värden som visas i ovanstående format, men de flesta är valfria. För att Bitwarden .csv-importören
ska fungera korrekt behöver du bara ha följande värden för ett givet objekt:
Bashfolder,favorite,type,name,notes,fields,reprompt,login_uri,login_username,login_password,login_totp ,,login,Login Name,,,,,, ,,note,Secure Note Name,,,,,,
Villkor med .json
.json för individuellt valv
Skapa en UTF-8-kodad klartextfil i följande format:
Bash{
"folders": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "Folder Name"
},
...
],
"items": [
{
"passwordHistory": [
{
"lastUsedDate": "YYYY-MM-00T00:00:00.000Z",
"password": "passwordValue"
}
],
"revisionDate": "YYYY-MM-00T00:00:00.000Z",
"creationDate": "YYYY-MM-00T00:00:00.000Z",
"deletedDate": null,
"id": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
"organizationId": null,
"folderId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"type": 1,
"reprompt": 0,
"name": "My Gmail Login",
"notes": "This is my gmail login for import.",
"favorite": false,
"fields": [
{
"name": "custom-field-1",
"value": "custom-field-value",
"type": 0
},
...
],
"login": {
"uris": [
{
"match": null,
"uri": "https://mail.google.com"
}
],
"username": "myaccount@gmail.com",
"password": "myaccountpassword",
"totp": otpauth://totp/my-secret-key
},
"collectionIds": null
},
...
]
}
När du importerar den här filen, välj Bitwarden (json) som ditt filformat.
.json för organisation
Skapa en UTF-8-kodad klartextfil i följande format:
Bash{
"collections": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"organizationId": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
"name": "My Collection",
"externalId": null
},
...
],
"items": [
{
"passwordHistory": [
{
"lastUsedDate": "YYYY-MM-00T00:00:00.000Z",
"password": "passwordValue"
}
],
"revisionDate": "YYYY-MM-00T00:00:00.000Z",
"creationDate": "YYYY-MM-00T00:00:00.000Z",
"deletedDate": null,
"id": "vvvvvvvv-vvvv-vvvv-vvvv-vvvvvvvvvvvv",
"organizationId": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
"folderId": "zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz",
"type": 1,
"reprompt": 1,
"name": "Our Shared Login",
"notes": "A login for sharing",
"favorite": false,
"fields": [
{
"name": "custom-field-1",
"value": "custom-field-value",
"type": 0
},
...
],
"login": {
"uris": [
{
"match": null,
"uri": "https://mail.google.com"
}
],
"username": "myaccount@gmail.com",
"password": "myaccountpassword",
"totp": otpauth://totp/my-secret-key
},
"collectionIds": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
},
...
]
}
När du importerar den här filen, välj Bitwarden (json) som ditt filformat.
Importera till befintliga samlingar
Genom att konditionera din organisations .json-fil
på lämpligt sätt kan du importera nya inloggningsobjekt till redan existerande samlingar.
Följande exempel visar det rätta formatet för att importera ett enstaka objekt till en redan existerande samling. Observera att du måste:
Skaffa organisations- och samlings-ID. Dessa kan erhållas genom att navigera till samlingen i din webbapp och dra dem från adressfältet (t.ex.
https://vault.bitwarden.com/#/organizations/<organizationId> /vault?collectionId=<collectionId>
).Definiera en
"samlingar
": [] array som innehåller data för den redan existerande samlingen, inklusive organisations- och samlings-ID:n (se ovan) samt dess namn. Så länge dessa 3 datapunkter stämmer överens, skapas inte en ny samling vid import och istället kommer objekt i filen att importeras till den redan existerande samlingen.
Bash{
"encrypted": false,
"collections": [
{
"id": "b8e6df17-5143-495e-92b2-aff700f48ecd",
"organizationId": "55d8fa8c-32bb-47d7-a789-af8710f5eb99",
"name": "My Existing Collection",
"externalId": null
}
],
"folders": [],
"items": [
{
"id": "2f27f8f8-c980-47f4-829a-aff801415845",
"organizationId": "55d8fa8c-32bb-47d7-a789-af8710f5eb99",
"folderId": null,
"type": 1,
"reprompt": 0,
"name": "Item to Import",
"notes": "A login item for sharing.",
"favorite": false,
"login": {
"uris": [
{
"match": null,
"uri": "https://mail.google.com"
}
],
"username": "my_username",
"password": "my_password",
"totp": null
},
"collectionIds": ["b8e6df17-5143-495e-92b2-aff700f48ecd"]
}
]
}
Minsta nödvändiga nyckel-värdepar
Du kanske inte har data för alla nyckel-värdepar som visas i ovanstående format, men de flesta är valfria. För att Bitwarden .json-importören
ska fungera korrekt behöver du bara ha följande nyckel-värdepar för varje objekt:
Bash{
"items": [
{
"type": 1,
"name": "Login Item's Name",
"login": {}
},
{
"type": 2,
"name": "Secure Note Item's Name",
"secureNote": {}
},
{
"type": 3,
"name": "Card Item's Name",
"card": {}
},
{
"type": 4,
"name": "Identity Item's Name",
"identity": {}
}
]
}
Objekten "login"
, "secureNote":
, "card
": och "identity":
kan importeras som tomma objekt, men vi rekommenderar att filer konditioneras med så mycket data du kan.