{
  "openapi": "3.0.3",
  "info": {
    "title": "sondahub 1Password Connect sandbox",
    "version": "0.14.2",
    "description": "An independent imitation of the 1Password Connect server’s API for testing, run by sondahub — not affiliated with or endorsed by 1Password. No 1Password account is involved and nothing is encrypted.\n\nThe Connect host is https://api.sondahub.com/sandbox/1password-connect. Any bearer token works (sondahub-connect-token, say).\n\nWrites live in the X-Sondahub-Session token each answer carries: send the newest one back as a header and the next request sees what you made; without it every request starts from the seed vaults. More at https://sondahub.com/sandboxes/1password-connect/",
    "contact": {
      "name": "sondahub",
      "url": "https://sondahub.com/sandboxes/1password-connect/"
    }
  },
  "externalDocs": {
    "description": "The sandbox, in full",
    "url": "https://sondahub.com/sandboxes/1password-connect/"
  },
  "servers": [
    {
      "url": "https://api.sondahub.com"
    }
  ],
  "security": [
    {
      "connectToken": []
    }
  ],
  "tags": [
    {
      "name": "Vaults",
      "description": "The vaults the token can see."
    },
    {
      "name": "Items",
      "description": "Items of every category: fields, sections, URLs, tags."
    },
    {
      "name": "Files",
      "description": "Files attached to items."
    },
    {
      "name": "Server",
      "description": "The Connect server itself."
    }
  ],
  "paths": {
    "/sandbox/1password-connect/v1/vaults": {
      "get": {
        "tags": [
          "Vaults"
        ],
        "summary": "List vaults",
        "operationId": "GetVaults",
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "name eq \"Production\"",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/sandbox/1password-connect/v1/vaults/{vaultUuid}": {
      "get": {
        "tags": [
          "Vaults"
        ],
        "summary": "Get a vault",
        "operationId": "GetVaultById",
        "parameters": [
          {
            "name": "vaultUuid",
            "in": "path",
            "required": true,
            "description": "A vault id (26 characters).",
            "schema": {
              "type": "string"
            },
            "example": "i7gwu4baaugmv7aapnir3saard"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/sandbox/1password-connect/v1/vaults/{vaultUuid}/items": {
      "get": {
        "tags": [
          "Items"
        ],
        "summary": "List items",
        "operationId": "GetVaultItems",
        "parameters": [
          {
            "name": "vaultUuid",
            "in": "path",
            "required": true,
            "description": "A vault id (26 characters).",
            "schema": {
              "type": "string"
            },
            "example": "i7gwu4baaugmv7aapnir3saard"
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "title eq \"Stripe\", tag eq \"prod\", title co \"data\"",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "post": {
        "tags": [
          "Items"
        ],
        "summary": "Create an item",
        "operationId": "CreateVaultItem",
        "parameters": [
          {
            "name": "vaultUuid",
            "in": "path",
            "required": true,
            "description": "A vault id (26 characters).",
            "schema": {
              "type": "string"
            },
            "example": "i7gwu4baaugmv7aapnir3saard"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "The title."
                  },
                  "category": {
                    "type": "string",
                    "description": "LOGIN, PASSWORD, API_CREDENTIAL, DATABASE, SERVER, SECURE_NOTE, SSH_KEY…"
                  },
                  "fields": {
                    "type": "array",
                    "description": "id, type, purpose, label, value — or generate with a recipe.",
                    "items": {}
                  },
                  "sections": {
                    "type": "array",
                    "description": "{id, label}.",
                    "items": {}
                  },
                  "tags": {
                    "type": "array",
                    "description": "Strings.",
                    "items": {}
                  },
                  "urls": {
                    "type": "array",
                    "description": "{href, primary}.",
                    "items": {}
                  }
                },
                "required": [
                  "category"
                ],
                "example": {
                  "vault": {
                    "id": "i7gwu4baaugmv7aapnir3saard"
                  },
                  "title": "Grafana",
                  "category": "LOGIN",
                  "tags": [
                    "prod"
                  ],
                  "urls": [
                    {
                      "href": "https://grafana.example.com",
                      "primary": true
                    }
                  ],
                  "fields": [
                    {
                      "id": "username",
                      "label": "username",
                      "purpose": "USERNAME",
                      "value": "ops@example.com"
                    },
                    {
                      "id": "password",
                      "label": "password",
                      "purpose": "PASSWORD",
                      "generate": true,
                      "recipe": {
                        "length": 24,
                        "characterSets": [
                          "LETTERS",
                          "DIGITS",
                          "SYMBOLS"
                        ]
                      }
                    }
                  ]
                }
              },
              "example": {
                "vault": {
                  "id": "i7gwu4baaugmv7aapnir3saard"
                },
                "title": "Grafana",
                "category": "LOGIN",
                "tags": [
                  "prod"
                ],
                "urls": [
                  {
                    "href": "https://grafana.example.com",
                    "primary": true
                  }
                ],
                "fields": [
                  {
                    "id": "username",
                    "label": "username",
                    "purpose": "USERNAME",
                    "value": "ops@example.com"
                  },
                  {
                    "id": "password",
                    "label": "password",
                    "purpose": "PASSWORD",
                    "generate": true,
                    "recipe": {
                      "length": 24,
                      "characterSets": [
                        "LETTERS",
                        "DIGITS",
                        "SYMBOLS"
                      ]
                    }
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/sandbox/1password-connect/v1/vaults/{vaultUuid}/items/{itemUuid}": {
      "get": {
        "tags": [
          "Items"
        ],
        "summary": "Get an item",
        "operationId": "GetVaultItemById",
        "description": "Every field with its value; a one-time-password field carries the current code in totp.",
        "parameters": [
          {
            "name": "vaultUuid",
            "in": "path",
            "required": true,
            "description": "A vault id (26 characters).",
            "schema": {
              "type": "string"
            },
            "example": "i7gwu4baaugmv7aapnir3saard"
          },
          {
            "name": "itemUuid",
            "in": "path",
            "required": true,
            "description": "An item id.",
            "schema": {
              "type": "string"
            },
            "example": "p7dw1zbar0s1wdaay8xkz7aaei"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "put": {
        "tags": [
          "Items"
        ],
        "summary": "Replace an item",
        "operationId": "UpdateVaultItem",
        "parameters": [
          {
            "name": "vaultUuid",
            "in": "path",
            "required": true,
            "description": "A vault id (26 characters).",
            "schema": {
              "type": "string"
            },
            "example": "i7gwu4baaugmv7aapnir3saard"
          },
          {
            "name": "itemUuid",
            "in": "path",
            "required": true,
            "description": "An item id.",
            "schema": {
              "type": "string"
            },
            "example": "f693gnbaog97v1baczct5fbab1"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "The whole item, as GET gives it."
                  }
                },
                "example": {
                  "id": "f693gnbaog97v1baczct5fbab1",
                  "vault": {
                    "id": "i7gwu4baaugmv7aapnir3saard"
                  },
                  "title": "Stripe (payments)",
                  "category": "API_CREDENTIAL",
                  "fields": [
                    {
                      "id": "credential",
                      "type": "CONCEALED",
                      "label": "credential",
                      "value": "new-key"
                    }
                  ]
                }
              },
              "example": {
                "id": "f693gnbaog97v1baczct5fbab1",
                "vault": {
                  "id": "i7gwu4baaugmv7aapnir3saard"
                },
                "title": "Stripe (payments)",
                "category": "API_CREDENTIAL",
                "fields": [
                  {
                    "id": "credential",
                    "type": "CONCEALED",
                    "label": "credential",
                    "value": "new-key"
                  }
                ]
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Items"
        ],
        "summary": "Patch an item",
        "operationId": "PatchVaultItem",
        "parameters": [
          {
            "name": "vaultUuid",
            "in": "path",
            "required": true,
            "description": "A vault id (26 characters).",
            "schema": {
              "type": "string"
            },
            "example": "i7gwu4baaugmv7aapnir3saard"
          },
          {
            "name": "itemUuid",
            "in": "path",
            "required": true,
            "description": "An item id.",
            "schema": {
              "type": "string"
            },
            "example": "ckjrfeaaghkvt5bafsxnidaa1g"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "op": {
                      "type": "string",
                      "description": "add, remove or replace"
                    },
                    "path": {
                      "type": "string",
                      "description": "/title, /tags, /fields, /fields/{id}, /fields/{id}/value, /sections/{id}…"
                    },
                    "value": {
                      "type": "object",
                      "description": "The new value."
                    }
                  }
                },
                "example": [
                  {
                    "op": "replace",
                    "path": "/fields/port/value",
                    "value": "6432"
                  },
                  {
                    "op": "add",
                    "path": "/tags/-",
                    "value": "pgbouncer"
                  }
                ]
              },
              "example": [
                {
                  "op": "replace",
                  "path": "/fields/port/value",
                  "value": "6432"
                },
                {
                  "op": "add",
                  "path": "/tags/-",
                  "value": "pgbouncer"
                }
              ]
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Items"
        ],
        "summary": "Delete an item",
        "operationId": "DeleteVaultItem",
        "parameters": [
          {
            "name": "vaultUuid",
            "in": "path",
            "required": true,
            "description": "A vault id (26 characters).",
            "schema": {
              "type": "string"
            },
            "example": "3prff0aas9wgghaao2pp93aazq"
          },
          {
            "name": "itemUuid",
            "in": "path",
            "required": true,
            "description": "An item id.",
            "schema": {
              "type": "string"
            },
            "example": "xz3cn6barm177gbaezccuraa6t"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/sandbox/1password-connect/v1/vaults/{vaultUuid}/items/{itemUuid}/files": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "List an item’s files",
        "operationId": "GetItemFiles",
        "parameters": [
          {
            "name": "vaultUuid",
            "in": "path",
            "required": true,
            "description": "A vault id (26 characters).",
            "schema": {
              "type": "string"
            },
            "example": "5ukjr0bacvgdjdbam5p4j1banq"
          },
          {
            "name": "itemUuid",
            "in": "path",
            "required": true,
            "description": "An item id.",
            "schema": {
              "type": "string"
            },
            "example": "ftlvewbac9xbm7baw1kzeuaa58"
          },
          {
            "name": "inline_files",
            "in": "query",
            "required": false,
            "description": "true to include each file’s content, base64.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/sandbox/1password-connect/v1/vaults/{vaultUuid}/items/{itemUuid}/files/{fileUuid}": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Get a file’s details",
        "operationId": "GetDetailsOfFileById",
        "parameters": [
          {
            "name": "vaultUuid",
            "in": "path",
            "required": true,
            "description": "A vault id (26 characters).",
            "schema": {
              "type": "string"
            },
            "example": "5ukjr0bacvgdjdbam5p4j1banq"
          },
          {
            "name": "itemUuid",
            "in": "path",
            "required": true,
            "description": "An item id.",
            "schema": {
              "type": "string"
            },
            "example": "ftlvewbac9xbm7baw1kzeuaa58"
          },
          {
            "name": "fileUuid",
            "in": "path",
            "required": true,
            "description": "The file id.",
            "schema": {
              "type": "string"
            },
            "example": "z3krgfbainknbmba3ebx5rba0r"
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/sandbox/1password-connect/v1/vaults/{vaultUuid}/items/{itemUuid}/files/{fileUuid}/content": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Download a file",
        "operationId": "DownloadFileByID",
        "parameters": [
          {
            "name": "vaultUuid",
            "in": "path",
            "required": true,
            "description": "A vault id (26 characters).",
            "schema": {
              "type": "string"
            },
            "example": "5ukjr0bacvgdjdbam5p4j1banq"
          },
          {
            "name": "itemUuid",
            "in": "path",
            "required": true,
            "description": "An item id.",
            "schema": {
              "type": "string"
            },
            "example": "ftlvewbac9xbm7baw1kzeuaa58"
          },
          {
            "name": "fileUuid",
            "in": "path",
            "required": true,
            "description": "The file id.",
            "schema": {
              "type": "string"
            },
            "example": "z3krgfbainknbmba3ebx5rba0r"
          }
        ],
        "responses": {
          "200": {
            "description": "The bytes.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/sandbox/1password-connect/v1/activity": {
      "get": {
        "tags": [
          "Server"
        ],
        "summary": "API activity",
        "operationId": "GetApiActivity",
        "description": "The writes this session made.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many.",
            "schema": {
              "type": "integer"
            },
            "example": 50
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "From where.",
            "schema": {
              "type": "integer"
            },
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          }
        }
      }
    },
    "/sandbox/1password-connect/heartbeat": {
      "get": {
        "tags": [
          "Server"
        ],
        "summary": "Heartbeat",
        "operationId": "GetHeartbeat",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/sandbox/1password-connect/health": {
      "get": {
        "tags": [
          "Server"
        ],
        "summary": "Health",
        "operationId": "GetServerHealth",
        "responses": {
          "200": {
            "description": "The object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": []
      }
    }
  },
  "components": {
    "securitySchemes": {
      "connectToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Any Connect token."
      }
    },
    "responses": {
      "E400": {
        "description": "A body or id Connect would refuse.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "E401": {
        "description": "No bearer token.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "E404": {
        "description": "No such vault, item or file.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}