> For the complete documentation index, see [llms.txt](https://manual.dxable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual.dxable.com/1password/item-fields.md).

# アイテムフィールド

[1Password CLIを使ってアイテムをCreateする](https://developer.1password.com/docs/cli/item-create/)場合、[組み込みフィールド](https://developer.1password.com/docs/cli/item-fields/#built-in-fields)と[カスタム](https://developer.1password.com/docs/cli/item-fields/#custom-fields)フィールドを使ってアイテムをカスタマイズできます。

割り当てステートメントまたは JSON テンプレートを使って、[組み込みフィールドとカスタム フィールドをアイテムに追加する](https://developer.1password.com/docs/cli/item-create/#create-a-customized-item)方法を紹介します。

### **組み込みフィールド** <a href="#re0zaw7iddpx" id="re0zaw7iddpx"></a>

アイテムに使える組み込みフィールドは、アイテムのカテゴリーによって異なります。例えば、データベース アイテムには、組み込みフィールドとしてusername、password、database\_type、hostname、notesPlain、port、database、sid、alias、およびoptionsが含まれます。

アイテムカテゴリーの[JSON テンプレート](https://developer.1password.com/docs/cli/item-template-json/)を確認することで、利用可能な組み込みフィールドを識別できます。

```
op item template get <category>
```

<details>

<summary>全てのカテゴリーを見る</summary>

* API Credential
* Bank Account
* Credit Card
* Crypto Wallet
* Database
* Document
* Driver License
* Email Account
* Identity
* Login
* Medical Record
* Membership
* Outdoor License
* Passport
* Password
* Reward Program
* Secure Note
* Server
* Social Security Number
* Software License
* SSH Key
* Wireless Router

</details>

例えば、ログイン項目で使える組み込みフィールドは`username`、`password`、`notesPlain`です。

<details>

<summary>ログイン・アイテムのJSONテンプレートを表示する</summary>

```
$ {
  "title": "",
  "category": "LOGIN",
  "fields": [
    {
      "id": "username",
      "type": "STRING",
      "purpose": "USERNAME",
      "label": "username",
      "value": ""
    },
    {
      "id": "password",
      "type": "CONCEALED",
      "purpose": "PASSWORD",
      "label": "password",
      "password_details": {
        "strength": "TERRIBLE"
      },
      "value": ""
    },
    {
      "id": "notesPlain",
      "type": "STRING",
      "purpose": "NOTES",
      "label": "notesPlain",
      "value": ""
    }
  ]
$ 
```

</details>

[代入文](https://developer.1password.com/docs/cli/item-create/#with-assignment-statements)を使って組み込みフィールドを割り当てる場合は、代入ステートメントで`idJSON` テンプレートのを使用します`field`。例えば、代入ステートメントを使ってログイン項目にメモを追加するには、次のようにします。

```
$ 'notesPlain=This is a note.'
```

### **カスタムフィールド** <a href="#id-969fdgm3i7pm" id="id-969fdgm3i7pm"></a>

カスタムフィールドは、アイテムのカテゴリに関係なく、どのアイテムにも追加できます。 `fieldType`は代入文、`type`はアイテムのJSONテンプレートで使用します。 利用可能なカスタムフィールドタイプは以下の通りです。

| `fieldType` | `type`       | description                                                                                                                   |
| ----------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------- |
| `password`  | `CONCEALED`  | 隠されたパスワード。                                                                                                                    |
| `text`      | `STRING`     | テキスト文字列。                                                                                                                      |
| `email`     | `EMAIL`      | メールアドレス。                                                                                                                      |
| `url`       | `URL`        | 1Passwordがログインの提案や認証情報の自動入力に使うプライマリ―のウェブアドレス。このフィールドは、ログイン、パスワード、API 認証情報の項目に追加できます。                                          |
| `date`      | `DATE`       | `YYYY-MM-DD`形式の日付。                                                                                                            |
| `monthYear` | `MONTH_YEAR` | `YYYYMM`または`YYYY/MM`の形式の日付。                                                                                                   |
| `phone`     | `PHONE`      | 電話番号。                                                                                                                         |
| `otp`       | `OTP`        | ワンタイムパスワード。値として[`otpauth://`形式のURIを受け入れます。](https://github.com/google/google-authenticator/wiki/Key-Uri-Format)               |
| `file`      | N/A          | ファイルの添付。値としてファイルへのパスを受け入れます。[代入](https://developer.1password.com/docs/cli/item-create/#with-assignment-statements)文でのみ追加できます。 |

### **さらに詳しく知るには** <a href="#elyl1tchqm0m" id="elyl1tchqm0m"></a>

* &#x20;[`op item`参照ドキュメント](https://developer.1password.com/docs/cli/reference/management-commands/item/)
* [アイテムをCreateする](https://developer.1password.com/docs/cli/item-create/)
* [アイテムJSONテンプレート](https://developer.1password.com/docs/cli/item-template-json/)
