Item Service resource types Overview# The Item 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 Item 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> } } Copy 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.*" } } Copy Common events# This section lists the events which are common to all services.
resource.ResourceCreated# A resource created event is emitted when a resource is created.
Property Type uuidUUID resourceuser_idstring timestamptimestamp requestIdstring
Example event# { "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"
} Copy resource.ResourceUpdated# A resource updated event is emitted when a resource is changed.
Property Type uuidUUID resourceuser_idstring timestamptimestamp requestIdstring
Example event# { "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"
} Copy resource.ResourceSoftDeleted# A resource soft deleted event is emitted if a resource is marked for deletion but not yet permanently deleted.
Typically, a resource.ResourceHardDeleted event will follow a resource.ResourceSoftDeleted event. However, not all services support soft delete and in this case, only a resource.ResourceHardDeleted is emitted.
Property Type uuidUUID resourceuser_idstring timestamptimestamp requestIdstring
Example event# { "event" : "resource.ResourceSoftDeleted" , "uuid" : "8f2792c7-b01a-4493-ba5a-d0588a4aad8e" , "resource" : { "type" : "custom.Resource" , ... } "user" : { "id" : "00b82755-b5e6-4c8b-a4cf-66bb4f697f17" } , "requestId" : "abe50236-cf30-435f-b7fc-c05cb8f0f320"
} Copy resource.ResourceHardDeleted# A resource hard deleted event is emitted if a resource is deleted permanently. This means is it either deleted with ?purge=true or otherwise deleted in a way that means it cannot be recovered.
Property Type uuidUUID resourceuser_idstring timestamptimestamp requestIdstring
Example event# { "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"
} Copy Item Service resource types# This section lists the resource types which are specific to the Item Service.
itemsvc.NamedCompositeItem# Object Property Type resourceidstring namespacesstring[] userItemidstring beforenamestring descriptionstring userTypestring shortNamestring itemClassstring kindstring namespacesstring[] tipVersioninteger afternamestring descriptionstring userTypestring shortNamestring itemClassstring kindstring namespacesstring[] tipVersioninteger
itemsvc.NamedCompositeItemVersion# Object Property Type resourceidstring namespacesstring[] userItemDbldstring userItemIdstring versioninteger beforenamespacesstring[] userItemDbldstring userItemIdstring userTypestring shortNamestring itemClassstring kindstring namespacesstring[] tipVersioninteger afternamespacesstring[] userItemDbldstring userItemIdstring userTypestring shortNamestring itemClassstring kindstring namespacesstring[] tipVersioninteger
itemsvc.NamedTelemetryCollectionVersion# Object Property Type resourceidstring namespacesstring[] userItemDbldstring userItemIdstring versioninteger beforenamespacesstring[] userItemDbldstring userItemIdstring itemClassstring versioninteger afternamespacesstring[] userItemDbldstring userItemIdstring itemClassstring versioninteger
itemsvc.NamedUserCollection# Object Property Type resourceidstring namespacesstring[] userItemIdstring beforenamestring descriptionstring userTypestring shortNamestring itemClassstring kindstring namespacesstring[] tipversioninteger afternamestring descriptionstring userTypestring shortNamestring itemClassstring kindstring namespacesstring[] tipversioninteger
itemsvc.NamedUserCollectionVersion# Object Property Type resourceidstring namespacesstring[] userItemDbIdstring userItemIdstring versioninteger beforenamespacesstring[] userItemDbldstring userItemIdstring itemClassstring versioninteger afternamespacesstring[] userItemDbldstring userItemIdstring itemClassstring versioninteger
itemsvc.SchemaDefinition# Object Property Type resourceidstring namespacesstring[] beforenamestring descriptionstring userTypestring shortNamestring definitionstring namespacesstring[] afternamestring descriptionstring userTypestring shortNamestring definitionstring namespacesstring[]
itemsvc.Script# Object Property Type resourceidstring namespacesstring[] userItemIdstring beforenamestring descriptionstring userTypestring shortNamestring itemClassstring kindstring namespacesstring[] tipVersioninteger afternamestring descriptionstring userTypestring shortNamestring itemClassstring kindstring namespacesstring[] tipVersioninteger
itemsvc.ScriptVersion# Object Property Type resourceidstring namespacesstring[] userItemDbIdstring userItemIdstring versioninteger beforenamespacesstring[] userItemDbIdstring userItemIdstring itemClassstring versioninteger afternamespacesstring[] userItemDbIdstring userItemIdstring itemClassstring versioninteger
itemsvc.UserConfig# Object Property Type resourceidstring namespacesstring[] userItemIdstring beforenamestring descriptionstring userTypestring shortNamestring itemClassstring kindstring namespacesstring[] tipVersioninteger afternamestring descriptionstring userTypestring shortNamestring itemClassstring kindstring namespacesstring[] tipVersioninteger
itemsvc.UserConfigVersion# Object Property Type resourceidstring namespacesstring[] userItemDbIdstring userItemIdstring versioninteger beforenamespacesstring[] userItemDbIdstring userItemIdstring itemClassstring versioninteger afternamespacesstring[] userItemDbIdstring userItemIdstring itemClassstring versioninteger