Box Developerドキュメント
 

    イベントソース

    イベントソース

    ユーザーまたは項目によってイベントがトリガーされると、GET /eventsエンドポイントのレスポンスにはイベントソースオブジェクトが含まれます。

    ユーザーソースオブジェクト

    ユーザーがイベントをトリガーした場合、ソースオブジェクトはユーザーリソースの標準レプリゼンテーションになります。

    {
      "source": {
        "id": 11446498,
        "type": "user",
        "address": "900 Jefferson Ave, Redwood City, CA 94063",
        "avatar_url": "https://www.box.com/api/avatar/large/181216415",
        "created_at": "2012-12-12T10:53:43-08:00",
        "job_title": "CEO",
        "language": "en",
        "login": "ceo@example.com",
        "max_upload_size": 2147483648,
        "modified_at": "2012-12-12T10:53:43-08:00",
        "name": "Aaron Levie",
        "notification_email": {
          "email": "notifications@example.com",
          "is_confirmed": true
        },
        "phone": 6509241374,
        "space_amount": 11345156112,
        "space_used": 1237009912,
        "status": "active",
        "timezone": "Africa/Bujumbura"
      }
    }
    
    

    項目ソースオブジェクト

    項目がイベントをトリガーした場合、ソースオブジェクトはイベントソースリソースになります。

    以下の例にはclassificationオブジェクトが含まれています。これは、項目に分類が設定されていない場合は表示されません。また、一部のイベントタイプでは表示されません。

    {
      "source": {
        "item_type": "file",
        "item_id": "8903212345",
        "item_name": "example.docx",
        "parent": {
          "type": "folder",
          "name": "All Files",
          "id": "0"
        },
        "owned_by": {
          "type": "user",
          "id": "11446498",
          "name": "Aaron Levie",
          "login": "notifications@example.com"
        },
        "classification": {
          "name": "Top Secret"
        }
      }
    }