{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/1password/json-schema/1password-apirequest-schema.json",
  "title": "APIRequest",
  "description": "Represents a record of an API request made to the Connect server.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/1password-activity-api-openapi.yml#/components/schemas/APIRequest",
  "type": "object",
  "properties": {
    "requestId": {
      "type": "string",
      "format": "uuid",
      "description": "The unique identifier for the API request."
    },
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "When the request was made."
    },
    "action": {
      "type": "string",
      "description": "The HTTP method of the request."
    },
    "result": {
      "type": "string",
      "description": "The result status of the request.",
      "enum": [
        "SUCCESS",
        "DENY"
      ]
    },
    "actor": {
      "type": "object",
      "description": "The actor who made the request.",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The unique identifier of the actor."
        },
        "account": {
          "type": "string",
          "description": "The account associated with the actor."
        },
        "jti": {
          "type": "string",
          "description": "The JWT token identifier."
        },
        "userAgent": {
          "type": "string",
          "description": "The user agent string of the client."
        },
        "requestIp": {
          "type": "string",
          "description": "The IP address of the client."
        }
      }
    },
    "resource": {
      "type": "object",
      "description": "The resource that was accessed.",
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of resource."
        },
        "vault": {
          "$ref": "#/$defs/VaultRef"
        },
        "item": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "description": "The unique identifier of the item."
            }
          }
        },
        "itemVersion": {
          "type": "integer",
          "description": "The version of the item."
        }
      }
    }
  },
  "$defs": {
    "VaultRef": {
      "type": "object",
      "description": "A reference to a vault.",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The unique identifier of the referenced vault."
        }
      }
    }
  }
}