Data Ocean Events
Trimble Event Service provides a web page that lists available events in production. See Events Service for more information.
Data Ocean publishes events on an Event service topic. Details of the topic can be found below.
File events
The File Event contains the following information:
"id": file id,"occured_at": datetime,"path": object path,"owner_id" : file owner id,"application_id": file application id,"version": file version number,"type": EventType.FILE_STATUS,"status": current event statusThe possible corresponding status events are:
| Status | Description |
|---|---|
AVAILABLE | File is available |
DELETING | File content is being deleted |
UPLOAD_FAILED | File is not accessible due to failure during upload |
ARCHIVE_PROCESSING | Archive has been uploaded and is being processed |
ARCHIVE_PROCESSING_FAILED | Archive process failed, ex. Bad zip file |
SOURCE_LOST_FAILURE_DEPRECATED | File could not be made AVAILABLE |
INFECTED | File has a known malware signature. If a file is scanned and malware is found, an event is created with INFECTED status. |
Directory events
Directory events are not an instantaneous command. After requesting a directory deletion event or a renaming directory event a message is sent.
A directory event has the following information :
“id”: “Directory id, “occured_at”: datetime of event creation, “path”: Directory path, “owner_id”: Directory owner, “application_id” : Application id, “version” : 0, “type” : event type “status” : current event statusThe version is not used in directory events therefore version is 0, representing null. The possible corresponding type will tell you the event being ran:
- Directory deletion:
EventType.DIRECTORY_DELETE - Directory renaming:
EventType.DIRECTORY_RENAME
The possible corresponding status can be the following:
| Status | Description |
|---|---|
QUEUED | Event is waiting for resources and will be processed shortly |
RUNNING | Event is being processed |
COMPLETED | Event is processed successfully |
FAILURE | Event was processed and failed |
Directory deletion: The directory deletion event will delete the directory and all the files inside the directory.
Directory rename: Directory Rename event changes the path of the directory. This will also update its corresponding files.
The old path is in the message when status is QUEUED and RUNNING. Once the status is COMPLETED, the old path is changed to the new path.