Appearance
traits/access.proto
Table of Contents
traits/access.proto
AccessAttempt
AccessAttempt describes an access attempt made at an access point. At a minimum it should define the status of the access attempt, and the time it was made. It may also include the actor attempting access, and the reason for the access attempt being granted or denied.
Field | Type | Label | Description |
---|---|---|---|
grant | AccessAttempt.Grant | Was the access attempt granted or denied. | |
reason | string | A reason for either granting or denying the access attempt. For example "Operator override" or "Unrecognised card". | |
actor | AccessAttempt.Actor | Actor describes the entity attempting to gain access. Optional. | |
access_attempt_time | google.protobuf.Timestamp | The time the access attempt was made |
AccessAttempt.Actor
An Actor is some entity that attempted to access the resource. It could be an object, like a car, or a person or animal.
todo: merge with the Occupant in EnterLeaveSensor trait
Field | Type | Label | Description |
---|---|---|---|
name | string | A unique name for this actor as measured by the device. Name allows correlation between enter and leave events. | |
title | string | An official title for this actor. | |
display_name | string | A recognisable display name for this actor. | |
picture | smartcore.types.Image | A picture of the actor. | |
url | string | A url that resolves to more information on this actor. | |
string | An email address for the actor. | ||
last_grant_time | google.protobuf.Timestamp | The time this actor was last granted access. The grant may have been performed by a different device to this one. | |
last_grant_zone | string | The access zone the actor was last granted access to. The zone will be provided by the device and may not map to any Smart Core zone or device. | |
ids | AccessAttempt.Actor.IdsEntry | repeated | IDs holds external actor ids. For example this might hold an id representing a person in an access control system. The map key should uniquely represent the domain for the id, for example "my-access-system/user-id", the use of uris is not required, values should be the id of this consumable in that domain, for example "sma81r6t1c5o3r58e1-3r8u16l1es". |
more | AccessAttempt.Actor.MoreEntry | repeated | Additional properties associated with the actor. Typically displayed to a user to help them to distinguish between similar actors. |
AccessAttempt.Actor.IdsEntry
Field | Type | Label | Description |
---|---|---|---|
key | string | ||
value | string |
AccessAttempt.Actor.MoreEntry
Field | Type | Label | Description |
---|---|---|---|
key | string | ||
value | string |
GetLastAccessAttemptRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the device to get the last access attempt for. | |
read_mask | google.protobuf.FieldMask |
PullAccessAttemptsRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the device to pull access attempts for. | |
read_mask | google.protobuf.FieldMask | ||
updates_only | bool |
PullAccessAttemptsResponse
Field | Type | Label | Description |
---|---|---|---|
changes | PullAccessAttemptsResponse.Change | repeated |
PullAccessAttemptsResponse.Change
Field | Type | Label | Description |
---|---|---|---|
name | string | ||
change_time | google.protobuf.Timestamp | ||
access_attempt | AccessAttempt |
AccessAttempt.Grant
Name | Number | Description |
---|---|---|
GRANT_UNKNOWN | 0 | The status of the access attempt is unknown. |
GRANTED | 1 | The access attempt was granted. |
DENIED | 2 | The access attempt was denied. |
PENDING | 3 | Access is pending a decision. |
ABORTED | 4 | Access was aborted before being granted or denied. Typically only used following PENDING. |
FORCED | 5 | Access was not granted, happened anyway. For example if someone forced the door open. |
FAILED | 6 | Access was granted, but failed for other reasons. For example if the door is stuck |
TAILGATE | 7 | Access was granted, but to the actor before this one. Happens when someone follows another person through a door. |
AccessApi
AccessApi describes the capability to manage access to a resource. This could be a access card reader next to a door, or a barrier at a car park.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
GetLastAccessAttempt | GetLastAccessAttemptRequest | AccessAttempt | |
PullAccessAttempts | PullAccessAttemptsRequest | PullAccessAttemptsResponse stream |