Skip to main content
Version: v5.1

File Service resource types

Overview#

The File Service emits events when certain actions are taken in the system. The Notification Service can listen to these events and perform additional actions. For example, in the Notification Service, event triggers are set up which listen to events and determine when to send a notification.

Events are linked to resources. The actual type of the resource is indicated by the resource.type property. The other properties shown for a given resource depend on the type.

This page lists the resource types which are specific to the File Service, and the events which are common to all services.

Event filtering#

In an event type trigger, filtering on the properties of an incoming event is supported.

An event filter is of the form:

{  "filter": {    <property...>: <wildcard>  }}

For example, to match create events from the Item Service, the event filter would look like the code listing below.

{  "filter": {    "event": "resource.ResourceCreated",    "resource.type": "itemsvc.*"  }}

Common events#

This section lists the events which are applicable to all services.

These common events are:

resource.ResourceCreated#

This is a resource event which is emitted when a resource is created or uploaded.

List of event properties#

PropertyType
uuidUUID
resource
user
_idstring
timestamptimestamp
requestIdstring

Example event JSON#

{    "event": "resource.ResourceCreated",    "uuid": "8f2792c7-b01a-4493-ba5a-d0588a4aad8e",    "resource": {        "type": "custom.Resource",        ...    }    "user": {        "id": "00b82755-b5e6-4c8b-a4cf-66bb4f697f17"    },    "requestId": "abe50236-cf30-435f-b7fc-c05cb8f0f320"
}

resource.ResourceUpdated#

This is a resource event which is emitted whenever a resource is changed. Examples of such changes include being renamed, moved, a change in metadata, or a new version.

List of event properties#

PropertyType
uuidUUID
resource
user
_idstring
timestamptimestamp
requestIdstring

Example event JSON#

{    "event": "resource.ResourceUpdated",    "uuid": "8f2792c7-b01a-4493-ba5a-d0588a4aad8e",    "resource": {        "type": "custom.Resource",        ...    }    "user": {        "id": "00b82755-b5e6-4c8b-a4cf-66bb4f697f17"    },    "requestId": "abe50236-cf30-435f-b7fc-c05cb8f0f320"}

resource.ResourceHardDeleted#

This resource event is emitted when a resource is deleted permanently. A hard delete means that it is either deleted with ?purge=true or otherwise deleted in a way that means it cannot be recovered.

List of event properties#

PropertyType
uuidUUID
resource
user
_idstring
timestamptimestamp
requestIdstring

Example event JSON#

{    "event": "resource.ResourceHardDeleted",    "uuid": "8f2792c7-b01a-4493-ba5a-d0588a4aad8e",    "resource": {        "type": "custom.Resource",        ...    }    "user": {        "id": "00b82755-b5e6-4c8b-a4cf-66bb4f697f17"    },    "requestId": "abe50236-cf30-435f-b7fc-c05cb8f0f320"}

File Service resource types#

This section lists the resource types which are specific to the File Service.

filesvc.File#

ObjectPropertyType
resource
idstring
namespacesstring[]
fileTypestring
before
namestring
parentsstring[]
namespacesstring[]
fileTypestring
statusstring
tagsstring[]
tipVersioninteger
after
namestring
parentsstring[]
namespacesstring[]
fileTypestring
statusstring
tagsstring[]
tipVersioninteger

filesvc.FileVersion#

ObjectPropertyType
resource
idstring
namespacesstring[]
fileTypestring
fieldstring
versioninteger
before
namestring
fieldstring
versioninteger
parentsstring[]
namespacesstring[]
fileTypestring
statusstring
tagsstring[]
sizeinteger
after
namestring
fieldstring
versioninteger
parentsstring[]
namespacesstring[]
fileTypestring
statusstring
tagsstring[]
sizeinteger