Events API

Events API Reference

Attachments Example

post  /archivist/v2/{asset_identity}/events

Description:

{
  "asset_attributes": {
    "arc_firmware_version": "3.2.1",
    "arc_home_location_identity": "locations/42054f10-9952-4c10-a082-9fd0d10295ae"
  },
  "behaviour": "FirmwareV1",
  "event_attributes": {
    "arc_attachments": [
      {
        "arc_attachment_identity": "blobs/1754b920-cf20-4d7e-9d36-9ed7d479744d",
        "arc_display_name": "Picture from yesterday",
        "arc_hash_alg": "sha256",
        "arc_hash_value": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"
      }
    ]
  },
  "operation": "Update",
  "principal_declared": {
    "issuer": "job.idp.server/1234",
    "subject": "bob@job"
  },
  "timestamp_declared": "2019-11-27T14:44:19Z"
}
Parameter Type Description
asset_attributes object key value mapping of asset attributes
asset_identity string identity of a related asset resource assets/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000
behaviour string
event_attributes object key value mapping of event attributes
operation string
principal_declared
timestamp_declared string time of event as declared by the user

{
  "asset_attributes": {
    "arc_firmware_version": "3.2.1",
    "arc_home_location_identity": "locations/42054f10-9952-4c10-a082-9fd0d10295ae"
  },
  "asset_identity": "assets/add30235-1424-4fda-840a-d5ef82c4c96f",
  "behaviour": "Firmware",
  "block_number": 12,
  "confirmation_status": "CONFIRMED",
  "event_attributes": {
    "arc_attachments": [
      {
        "arc_attachment_identity": "blobs/1754b920-cf20-4d7e-9d36-9ed7d479744d",
        "arc_display_name": "Picture from yesterday",
        "arc_hash_alg": "sha256",
        "arc_hash_value": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"
      }
    ]
  },
  "identity": "assets/add30235-1424-4fda-840a-d5ef82c4c96f/events/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000",
  "operation": "Update",
  "principal_accepted": {
    "issuer": "job.idp.server/1234",
    "subject": "bob@job"
  },
  "principal_declared": {
    "issuer": "job.idp.server/1234",
    "subject": "bob@job"
  },
  "timestamp_accepted": "2019-11-27T14:44:19Z",
  "timestamp_committed": "2019-11-27T14:44:19Z",
  "timestamp_declared": "2019-11-27T14:44:19Z",
  "transaction_id": "0x07569",
  "transaction_index": 5
}
Response Parameter Type Description
asset_attributes object key value mapping of asset attributes
asset_identity string identity of a related asset resource assets/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000
behaviour string The behaviour used to create event. Firmware
block_number string number of block event was commited on
confirmation_status indicates if the event has been succesfully committed to the blockchain
event_attributes object key value mapping of event attributes
from string wallet address for the creator of this event
identity string identity of a event resource
operation string The operation represented by the event. Update
principal_accepted principal recorded by the server
principal_declared principal provided by the user
timestamp_accepted string time of event as recorded by the server
timestamp_committed string time of event as recorded on blockchain
timestamp_declared string time of event as declared by the user
transaction_id string hash of the transaction as a hex string 0x11bf5b37e0b842e08dcfdc8c4aefc000
transaction_index string index of event within commited block
Responses Description
200A successful response.
defaultAn unexpected error response.

Builtin Operations Example

post  /archivist/v2/{asset_identity}/events

Description:

{
  "asset_attributes": {
    "arc_firmware_version": "3.2.1",
    "arc_home_location_identity": "locations/42054f10-9952-4c10-a082-9fd0d10295ae"
  },
  "behaviour": "FirmwareV1",
  "event_attributes": {
    "arc_attachments": [
      {
        "arc_attachment_identity": "blobs/1754b920-cf20-4d7e-9d36-9ed7d479744d",
        "arc_display_name": "Picture from yesterday",
        "arc_hash_alg": "sha256",
        "arc_hash_value": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"
      }
    ]
  },
  "operation": "Update",
  "principal_declared": {
    "issuer": "job.idp.server/1234",
    "subject": "bob@job"
  },
  "timestamp_declared": "2019-11-27T14:44:19Z"
}
Parameter Type Description
asset_attributes object key value mapping of asset attributes
asset_identity string identity of a related asset resource assets/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000
behaviour string
event_attributes object key value mapping of event attributes
operation string
principal_declared
timestamp_declared string time of event as declared by the user

{
  "asset_attributes": {
    "arc_firmware_version": "3.2.1",
    "arc_home_location_identity": "locations/42054f10-9952-4c10-a082-9fd0d10295ae"
  },
  "asset_identity": "assets/add30235-1424-4fda-840a-d5ef82c4c96f",
  "behaviour": "Firmware",
  "block_number": 12,
  "confirmation_status": "CONFIRMED",
  "event_attributes": {
    "arc_attachments": [
      {
        "arc_attachment_identity": "blobs/1754b920-cf20-4d7e-9d36-9ed7d479744d",
        "arc_display_name": "Picture from yesterday",
        "arc_hash_alg": "sha256",
        "arc_hash_value": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"
      }
    ]
  },
  "identity": "assets/add30235-1424-4fda-840a-d5ef82c4c96f/events/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000",
  "operation": "Update",
  "principal_accepted": {
    "issuer": "job.idp.server/1234",
    "subject": "bob@job"
  },
  "principal_declared": {
    "issuer": "job.idp.server/1234",
    "subject": "bob@job"
  },
  "timestamp_accepted": "2019-11-27T14:44:19Z",
  "timestamp_committed": "2019-11-27T14:44:19Z",
  "timestamp_declared": "2019-11-27T14:44:19Z",
  "transaction_id": "0x07569",
  "transaction_index": 5
}
Response Parameter Type Description
asset_attributes object key value mapping of asset attributes
asset_identity string identity of a related asset resource assets/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000
behaviour string The behaviour used to create event. Firmware
block_number string number of block event was commited on
confirmation_status indicates if the event has been succesfully committed to the blockchain
event_attributes object key value mapping of event attributes
from string wallet address for the creator of this event
identity string identity of a event resource
operation string The operation represented by the event. Update
principal_accepted principal recorded by the server
principal_declared principal provided by the user
timestamp_accepted string time of event as recorded by the server
timestamp_committed string time of event as recorded on blockchain
timestamp_declared string time of event as declared by the user
transaction_id string hash of the transaction as a hex string 0x11bf5b37e0b842e08dcfdc8c4aefc000
transaction_index string index of event within commited block
Responses Description
200A successful response.
defaultAn unexpected error response.

Firmware Update Example

post  /archivist/v2/{asset_identity}/events

Description:

{
  "asset_attributes": {
    "arc_firmware_version": "3.2.1",
    "arc_home_location_identity": "locations/42054f10-9952-4c10-a082-9fd0d10295ae"
  },
  "behaviour": "FirmwareV1",
  "event_attributes": {
    "arc_attachments": [
      {
        "arc_attachment_identity": "blobs/1754b920-cf20-4d7e-9d36-9ed7d479744d",
        "arc_display_name": "Picture from yesterday",
        "arc_hash_alg": "sha256",
        "arc_hash_value": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"
      }
    ]
  },
  "operation": "Update",
  "principal_declared": {
    "issuer": "job.idp.server/1234",
    "subject": "bob@job"
  },
  "timestamp_declared": "2019-11-27T14:44:19Z"
}
Parameter Type Description
asset_attributes object key value mapping of asset attributes
asset_identity string identity of a related asset resource assets/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000
behaviour string
event_attributes object key value mapping of event attributes
operation string
principal_declared
timestamp_declared string time of event as declared by the user

{
  "asset_attributes": {
    "arc_firmware_version": "3.2.1",
    "arc_home_location_identity": "locations/42054f10-9952-4c10-a082-9fd0d10295ae"
  },
  "asset_identity": "assets/add30235-1424-4fda-840a-d5ef82c4c96f",
  "behaviour": "Firmware",
  "block_number": 12,
  "confirmation_status": "CONFIRMED",
  "event_attributes": {
    "arc_attachments": [
      {
        "arc_attachment_identity": "blobs/1754b920-cf20-4d7e-9d36-9ed7d479744d",
        "arc_display_name": "Picture from yesterday",
        "arc_hash_alg": "sha256",
        "arc_hash_value": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"
      }
    ]
  },
  "identity": "assets/add30235-1424-4fda-840a-d5ef82c4c96f/events/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000",
  "operation": "Update",
  "principal_accepted": {
    "issuer": "job.idp.server/1234",
    "subject": "bob@job"
  },
  "principal_declared": {
    "issuer": "job.idp.server/1234",
    "subject": "bob@job"
  },
  "timestamp_accepted": "2019-11-27T14:44:19Z",
  "timestamp_committed": "2019-11-27T14:44:19Z",
  "timestamp_declared": "2019-11-27T14:44:19Z",
  "transaction_id": "0x07569",
  "transaction_index": 5
}
Response Parameter Type Description
asset_attributes object key value mapping of asset attributes
asset_identity string identity of a related asset resource assets/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000
behaviour string The behaviour used to create event. Firmware
block_number string number of block event was commited on
confirmation_status indicates if the event has been succesfully committed to the blockchain
event_attributes object key value mapping of event attributes
from string wallet address for the creator of this event
identity string identity of a event resource
operation string The operation represented by the event. Update
principal_accepted principal recorded by the server
principal_declared principal provided by the user
timestamp_accepted string time of event as recorded by the server
timestamp_committed string time of event as recorded on blockchain
timestamp_declared string time of event as declared by the user
transaction_id string hash of the transaction as a hex string 0x11bf5b37e0b842e08dcfdc8c4aefc000
transaction_index string index of event within commited block
Responses Description
200A successful response.
defaultAn unexpected error response.

Location Update Example

post  /archivist/v2/{asset_identity}/events

Description:

{
  "asset_attributes": {
    "arc_firmware_version": "3.2.1",
    "arc_home_location_identity": "locations/42054f10-9952-4c10-a082-9fd0d10295ae"
  },
  "behaviour": "FirmwareV1",
  "event_attributes": {
    "arc_attachments": [
      {
        "arc_attachment_identity": "blobs/1754b920-cf20-4d7e-9d36-9ed7d479744d",
        "arc_display_name": "Picture from yesterday",
        "arc_hash_alg": "sha256",
        "arc_hash_value": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"
      }
    ]
  },
  "operation": "Update",
  "principal_declared": {
    "issuer": "job.idp.server/1234",
    "subject": "bob@job"
  },
  "timestamp_declared": "2019-11-27T14:44:19Z"
}
Parameter Type Description
asset_attributes object map of asset attributes. Specific behaviours define required and optional asset attributes. These attributes cause the corresponding attributes on the asset to be updated.
asset_identity string identity of a related asset resource assets/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000
behaviour string
event_attributes object map of event attributes. Specific behaviours define required and optional event attributes for each supported operation.
operation string
principal_declared
timestamp_declared string time of event as declared by the user

{
  "asset_attributes": {
    "arc_firmware_version": "3.2.1",
    "arc_home_location_identity": "locations/42054f10-9952-4c10-a082-9fd0d10295ae"
  },
  "asset_identity": "assets/add30235-1424-4fda-840a-d5ef82c4c96f",
  "behaviour": "Firmware",
  "block_number": 12,
  "confirmation_status": "CONFIRMED",
  "event_attributes": {
    "arc_attachments": [
      {
        "arc_attachment_identity": "blobs/1754b920-cf20-4d7e-9d36-9ed7d479744d",
        "arc_display_name": "Picture from yesterday",
        "arc_hash_alg": "sha256",
        "arc_hash_value": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"
      }
    ]
  },
  "identity": "assets/add30235-1424-4fda-840a-d5ef82c4c96f/events/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000",
  "operation": "Update",
  "principal_accepted": {
    "issuer": "job.idp.server/1234",
    "subject": "bob@job"
  },
  "principal_declared": {
    "issuer": "job.idp.server/1234",
    "subject": "bob@job"
  },
  "timestamp_accepted": "2019-11-27T14:44:19Z",
  "timestamp_committed": "2019-11-27T14:44:19Z",
  "timestamp_declared": "2019-11-27T14:44:19Z",
  "transaction_id": "0x07569",
  "transaction_index": 5
}
Response Parameter Type Description
asset_attributes object map of asset attributes. Specific behaviours define required and optional asset attributes. These attributes cause the corresponding attributes on the asset to be updated.
asset_identity string identity of a related asset resource assets/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000
behaviour string The behaviour used to create event. Firmware
block_number string number of block event was commited on
confirmation_status indicates if the event has been succesfully committed to the blockchain
event_attributes object map of event attributes. Specific behaviours define required and optional event attributes for each supported operation.
from string wallet address for the creator of this event
identity string identity of a event resource
operation string The operation represented by the event. Update
principal_accepted principal recorded by the server
principal_declared principal provided by the user
timestamp_accepted string time of event as recorded by the server
timestamp_committed string time of event as recorded on blockchain
timestamp_declared string time of event as declared by the user
transaction_id string hash of the transaction as a hex string 0x11bf5b37e0b842e08dcfdc8c4aefc000
transaction_index string index of event within commited block
Responses Description
200A successful response.
defaultAn unexpected error response

Maintenance Example

post  /archivist/v2/{asset_identity}/events

Description:

{
  "asset_attributes": {
    "arc_firmware_version": "3.2.1",
    "arc_home_location_identity": "locations/42054f10-9952-4c10-a082-9fd0d10295ae"
  },
  "behaviour": "FirmwareV1",
  "event_attributes": {
    "arc_attachments": [
      {
        "arc_attachment_identity": "blobs/1754b920-cf20-4d7e-9d36-9ed7d479744d",
        "arc_display_name": "Picture from yesterday",
        "arc_hash_alg": "sha256",
        "arc_hash_value": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"
      }
    ]
  },
  "operation": "Update",
  "principal_declared": {
    "issuer": "job.idp.server/1234",
    "subject": "bob@job"
  },
  "timestamp_declared": "2019-11-27T14:44:19Z"
}
Parameter Type Description
asset_attributes object key value mapping of asset attributes
asset_identity string identity of a related asset resource assets/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000
behaviour string
event_attributes object key value mapping of event attributes
operation string
principal_declared
timestamp_declared string time of event as declared by the user

{
  "asset_attributes": {
    "arc_firmware_version": "3.2.1",
    "arc_home_location_identity": "locations/42054f10-9952-4c10-a082-9fd0d10295ae"
  },
  "asset_identity": "assets/add30235-1424-4fda-840a-d5ef82c4c96f",
  "behaviour": "Firmware",
  "block_number": 12,
  "confirmation_status": "CONFIRMED",
  "event_attributes": {
    "arc_attachments": [
      {
        "arc_attachment_identity": "blobs/1754b920-cf20-4d7e-9d36-9ed7d479744d",
        "arc_display_name": "Picture from yesterday",
        "arc_hash_alg": "sha256",
        "arc_hash_value": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"
      }
    ]
  },
  "identity": "assets/add30235-1424-4fda-840a-d5ef82c4c96f/events/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000",
  "operation": "Update",
  "principal_accepted": {
    "issuer": "job.idp.server/1234",
    "subject": "bob@job"
  },
  "principal_declared": {
    "issuer": "job.idp.server/1234",
    "subject": "bob@job"
  },
  "timestamp_accepted": "2019-11-27T14:44:19Z",
  "timestamp_committed": "2019-11-27T14:44:19Z",
  "timestamp_declared": "2019-11-27T14:44:19Z",
  "transaction_id": "0x07569",
  "transaction_index": 5
}
Response Parameter Type Description
asset_attributes object key value mapping of asset attributes
asset_identity string identity of a related asset resource assets/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000
behaviour string The behaviour used to create event. Firmware
block_number string number of block event was commited on
confirmation_status indicates if the event has been succesfully committed to the blockchain
event_attributes object key value mapping of event attributes
from string wallet address for the creator of this event
identity string identity of a event resource
operation string The operation represented by the event. Update
principal_accepted principal recorded by the server
principal_declared principal provided by the user
timestamp_accepted string time of event as recorded by the server
timestamp_committed string time of event as recorded on blockchain
timestamp_declared string time of event as declared by the user
transaction_id string hash of the transaction as a hex string 0x11bf5b37e0b842e08dcfdc8c4aefc000
transaction_index string index of event within commited block
Responses Description
200A successful response.
defaultAn unexpected error response.

Record Evidence Example

post  /archivist/v2/{asset_identity}/events

Description:

{
  "asset_attributes": {
    "arc_firmware_version": "3.2.1",
    "arc_home_location_identity": "locations/42054f10-9952-4c10-a082-9fd0d10295ae"
  },
  "behaviour": "FirmwareV1",
  "event_attributes": {
    "arc_attachments": [
      {
        "arc_attachment_identity": "blobs/1754b920-cf20-4d7e-9d36-9ed7d479744d",
        "arc_display_name": "Picture from yesterday",
        "arc_hash_alg": "sha256",
        "arc_hash_value": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"
      }
    ]
  },
  "operation": "Update",
  "principal_declared": {
    "issuer": "job.idp.server/1234",
    "subject": "bob@job"
  },
  "timestamp_declared": "2019-11-27T14:44:19Z"
}
Parameter Type Description
asset_attributes object key value mapping of asset attributes
asset_identity string identity of a related asset resource assets/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000
behaviour string
event_attributes object key value mapping of event attributes
operation string
principal_declared
timestamp_declared string time of event as declared by the user

{
  "asset_attributes": {
    "arc_firmware_version": "3.2.1",
    "arc_home_location_identity": "locations/42054f10-9952-4c10-a082-9fd0d10295ae"
  },
  "asset_identity": "assets/add30235-1424-4fda-840a-d5ef82c4c96f",
  "behaviour": "Firmware",
  "block_number": 12,
  "confirmation_status": "CONFIRMED",
  "event_attributes": {
    "arc_attachments": [
      {
        "arc_attachment_identity": "blobs/1754b920-cf20-4d7e-9d36-9ed7d479744d",
        "arc_display_name": "Picture from yesterday",
        "arc_hash_alg": "sha256",
        "arc_hash_value": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"
      }
    ]
  },
  "identity": "assets/add30235-1424-4fda-840a-d5ef82c4c96f/events/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000",
  "operation": "Update",
  "principal_accepted": {
    "issuer": "job.idp.server/1234",
    "subject": "bob@job"
  },
  "principal_declared": {
    "issuer": "job.idp.server/1234",
    "subject": "bob@job"
  },
  "timestamp_accepted": "2019-11-27T14:44:19Z",
  "timestamp_committed": "2019-11-27T14:44:19Z",
  "timestamp_declared": "2019-11-27T14:44:19Z",
  "transaction_id": "0x07569",
  "transaction_index": 5
}
Response Parameter Type Description
asset_attributes object key value mapping of asset attributes
asset_identity string identity of a related asset resource assets/11bf5b37-e0b8-42e0-8dcf-dc8c4aefc000
behaviour string The behaviour used to create event. Firmware
block_number string number of block event was commited on
confirmation_status indicates if the event has been succesfully committed to the blockchain
event_attributes object key value mapping of event attributes
from string wallet address for the creator of this event
identity string identity of a event resource
operation string The operation represented by the event. Update
principal_accepted principal recorded by the server
principal_declared principal provided by the user
timestamp_accepted string time of event as recorded by the server
timestamp_committed string time of event as recorded on blockchain
timestamp_declared string time of event as declared by the user
transaction_id string hash of the transaction as a hex string 0x11bf5b37e0b842e08dcfdc8c4aefc000
transaction_index string index of event within commited block
Responses Description
200A successful response.
defaultAn unexpected error response.

Edit this page on GitHub