1Password Connect Server APIリファレンス

1Passwordマニュアル|1Password Connect Server APIリファレンスを活用し、Secrets Automationの導入方法と初期設定手順を詳しく解説します。

ℹ️情報 1Password Secrets Automation と 1Password Connect Server を初めて使う場合は、Secrets Automationワークフローの開始方法を学習してください

Connect APIを使うと、アカウント内の保管庫やアイテムを操Createしたり、Connectサーバー上の APIアクティビティーを一覧表示したりできます。

リクエストヘッダー

保管庫をリストする​

保管庫の詳細を取得する​

アイテムをリストする

アイテムを追加する​

アイテムの詳細を取得する​

アイテムを置き換える​

アイテムを削除する

アイテム属性のサブセットを更新する

ファイルをリストする​

ファイルの詳細を取得する​

ファイルの内容を取得する​

APIアクティビティーをリストする​

サーバーのハートビートチェック​

サーバーのヘルスチェック​

メトリクスを取得する

レスポンスオブジェクトモデル​

別のツールでAPIを表示するには、API仕様ファイル:1password-connect-api.yamlをダウンロードしてください。

リクエストヘッダー

APIへの各リクエストはアクセストークンで認証される必要があります。それを提供し、コンテンツ タイプを指定します。

Authorization: Bearer <access_token> Content-type: application/json

保管庫をリストする

GET /v1/vaults

Pathパラメーター

Pathパラメーターはありません。

Queryパラメーター

パラメーター

タイプ

詳細

filter

string

Filter the vault collection using SCIM-style filters. Vaults can only be filtered by name. Optional.

For example: name eq "Demo Vault"

レスポンス

200

Returns an array of vault names and IDs

401

Invalid or missing token

保管庫の詳細を取得する

GET /v1/vaults/{vaultUUID}

Pathパラメーター

パラメーター

タイプ

詳細

vaultUUID

string

The UUID of the vault to retrieve items from.

Queryパラメーター

Queryパラメーターはありません。.

レスポンス

200

Returns a Vault object

401

Invalid or missing token

403

Unauthorized access

404

Vault not found

アイテムをリストする

GET /v1/vaults/{vaultUUID}/items

Pathパラメーター

パラメーター

タイプ

詳細

vaultUUID

string

The UUID of the vault to get the details of.

Queryパラメーター

パラメーター

タイプ

詳細

filter

string

Filter the item collection using SCIM-style filters . Items can only be filtered by title or tag. Optional.

For example: title eq "Example Item" or tag eq "banking"

レスポンス

200

Returns an array of Item objects that don't include sections and fields

401

Invalid or missing token

404

Vault not found

アイテムを追加する

POST /v1/vaults/{vaultUUID}/items

このリクエストには、アイテムをCreateするための情報を含むFullItemオブジェクトが含まれている必要があります。

例:

{

"vault": {

"id": "ftz4pm2xxwmwrsd7rjqn7grzfz"

},

"title": "Secrets Automation Item",

"category": "LOGIN",

"tags": [

"connect",

"\ud83d\udc27"

],

"sections": [

{

"label": "Security Questions",

"id": "95cdbc3b-7742-47ec-9056-44d6af82d562"

}

],

"fields": [

{

"value": "wendy",

"purpose": "USERNAME"

},

{

"purpose": "PASSWORD",

"generate": true,

"recipe":

{

"length": 55,

"characterSets": [

"LETTERS",

"DIGITS"

]

}

},

{

"section": {

"id": "95cdbc3b-7742-47ec-9056-44d6af82d562"

},

"type": "CONCEALED",

"generate": true,

"label": "Recovery Key"

},

{

"section": {

"id": "95cdbc3b-7742-47ec-9056-44d6af82d562"

},

"type": "STRING",

"generate": true,

"label": "Random Text"

},

{

"type": "URL",

"label": "Example",

"value": "https://example.com"

}

]

}

パラメーター

タイプ

詳細

title

string

The title of the item.

vault

object

An object containing an id property whose value is the UUID of the vault the item is in.

category

string

The category of the item. One of:

  • "LOGIN"

  • "PASSWORD"

  • "API_CREDENTIAL"

  • "SERVER"

  • "DATABASE"

  • "CREDIT_CARD"

  • "MEMBERSHIP"

  • "PASSPORT"

  • "SOFTWARE_LICENSE"

  • "OUTDOOR_LICENSE"

  • "SECURE_NOTE"

  • "WIRELESS_ROUTER"

  • "BANK_ACCOUNT"

  • "DRIVER_LICENSE"

  • "IDENTITY"

  • "REWARD_PROGRAM"

  • "EMAIL_ACCOUNT"

  • "SOCIAL_SECURITY_NUMBER"

  • "MEDICAL_RECORD"

  • "SSH_KEY"

You can't create items using the "CUSTOM" or "DOCUMENT" categories.

urls

array

Array of URL objects containing URLs for the item.

favorite

boolean

Mark the item as a favorite.

tags

string

An array of strings of the tags assigned to the item.

fields

array

An array of Field objects of the fields to include with the item.

sections

array

An array of Section objects of the sections to include with the item.

Pathパラメーター

パラメーター

タイプ

詳細

vaultUUID

string

The UUID of the vault to create an item in.

Queryパラメーター

Queryパラメーターはありません。.

レスポンス

200

Returns Item object containing the new item

400

Unable to create item due to invalid input

401

Invalid or missing token

403

Unauthorized access

404

Item not found

アイテムの詳細を取得する

GET /v1/vaults/{vaultUUID}/items/{itemUUID}

Pathパラメーター

パラメーター

タイプ

詳細

vaultUUID

string

The UUID of the vault to retrieve the item from.

itemUUID

string

The UUID of the item to retrieve.

Queryパラメーター

Queryパラメーターはありません。.

レスポンス

200

Returns an Item object

401

Invalid or missing token

403

Unauthorized access

404

Item not found

アイテムを置き換える

PUT /v1/vaults/{vaultUUID}/items/{itemUUID}

Pathパラメーター

パラメーター

タイプ

詳細

vaultUUID

string

The UUID of the vault to retrieve the item from.

itemUUID

string

The UUID of the item to replace.

Queryパラメーター

Queryパラメーターはありません。.

レスポンス

200

Returns an Item object

400

Unable to create item due to invalid input

401

Invalid or missing token

403

Unauthorized access

404

Item not found

アイテムを削除する

DELETE /v1/vaults/{vaultUUID}/items/{itemUUID}

Pathパラメーター

パラメーター

タイプ

詳細

vaultUUID

string

The UUID of the vault to retrieve the item from.

itemUUID

string

The UUID of the item to delete.

Queryパラメーター

Queryパラメーターはありません。.

レスポンス

204

Successfully deleted an item

401

Invalid or missing token

403

Unauthorized access

404

Item not found

アイテム属性のサブセットを更新する

PATCH /v1/vaults/{vaultUUID}/items/{itemUUID} アイテムまたはアイテムのフィールドに追加、削除、または置換操Createを適用します。RFC6902 JSON Patchドキュメント標準を使用します。

パラメーター

タイプ

詳細

op

string

The kind of operation to perform. One of:

  • add

  • remove

  • replace

path

string

An RFC6901 JSON Pointer to the item, an item attribute, an item field by field ID, or an item field attribute. For example: "/fields/vy09gd8EXAMPLE/label"

value

any

The new value to apply at the path.

Pathパラメーター

パラメーター

タイプ

詳細

vaultUUID

string

The UUID of the vault the item is in.

itemUUID

string

The UUID of the item to update.

Queryパラメーター

Queryパラメーターはありません。.

レスポンス

200

Returns an Item object of the updated item.

401

Invalid or missing token

403

Unauthorized access

404

Item not found

ファイルをリストする

GET /v1/vaults/{vaultUUID}/items/{itemUUID}/files

Pathパラメーター

パラメーター

タイプ

詳細

vaultUUID

string

The UUID of the vault to get the details of.

itemUUID

string

The UUID of the item to retrieve.

Queryパラメーター

パラメーター

タイプ

詳細

inline_content

boolean

Whether to return the Base-64 encoded file content. The file size must be less than OP_MAX_INLINE_FILE_SIZE_KB, or 100 kilobytes if the file size isn't defined. Optional.

レスポンス

200

Returns an array of File objects

401

Invalid or missing token

404

Item not found

413

File too large to display inline

ファイルの詳細を取得する

GET /v1/vaults/{vaultUUID}/items/{itemUUID}/files/{fileUUID}

Pathパラメーター

パラメーター

タイプ

詳細

vaultUUID

string

The UUID of the vault to retrieve the item from.

itemUUID

string

The UUID of the item to retrieve the file from.

fileUUID

string

The UUID of the file to retrieve.

Queryパラメーター

パラメーター

タイプ

詳細

inline_content

boolean

Whether to return the Base-64 encoded file content. The file size must be less than OP_MAX_INLINE_FILE_SIZE_KB, or 100 kilobytes if the file size isn't defined. Optional.

レスポンス

200

Returns a File object

401

Invalid or missing token

403

Unauthorized access

404

File not found

413

File too large to display inline

ファイルの内容を取得する

GET /v1/vaults/{vaultUUID}/items/{itemUUID}/files/{fileUUID}/content

Pathパラメーター

パラメーター

タイプ

詳細

vaultUUID

string

The UUID of the vault to retrieve the item from.

itemUUID

string

The UUID of the item to retrieve the file from.

fileUUID

string

The UUID of the file to retrieve.

Queryパラメーター

Queryパラメーターはありません。.

レスポンス

200

Returns the content of the file

401

Invalid or missing token

403

Unauthorized access

404

File not found

APIアクティビティーをリストする

GET /v1/activity

行われたAPIリクエストのリストを取得します。

Queryパラメーター

パラメーター

タイプ

詳細

limit

integer

How many API Events should be retrieved in a single request. Optional.

offset

integer

How far into the collection of API Events should the response start. Optional.

サーバーのハートビートチェック

GET /heartbeat.

サーバーがアクティブかどうかを確認するためエンドポイントに単純な「ping」を送ります。

Queryパラメーター

Queryパラメーターはありません。.

レスポンス

200

Returns a text/plain response with a single "."

サーバーのヘルスチェック

GET /health

サーバーとそのサービスの依[Save]関係の状態を問い合わせます。

Queryパラメーター

Queryパラメーターはありません。.

レスポンス

200

Returns a Server Health object

メトリクスを取得する

GET /metrics

サーバーによって収集されたPrometheusメトリックを返します。

Queryパラメーター

Queryパラメーターはありません。.

レスポンス

200

Prometheusメトリックのプレーンテキストのリストを返します。詳細については、 Prometheusのドキュメントを参照してください。

レスポンスオブジェクトモデル

APIRequestオブジェクト

パラメーター

タイプ

詳細

requestID

string

The UUID for the request.

timestamp

dateTime

Date and time of the request.

action

string

The action taken. One of:

  • "READ"

  • "CREATE"

  • "UPDATE"

  • "DELETE"

result

string

The result of the action. One of:

  • "SUCCESS"

  • "DENY"

actor

object

resource

object

APIRequest: Actorオブジェクト

パラメーター

タイプ

詳細

id

string

The UUID of the Connect server that made the request.

account

string

The UUID of the 1Password account the request went to.

jti

string

The UUID of the access token used to authenticate the request.

userAgent

string

The user agent string specified in the request.

ip

string

The IP address the request originated from.

APIRequest: Resourceオブジェクト

パラメーター

タイプ

詳細

type

string

The resource requested. One of:

  • "ITEM"

  • "VAULT"

vault

object

An object containing an id property with the value of the UUID of the vault requested.

item

object

An object containing an id property with the value of the UUID of the item requested.

itemVersion

integer

The version of the item.

ErrorResponseオブジェクト

{

status: 401,

message: "Invalid or missing token"

}

パラメーター

タイプ

詳細

status

integer

The HTTP status code.

message

string

A message detailing the error.

Vaultオブジェクト

{

"id": "ytrfte14kw1uex5txaore1emkz",

"name": "Demo",

"attributeVersion": 1,

"contentVersion": 72,

"items": 7,

"type": "USER_CREATED",

"createdAt": "2021-04-10T17:34:26Z",

"updatedAt": "2021-04-13T14:33:50Z"

}

パラメーター

タイプ

詳細

id

string

The UUID of the vault.

name

string

The name of the vault.

description

string

The description for the vault.

attributeVersion

integer

The version of the vault metadata.

contentVersion

integer

The version of the vault contents.

items

integer

Number of active items in the vault.

type

string

The type of vault. One of:

  • "EVERYONE": The team Shared vault.

  • "PERSONAL": The Private vault for the Connect server.

  • "USER_CREATED": A vault created by a user.

createdAt

dateTime

Date and time when the vault was created.

updatedAt

dateTime

Date and time when the vault or its contents were last changed.

Itemオブジェクト

{

"tags": [

"connect",

"\ud83d\udc27"

],

"vault": {

"id": "ftz4pm2xxwmwrsd7rjqn7grzfz"

},

"category": "LOGIN",

"sections": [

{

"id": "95cdbc3b-7742-47ec-9056-44d6af82d562",

"label": "Security Questions"

}

],

"fields": [

{

"id": "username",

"type": "STRING",

"purpose": "USERNAME",

"label": "username",

"value": "wendy"

},

{

"id": "password",

"type": "CONCEALED",

"purpose": "PASSWORD",

"label": "password",

"value": "hLDegPkuMQqyQiyDZqRdWGoojiN5KYQtXuA0wBDe9z3Caj6FQGHpbGu",

"entropy": 189.78359985351562

},

{

"id": "notesPlain",

"type": "STRING",

"purpose": "NOTES",

"label": "notesPlain"

},

{

"id": "a6cvmeqakbxoflkgmor4haji7y",

"type": "URL",

"label": "Example",

"value": "https://example.com"

},

{

"id": "boot3vsxwhuht6g7cmcx4m6rcm",

"section": {

"id": "95cdbc3b-7742-47ec-9056-44d6af82d562"

},

"type": "CONCEALED",

"label": "Recovery Key",

"value": "s=^J@GhHP_isYP>LCq?vv8u7T:*wBP.c"

},

{

"id": "axwtgyjrvwfp5ij7mtkw2zvijy",

"section": {

"id": "95cdbc3b-7742-47ec-9056-44d6af82d562"

},

"type": "STRING",

"label": "Random Text",

"value": "R)D~KZdV!8?51QoCibDUse7=n@wKR_}]"

}

],

"files": [

{

"id": "6r65pjq33banznomn7q22sj44e",

"name": "testfile.txt",

"size": 35,

"content_path": "v1/vaults/ftz4pm2xxwmwrsd7rjqn7grzfz/items/2fcbqwe9ndg175zg2dzwftvkpa/files/6r65pjq33banznomn7q22sj44e/content",

},

{

"id": "oyez5gf6xjfptlhc3o4n6o6hvm",

"name": "samplefile.png",

"size": 296639,

"content_path": "v1/vaults/ftz4pm2xxwmwrsd7rjqn7grzfz/items/2fcbqwe9ndg175zg2dzwftvkpa/files/oyez5gf6xjfptlhc3o4n6o6hvm/content",

}

],

"createdAt": "2021-04-10T17:20:05.98944527Z",

"updatedAt": "2021-04-13T17:20:05.989445411Z"

}

パラメーター

タイプ

詳細

id

string

The UUID of the item.

title

string

The title of the item.

vault

object

An object containing an id property whose value is the UUID of the vault the item is in.

category

string

The category of the item. One of:

  • "LOGIN"

  • "PASSWORD"

  • "API_CREDENTIAL"

  • "SERVER"

  • "DATABASE"

  • "CREDIT_CARD"

  • "MEMBERSHIP"

  • "PASSPORT"

  • "SOFTWARE_LICENSE"

  • "OUTDOOR_LICENSE"

  • "SECURE_NOTE"

  • "WIRELESS_ROUTER"

  • "BANK_ACCOUNT"

  • "DRIVER_LICENSE"

  • "IDENTITY"

  • "REWARD_PROGRAM"

  • "DOCUMENT"

  • "EMAIL_ACCOUNT"

  • "SOCIAL_SECURITY_NUMBER"

  • "MEDICAL_RECORD"

  • "SSH_KEY"

You can't create items using the "CUSTOM" or "DOCUMENT" categories.

urls

array

Array of URL objects containing URLs for the item.

favorite

boolean

Whether the item is marked as a favorite.

tags

array

An array of strings of the tags assigned to the item.

version

integer

The version of the item.

createdAt

dateTime

Date and time when the item was created.

updatedAt

dateTime

Date and time when the vault or its contents were last changed.

lastEditedBy

string

UUID of the account that last changed the item.

Item: Field object

{

"section": {

"id": "95cdbc3b-7742-47ec-9056-44d6af82d562"

},

"type": "STRING",

"generate": true,

"label": "Random Text"

}

パラメーター

タイプ

詳細

purpose or type

string

Use purpose for the username, password, and notes fields. Possible values:

  • "USERNAME"

  • "PASSWORD"

  • "NOTES"

Use type for all other fields. Possible values are:

  • "STRING"

  • "EMAIL"

  • "CONCEALED"

  • "URL"

  • "OTP" (format: otpauth://)

  • "DATE" (format: YYYY-MM-DD)

  • "MONTH_YEAR" (format: YYYYMM or YYYY/MM)

  • "MENU"

value

string

The value to save for the field.

You can specify a generate field instead of value to create a password or other random information for the value.

generate

boolean

Generate a password and save in the value for the field. By default, the password is a 32-characters long, made up of letters, numbers, and symbols. To customize the password, include a recipe field.

recipe

object

section

object

An object containing the UUID of a section in the item.

Item: Fileオブジェクト

{

"id": "6r65pjq33banznomn7q22sj44e",

"name": "testfile.txt",

"size": 35,

"content_path": "v1/vaults/ftz4pm2xxwmwrsd7rjqn7grzfz/items/2fcbqwe9ndg175zg2dzwftvkpa/files/6r65pjq33banznomn7q22sj44e/content",

"content": "VGhlIGZ1dHVyZSBiZWxvbmdzIHRvIHRoZSBjdXJpb3VzLgo=",

"section": {

"id": "95cdbc3b-7742-47ec-9056-44d6af82d562"

},

}

名前

タイプ

詳細

id

string

The UUID of the file.

name

string

The name of the file.

size

integer

The size of the file in bytes.

content_path

string

The path to download the contents of the file.

content

string

The Base64-encoded contents of the file, if inline_files is set to true.

section

object

An object containing the UUID of a section in the item.

Item: GeneratorRecipeオブジェクト このレシピは、「generate」プロパティーと組み合わせて使用され、新しい安全な値を生Createするために使用される文字セットを設定します。

{

"length": 55,

"characterSets": [

"LETTERS",

"DIGITS"

]

}

名前

タイプ

詳細

length

integer

The length of the password to generate. Optional.

characterSets

array

An array containing of the kinds of characters to include. Optional. Possible values:

  • "LETTERS"

  • "DIGITS"

  • "SYMBOLS"

excludeCharacters

string

A list of all characters that should be excluded from generated passwords. Optional.

Item: Sectionオブジェクト

{

"id": "95cdbc3b-7742-47ec-9056-44d6af82d562"

"label": "Security Questions",

}

名前

タイプ

詳細

id

string

A unique identifier for the section.

label

string

The label for the section.

Item: URL object

{

"label": "website",

"primary": true,

"href": "https://example.com"

}

名前

タイプ

詳細

label

string

The label for the URL.

primary

boolean

Whether this is the primary URL for the item.

href

string

The address.

Server Healthオブジェクト

{

"name": "1Password Connect API",

"version": "1.2.1",

"dependencies": [

{

"service": "sync",

"status": "TOKEN_NEEDED"

},

{

"service": "sqlite",

"status": "ACTIVE",

"message": "Connected to ~/1password.sqlite"

}

]

}

名前

タイプ

詳細

name

string

name of the server

version

string

Version info of the Connect server

dependencies

array

Server Health: Dependencyオブジェクト

名前

タイプ

詳細

service

string

name of the dependency

status

string

The service's reported status

message

string

Extra information about the dependency's status. Optional.

Last updated