Event service (gRPC)#
An Event is an annotated moment or time range. The Event Service is responsible for creating and retrieving events for a particular data source.
Endpoints#
Aggregate events#
gRPC /nominal.event.v2.EventService/AggregateEvents
Searches for events matching the given filter and aggregates them based on the requested functions.
Request: AggregateEventsRequest
querySearchQuery
Fields of
SearchQuery- one of 41 fields
archivedboolean
search_textstringSearch text to perform fuzzy searching against.
exact_matchstringSearch text to perform exact matching against on the event name and description.
afterTimestampFilters to events after this timestamp, exclusive.
Fields of
Timestampsecondsinteger (int64)
nanosinteger (int64)
beforeTimestampFilters to events before this timestamp, exclusive.
advanced_time_filterEventTimeFilter
Fields of
EventTimeFiltertimestampTimestamp
timestamp_conditionEventTimeFilterCondition
Values of
EventTimeFilterConditionEVENT_TIME_FILTER_CONDITION_UNSPECIFIED
START_TIME_BEFORE_INCLUSIVE
START_TIME_BEFORE_EXCLUSIVE
START_TIME_AFTER_INCLUSIVE
START_TIME_AFTER_EXCLUSIVE
END_TIME_BEFORE_INCLUSIVE
END_TIME_BEFORE_EXCLUSIVE
END_TIME_AFTER_INCLUSIVE
END_TIME_AFTER_EXCLUSIVE
assetstring
assetsAssetsFilter
Fields of
AssetsFilteroperatorSetOperator
Values of
SetOperatorSET_OPERATOR_UNSPECIFIED
AND
OR
assetsarray of string
templatestring
workbookstring
data_reviewstring
data_reviewsDataReviewsFilter
Fields of
DataReviewsFilterdata_reviewsarray of string
origin_typeSearchEventOriginType
Values of
SearchEventOriginTypeSEARCH_EVENT_ORIGIN_TYPE_UNSPECIFIED
WORKBOOK
TEMPLATE
API
DATA_REVIEW
PROCEDURE
STREAMING_CHECKLIST
origin_typesOriginTypesFilter
Fields of
OriginTypesFilteroperatorSetOperator
origin_typesarray ofSearchEventOriginType
data_review_checkstring
data_review_checksDataReviewChecksFilter
Fields of
DataReviewChecksFilterdata_review_checksarray of string
disposition_statusEventDispositionStatus
Values of
EventDispositionStatusEVENT_DISPOSITION_STATUS_UNSPECIFIED
PENDING_REVIEW
CLOSED_IGNORED
CLOSED_REQUIRES_FURTHER_ACTION
NO_DISPOSITION
disposition_statusesEventDispositionStatusList
Fields of
EventDispositionStatusListvaluesarray ofEventDispositionStatus
priorityPriority
Values of
PriorityPRIORITY_UNSPECIFIED
P0
P1
P2
P3
P4
prioritiesPriorityList
Fields of
PriorityListvaluesarray ofPriority
assigneestring
assigneesAssigneesFilter
Fields of
AssigneesFilteroperatorSetOperator
assigneesarray of string
event_typeEventType
Values of
EventTypeEVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
event_typesEventTypeList
Fields of
EventTypeListvaluesarray ofEventType
created_bystring
created_by_any_ofUserRidList
Fields of
UserRidListvaluesarray of string
labelstring
labelsLabelsFilter
Fields of
LabelsFilteroperatorSetOperator
labelsarray of string
propertyProperty
Fields of
Propertynamestring
valuestring
propertiesPropertiesFilter
Fields of
PropertiesFilternamestring
valuesarray of string
andSearchQueryList
Fields of
SearchQueryListqueriesarray ofSearchQuery
orSearchQueryList
notSearchQuery
workspacestring
procedurestring
procedure_executionstring
step_idstring
streaming_checkliststringFilters to events created from a checklist executing in streaming.
streaming_checkstringFilters to events created from the check of a checklist executing in streaming.
numeric_propertyNumericPropertyPredicateMatches events using a numeric property comparison.
Fields of
NumericPropertyPredicatenamestring
valuenumber
operatorPropertyComparisonOperator
Values of
PropertyComparisonOperatorPROPERTY_COMPARISON_OPERATOR_UNSPECIFIED
EQ
NEQ
GT
GTE
LT
LTE
numeric_property_rangeNumericPropertyRangePredicateMatches events using an inclusive numeric property range.
Fields of
NumericPropertyRangePredicatenamestring
minnumber
maxnumber
operatorNumericPropertyRangeOperator
Values of
NumericPropertyRangeOperatorNUMERIC_PROPERTY_RANGE_OPERATOR_UNSPECIFIED
BETWEEN
NOT_BETWEEN
aggregate_typesarray ofAggregateType
Values of
AggregateTypeAGGREGATE_TYPE_UNSPECIFIED
TOTAL_DURATION
TOTAL_COUNT
Response: AggregateEventsResponse
valuesmap of string toAggregateValueKeyed by AggregateType enum value name (proto3 forbids enum map keys).
Fields of
AggregateValue- one of
duration,count
durationDuration
Fields of
Durationsecondsinteger (int64)
nanosinteger (int64)
countinteger
- one of
Request
import grpc
from nominal.protos.event.v2 import event_pb2, event_pb2_grpc
channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials())
event_service = event_pb2_grpc.EventServiceStub(channel)
auth = [("authorization", "Bearer <api key>")]
request = event_pb2.AggregateEventsRequest(
query={"archived": True},
aggregate_types=["TOTAL_DURATION"],
)
response = event_service.AggregateEvents(request, metadata=auth)
print(response)
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
eventv2 "github.com/nominal-io/nominal-api-protos-go/nominal/protos/event/v2"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
)
func main() {
conn, err := grpc.NewClient("api.gov.nominal.io:443",
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})))
if err != nil {
log.Fatal(err)
}
defer conn.Close()
eventService := eventv2.NewEventServiceClient(conn)
ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer <api key>")
request := &eventv2.AggregateEventsRequest{
Query: &eventv2.SearchQuery{
SearchQuery: &eventv2.SearchQuery_Archived{Archived: true},
},
AggregateTypes: []eventv2.AggregateType{
eventv2.AggregateType_TOTAL_DURATION,
},
}
response, err := eventService.AggregateEvents(ctx, request)
if err != nil {
log.Fatal(err)
}
fmt.Println(response)
}
Response
{
"values": {
"<key>": {
"duration": {
"seconds": 1,
"nanos": 1
}
}
}
}
Archive event#
gRPC /nominal.event.v2.EventService/ArchiveEvent
Archives an event.
Request: ArchiveEventRequest
uuidstring
Response: ArchiveEventResponse
A message with no fields.
Request
import grpc
from nominal.protos.event.v2 import event_pb2, event_pb2_grpc
channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials())
event_service = event_pb2_grpc.EventServiceStub(channel)
auth = [("authorization", "Bearer <api key>")]
request = event_pb2.ArchiveEventRequest(uuid="<uuid>")
response = event_service.ArchiveEvent(request, metadata=auth)
print(response)
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
eventv2 "github.com/nominal-io/nominal-api-protos-go/nominal/protos/event/v2"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
)
func main() {
conn, err := grpc.NewClient("api.gov.nominal.io:443",
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})))
if err != nil {
log.Fatal(err)
}
defer conn.Close()
eventService := eventv2.NewEventServiceClient(conn)
ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer <api key>")
request := &eventv2.ArchiveEventRequest{
Uuid: "<uuid>",
}
response, err := eventService.ArchiveEvent(ctx, request)
if err != nil {
log.Fatal(err)
}
fmt.Println(response)
}
Response
{}
Batch aggregate events#
gRPC /nominal.event.v2.EventService/BatchAggregateEvents
Aggregates each batched request and returns responses in the same order.
Request: BatchAggregateEventsRequest
requestsarray ofAggregateEventsRequest
Fields of
AggregateEventsRequestquerySearchQuery
Fields of
SearchQuery- one of 41 fields
archivedboolean
search_textstringSearch text to perform fuzzy searching against.
exact_matchstringSearch text to perform exact matching against on the event name and description.
afterTimestampFilters to events after this timestamp, exclusive.
Fields of
Timestampsecondsinteger (int64)
nanosinteger (int64)
beforeTimestampFilters to events before this timestamp, exclusive.
advanced_time_filterEventTimeFilter
Fields of
EventTimeFiltertimestampTimestamp
timestamp_conditionEventTimeFilterCondition
Values of
EventTimeFilterConditionEVENT_TIME_FILTER_CONDITION_UNSPECIFIED
START_TIME_BEFORE_INCLUSIVE
START_TIME_BEFORE_EXCLUSIVE
START_TIME_AFTER_INCLUSIVE
START_TIME_AFTER_EXCLUSIVE
END_TIME_BEFORE_INCLUSIVE
END_TIME_BEFORE_EXCLUSIVE
END_TIME_AFTER_INCLUSIVE
END_TIME_AFTER_EXCLUSIVE
assetstring
assetsAssetsFilter
Fields of
AssetsFilteroperatorSetOperator
Values of
SetOperatorSET_OPERATOR_UNSPECIFIED
AND
OR
assetsarray of string
templatestring
workbookstring
data_reviewstring
data_reviewsDataReviewsFilter
Fields of
DataReviewsFilterdata_reviewsarray of string
origin_typeSearchEventOriginType
Values of
SearchEventOriginTypeSEARCH_EVENT_ORIGIN_TYPE_UNSPECIFIED
WORKBOOK
TEMPLATE
API
DATA_REVIEW
PROCEDURE
STREAMING_CHECKLIST
origin_typesOriginTypesFilter
Fields of
OriginTypesFilteroperatorSetOperator
origin_typesarray ofSearchEventOriginType
data_review_checkstring
data_review_checksDataReviewChecksFilter
Fields of
DataReviewChecksFilterdata_review_checksarray of string
disposition_statusEventDispositionStatus
Values of
EventDispositionStatusEVENT_DISPOSITION_STATUS_UNSPECIFIED
PENDING_REVIEW
CLOSED_IGNORED
CLOSED_REQUIRES_FURTHER_ACTION
NO_DISPOSITION
disposition_statusesEventDispositionStatusList
Fields of
EventDispositionStatusListvaluesarray ofEventDispositionStatus
priorityPriority
Values of
PriorityPRIORITY_UNSPECIFIED
P0
P1
P2
P3
P4
prioritiesPriorityList
Fields of
PriorityListvaluesarray ofPriority
assigneestring
assigneesAssigneesFilter
Fields of
AssigneesFilteroperatorSetOperator
assigneesarray of string
event_typeEventType
Values of
EventTypeEVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
event_typesEventTypeList
Fields of
EventTypeListvaluesarray ofEventType
created_bystring
created_by_any_ofUserRidList
Fields of
UserRidListvaluesarray of string
labelstring
labelsLabelsFilter
Fields of
LabelsFilteroperatorSetOperator
labelsarray of string
propertyProperty
Fields of
Propertynamestring
valuestring
propertiesPropertiesFilter
Fields of
PropertiesFilternamestring
valuesarray of string
andSearchQueryList
Fields of
SearchQueryListqueriesarray ofSearchQuery
orSearchQueryList
notSearchQuery
workspacestring
procedurestring
procedure_executionstring
step_idstring
streaming_checkliststringFilters to events created from a checklist executing in streaming.
streaming_checkstringFilters to events created from the check of a checklist executing in streaming.
numeric_propertyNumericPropertyPredicateMatches events using a numeric property comparison.
Fields of
NumericPropertyPredicatenamestring
valuenumber
operatorPropertyComparisonOperator
Values of
PropertyComparisonOperatorPROPERTY_COMPARISON_OPERATOR_UNSPECIFIED
EQ
NEQ
GT
GTE
LT
LTE
numeric_property_rangeNumericPropertyRangePredicateMatches events using an inclusive numeric property range.
Fields of
NumericPropertyRangePredicatenamestring
minnumber
maxnumber
operatorNumericPropertyRangeOperator
Values of
NumericPropertyRangeOperatorNUMERIC_PROPERTY_RANGE_OPERATOR_UNSPECIFIED
BETWEEN
NOT_BETWEEN
aggregate_typesarray ofAggregateType
Values of
AggregateTypeAGGREGATE_TYPE_UNSPECIFIED
TOTAL_DURATION
TOTAL_COUNT
Response: BatchAggregateEventsResponse
responsesarray ofAggregateEventsResponse
Fields of
AggregateEventsResponsevaluesmap of string toAggregateValueKeyed by AggregateType enum value name (proto3 forbids enum map keys).
Fields of
AggregateValue- one of
duration,count
durationDuration
Fields of
Durationsecondsinteger (int64)
nanosinteger (int64)
countinteger
- one of
Request
import grpc
from nominal.protos.event.v2 import event_pb2, event_pb2_grpc
channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials())
event_service = event_pb2_grpc.EventServiceStub(channel)
auth = [("authorization", "Bearer <api key>")]
request = event_pb2.BatchAggregateEventsRequest(
requests=[{"query": {"archived": True}, "aggregate_types": ["TOTAL_DURATION"]}],
)
response = event_service.BatchAggregateEvents(request, metadata=auth)
print(response)
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
eventv2 "github.com/nominal-io/nominal-api-protos-go/nominal/protos/event/v2"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
)
func main() {
conn, err := grpc.NewClient("api.gov.nominal.io:443",
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})))
if err != nil {
log.Fatal(err)
}
defer conn.Close()
eventService := eventv2.NewEventServiceClient(conn)
ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer <api key>")
request := &eventv2.BatchAggregateEventsRequest{
Requests: []*eventv2.AggregateEventsRequest{
{
Query: &eventv2.SearchQuery{
SearchQuery: &eventv2.SearchQuery_Archived{Archived: true},
},
AggregateTypes: []eventv2.AggregateType{
eventv2.AggregateType_TOTAL_DURATION,
},
},
},
}
response, err := eventService.BatchAggregateEvents(ctx, request)
if err != nil {
log.Fatal(err)
}
fmt.Println(response)
}
Response
{
"responses": [
{
"values": {
"<key>": {
"duration": {
"seconds": 1,
"nanos": 1
}
}
}
}
]
}
Batch archive event#
gRPC /nominal.event.v2.EventService/BatchArchiveEvent
Archives a set of events.
Request: BatchArchiveEventRequest
event_ridsarray of string
Response: BatchArchiveEventResponse
A message with no fields.
Request
import grpc
from nominal.protos.event.v2 import event_pb2, event_pb2_grpc
channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials())
event_service = event_pb2_grpc.EventServiceStub(channel)
auth = [("authorization", "Bearer <api key>")]
request = event_pb2.BatchArchiveEventRequest(event_rids=["<event rids>"])
response = event_service.BatchArchiveEvent(request, metadata=auth)
print(response)
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
eventv2 "github.com/nominal-io/nominal-api-protos-go/nominal/protos/event/v2"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
)
func main() {
conn, err := grpc.NewClient("api.gov.nominal.io:443",
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})))
if err != nil {
log.Fatal(err)
}
defer conn.Close()
eventService := eventv2.NewEventServiceClient(conn)
ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer <api key>")
request := &eventv2.BatchArchiveEventRequest{
EventRids: []string{
"<event rids>",
},
}
response, err := eventService.BatchArchiveEvent(ctx, request)
if err != nil {
log.Fatal(err)
}
fmt.Println(response)
}
Response
{}
Batch filter events#
gRPC /nominal.event.v2.EventService/BatchFilterEvents
Gets a filtered set of events by RID and search filters.
Request: BatchFilterEventsRequest
event_ridsarray of string
filter_querySearchQuery
Fields of
SearchQuery- one of 41 fields
archivedboolean
search_textstringSearch text to perform fuzzy searching against.
exact_matchstringSearch text to perform exact matching against on the event name and description.
afterTimestampFilters to events after this timestamp, exclusive.
Fields of
Timestampsecondsinteger (int64)
nanosinteger (int64)
beforeTimestampFilters to events before this timestamp, exclusive.
advanced_time_filterEventTimeFilter
Fields of
EventTimeFiltertimestampTimestamp
timestamp_conditionEventTimeFilterCondition
Values of
EventTimeFilterConditionEVENT_TIME_FILTER_CONDITION_UNSPECIFIED
START_TIME_BEFORE_INCLUSIVE
START_TIME_BEFORE_EXCLUSIVE
START_TIME_AFTER_INCLUSIVE
START_TIME_AFTER_EXCLUSIVE
END_TIME_BEFORE_INCLUSIVE
END_TIME_BEFORE_EXCLUSIVE
END_TIME_AFTER_INCLUSIVE
END_TIME_AFTER_EXCLUSIVE
assetstring
assetsAssetsFilter
Fields of
AssetsFilteroperatorSetOperator
Values of
SetOperatorSET_OPERATOR_UNSPECIFIED
AND
OR
assetsarray of string
templatestring
workbookstring
data_reviewstring
data_reviewsDataReviewsFilter
Fields of
DataReviewsFilterdata_reviewsarray of string
origin_typeSearchEventOriginType
Values of
SearchEventOriginTypeSEARCH_EVENT_ORIGIN_TYPE_UNSPECIFIED
WORKBOOK
TEMPLATE
API
DATA_REVIEW
PROCEDURE
STREAMING_CHECKLIST
origin_typesOriginTypesFilter
Fields of
OriginTypesFilteroperatorSetOperator
origin_typesarray ofSearchEventOriginType
data_review_checkstring
data_review_checksDataReviewChecksFilter
Fields of
DataReviewChecksFilterdata_review_checksarray of string
disposition_statusEventDispositionStatus
Values of
EventDispositionStatusEVENT_DISPOSITION_STATUS_UNSPECIFIED
PENDING_REVIEW
CLOSED_IGNORED
CLOSED_REQUIRES_FURTHER_ACTION
NO_DISPOSITION
disposition_statusesEventDispositionStatusList
Fields of
EventDispositionStatusListvaluesarray ofEventDispositionStatus
priorityPriority
Values of
PriorityPRIORITY_UNSPECIFIED
P0
P1
P2
P3
P4
prioritiesPriorityList
Fields of
PriorityListvaluesarray ofPriority
assigneestring
assigneesAssigneesFilter
Fields of
AssigneesFilteroperatorSetOperator
assigneesarray of string
event_typeEventType
Values of
EventTypeEVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
event_typesEventTypeList
Fields of
EventTypeListvaluesarray ofEventType
created_bystring
created_by_any_ofUserRidList
Fields of
UserRidListvaluesarray of string
labelstring
labelsLabelsFilter
Fields of
LabelsFilteroperatorSetOperator
labelsarray of string
propertyProperty
Fields of
Propertynamestring
valuestring
propertiesPropertiesFilter
Fields of
PropertiesFilternamestring
valuesarray of string
andSearchQueryList
Fields of
SearchQueryListqueriesarray ofSearchQuery
orSearchQueryList
notSearchQuery
workspacestring
procedurestring
procedure_executionstring
step_idstring
streaming_checkliststringFilters to events created from a checklist executing in streaming.
streaming_checkstringFilters to events created from the check of a checklist executing in streaming.
numeric_propertyNumericPropertyPredicateMatches events using a numeric property comparison.
Fields of
NumericPropertyPredicatenamestring
valuenumber
operatorPropertyComparisonOperator
Values of
PropertyComparisonOperatorPROPERTY_COMPARISON_OPERATOR_UNSPECIFIED
EQ
NEQ
GT
GTE
LT
LTE
numeric_property_rangeNumericPropertyRangePredicateMatches events using an inclusive numeric property range.
Fields of
NumericPropertyRangePredicatenamestring
minnumber
maxnumber
operatorNumericPropertyRangeOperator
Values of
NumericPropertyRangeOperatorNUMERIC_PROPERTY_RANGE_OPERATOR_UNSPECIFIED
BETWEEN
NOT_BETWEEN
Response: BatchFilterEventsResponse
eventsarray ofEvent
Fields of
Eventuuidstring
ridstring
asset_ridsarray of stringA set of asset rids associated with the event.
originsarray ofEventOriginA set of origins associated with the event.
Fields of
EventOrigin- one of 6 fields
workbookWorkbookEventOriginThis event was created in this workbook.
Fields of
WorkbookEventOriginridstring
dataarray ofWorkbookDataAssociationData visualizations to associate this event with.
Fields of
WorkbookDataAssociationtime_series_channelTimeSeriesChannelAssociation
Fields of
TimeSeriesChannelAssociationvariable_namestring
tagsmap of string to stringIf this variable is grouped, the tags within the groupings this event should associate with.
templateTemplateEventOriginThis event was created in this template.
Fields of
TemplateEventOriginridstring
apiApiEventOriginThis event was created programmatically via the API.
data_reviewDataReviewEventOriginThis event was created automatically from a checklist execution.
Fields of
DataReviewEventOrigindata_review_ridstring
check_metadataCheckOriginMetadataMetadata about the check that created this event.
Fields of
CheckOriginMetadatacheck_evaluation_ridstring
check_ridstring
check_lineage_ridstring
implementation_indexinteger
procedureProcedureEventOriginThis event was created automatically from a procedure execution.
Fields of
ProcedureEventOriginprocedure_execution_ridstring
procedure_ridstring
step_idstring
streaming_checklistStreamingChecklistEventOriginThis event was created automatically from the execution of a streaming checklist.
Fields of
StreamingChecklistEventOriginchecklist_ridstring
check_metadataStreamingCheckOriginMetadataMetadata about the check that created this event.
Fields of
StreamingCheckOriginMetadatacheck_ridstring
check_lineage_ridstring
implementation_indexinteger
timestampTimestamp
Fields of
Timestampsecondsinteger (int64)
nanosinteger (int64)
durationDuration
Fields of
Durationsecondsinteger (int64)
nanosinteger (int64)
namestring
descriptionstring
typeEventType
Values of
EventTypeEVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
labelsarray of string
propertiesmap of string to string deprecated
is_archivedboolean
created_bystringThe user who created the event. This field may be missing for legacy events.
dispositionEventDisposition
Fields of
EventDispositionpriorityPriority
Values of
PriorityPRIORITY_UNSPECIFIED
P0
P1
P2
P3
P4
stateDispositionState
Fields of
DispositionState- one of
pending_review,closed_with_further_action,closed_with_ignore
pending_reviewPendingReviewDispositionState
Fields of
PendingReviewDispositionStateopened_bystring
closed_with_further_actionClosedWithFurtherActionDispositionState
Fields of
ClosedWithFurtherActionDispositionStateclosed_bystring
closed_with_ignoreClosedWithIgnoreDispositionState
Fields of
ClosedWithIgnoreDispositionStateclosed_bystring
- one of
assigneesarray of string
typed_propertiesmap of string toTypedPropertyValue
Fields of
TypedPropertyValue- one of
string_value,numeric_value
string_valuestring
numeric_valuenumber
- one of
Request
import grpc
from nominal.protos.event.v2 import event_pb2, event_pb2_grpc
channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials())
event_service = event_pb2_grpc.EventServiceStub(channel)
auth = [("authorization", "Bearer <api key>")]
request = event_pb2.BatchFilterEventsRequest(
event_rids=["<event rids>"],
filter_query={"archived": True},
)
response = event_service.BatchFilterEvents(request, metadata=auth)
print(response)
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
eventv2 "github.com/nominal-io/nominal-api-protos-go/nominal/protos/event/v2"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
)
func main() {
conn, err := grpc.NewClient("api.gov.nominal.io:443",
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})))
if err != nil {
log.Fatal(err)
}
defer conn.Close()
eventService := eventv2.NewEventServiceClient(conn)
ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer <api key>")
request := &eventv2.BatchFilterEventsRequest{
EventRids: []string{
"<event rids>",
},
FilterQuery: &eventv2.SearchQuery{
SearchQuery: &eventv2.SearchQuery_Archived{Archived: true},
},
}
response, err := eventService.BatchFilterEvents(ctx, request)
if err != nil {
log.Fatal(err)
}
fmt.Println(response)
}
Response
{
"events": [
{
"uuid": "<uuid>",
"rid": "<rid>",
"asset_rids": [
"<asset rids>"
],
"origins": [
{
"workbook": {
"rid": "<rid>",
"data": [
{
"time_series_channel": {
"variable_name": "<variable name>",
"tags": {
"<key>": "<value>"
}
}
}
]
}
}
],
"timestamp": {
"seconds": 1,
"nanos": 1
},
"duration": {
"seconds": 1,
"nanos": 1
},
"name": "<name>",
"description": "<description>",
"type": "INFO",
"labels": [
"<labels>"
],
"properties": {
"<key>": "<value>"
},
"is_archived": true,
"created_by": "<created by>",
"disposition": {
"priority": "P0",
"state": {
"pending_review": {
"opened_by": "<opened by>"
}
},
"assignees": [
"<assignees>"
]
},
"typed_properties": {
"<key>": {
"string_value": "<string value>"
}
}
}
]
}
Batch find events#
gRPC /nominal.event.v2.EventService/BatchFindEvents
Finds, for each batched query, the single event at the query’s index among events matching the shared base query within the query’s asset and time-window constraints. Returns one result per query in the same order.
Best-effort under permission filtering: each query fetches index + 1 candidate rows and then removes events the caller cannot view, so when hidden events fall inside those candidates a query may report no event even though a later visible match exists.
Request: BatchFindEventsRequest
querySearchQueryThe base query every batched find matches against, combined with each query’s asset and window constraints.
Fields of
SearchQuery- one of 41 fields
archivedboolean
search_textstringSearch text to perform fuzzy searching against.
exact_matchstringSearch text to perform exact matching against on the event name and description.
afterTimestampFilters to events after this timestamp, exclusive.
Fields of
Timestampsecondsinteger (int64)
nanosinteger (int64)
beforeTimestampFilters to events before this timestamp, exclusive.
advanced_time_filterEventTimeFilter
Fields of
EventTimeFiltertimestampTimestamp
timestamp_conditionEventTimeFilterCondition
Values of
EventTimeFilterConditionEVENT_TIME_FILTER_CONDITION_UNSPECIFIED
START_TIME_BEFORE_INCLUSIVE
START_TIME_BEFORE_EXCLUSIVE
START_TIME_AFTER_INCLUSIVE
START_TIME_AFTER_EXCLUSIVE
END_TIME_BEFORE_INCLUSIVE
END_TIME_BEFORE_EXCLUSIVE
END_TIME_AFTER_INCLUSIVE
END_TIME_AFTER_EXCLUSIVE
assetstring
assetsAssetsFilter
Fields of
AssetsFilteroperatorSetOperator
Values of
SetOperatorSET_OPERATOR_UNSPECIFIED
AND
OR
assetsarray of string
templatestring
workbookstring
data_reviewstring
data_reviewsDataReviewsFilter
Fields of
DataReviewsFilterdata_reviewsarray of string
origin_typeSearchEventOriginType
Values of
SearchEventOriginTypeSEARCH_EVENT_ORIGIN_TYPE_UNSPECIFIED
WORKBOOK
TEMPLATE
API
DATA_REVIEW
PROCEDURE
STREAMING_CHECKLIST
origin_typesOriginTypesFilter
Fields of
OriginTypesFilteroperatorSetOperator
origin_typesarray ofSearchEventOriginType
data_review_checkstring
data_review_checksDataReviewChecksFilter
Fields of
DataReviewChecksFilterdata_review_checksarray of string
disposition_statusEventDispositionStatus
Values of
EventDispositionStatusEVENT_DISPOSITION_STATUS_UNSPECIFIED
PENDING_REVIEW
CLOSED_IGNORED
CLOSED_REQUIRES_FURTHER_ACTION
NO_DISPOSITION
disposition_statusesEventDispositionStatusList
Fields of
EventDispositionStatusListvaluesarray ofEventDispositionStatus
priorityPriority
Values of
PriorityPRIORITY_UNSPECIFIED
P0
P1
P2
P3
P4
prioritiesPriorityList
Fields of
PriorityListvaluesarray ofPriority
assigneestring
assigneesAssigneesFilter
Fields of
AssigneesFilteroperatorSetOperator
assigneesarray of string
event_typeEventType
Values of
EventTypeEVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
event_typesEventTypeList
Fields of
EventTypeListvaluesarray ofEventType
created_bystring
created_by_any_ofUserRidList
Fields of
UserRidListvaluesarray of string
labelstring
labelsLabelsFilter
Fields of
LabelsFilteroperatorSetOperator
labelsarray of string
propertyProperty
Fields of
Propertynamestring
valuestring
propertiesPropertiesFilter
Fields of
PropertiesFilternamestring
valuesarray of string
andSearchQueryList
Fields of
SearchQueryListqueriesarray ofSearchQuery
orSearchQueryList
notSearchQuery
workspacestring
procedurestring
procedure_executionstring
step_idstring
streaming_checkliststringFilters to events created from a checklist executing in streaming.
streaming_checkstringFilters to events created from the check of a checklist executing in streaming.
numeric_propertyNumericPropertyPredicateMatches events using a numeric property comparison.
Fields of
NumericPropertyPredicatenamestring
valuenumber
operatorPropertyComparisonOperator
Values of
PropertyComparisonOperatorPROPERTY_COMPARISON_OPERATOR_UNSPECIFIED
EQ
NEQ
GT
GTE
LT
LTE
numeric_property_rangeNumericPropertyRangePredicateMatches events using an inclusive numeric property range.
Fields of
NumericPropertyRangePredicatenamestring
minnumber
maxnumber
operatorNumericPropertyRangeOperator
Values of
NumericPropertyRangeOperatorNUMERIC_PROPERTY_RANGE_OPERATOR_UNSPECIFIED
BETWEEN
NOT_BETWEEN
sortSortOptions
Fields of
SortOptionsis_descendingboolean
fieldSortField
Values of
SortFieldSORT_FIELD_UNSPECIFIED
START_TIME
END_TIME
DURATION
DISPOSITION_STATUS
PRIORITY
EVENT_NAME
queriesarray ofFindEventsQueryRejects batches with more than 1k queries.
Fields of
FindEventsQueryasset_ridsarray of stringWhen non-empty, only events associated with at least one of these assets match. When empty, events match on the time window alone.
start_inclusiveTimestampHalf-open window [start_inclusive, end_exclusive) over event start times. An absent bound leaves that side of the window open.
end_exclusiveTimestamp
indexintegerZero-based rank of the event to return after applying the request sort and permission filtering. Must be non-negative. When permission filtering hides events within the first index matches, the result may be absent even though later matches exist.
Response: BatchFindEventsResponse
resultsarray ofFindEventsResultOne result per request query, in the same order.
Fields of
FindEventsResulteventEventAbsent when no event matches the query at the requested index.
Fields of
Eventuuidstring
ridstring
asset_ridsarray of stringA set of asset rids associated with the event.
originsarray ofEventOriginA set of origins associated with the event.
Fields of
EventOrigin- one of 6 fields
workbookWorkbookEventOriginThis event was created in this workbook.
Fields of
WorkbookEventOriginridstring
dataarray ofWorkbookDataAssociationData visualizations to associate this event with.
Fields of
WorkbookDataAssociationtime_series_channelTimeSeriesChannelAssociation
Fields of
TimeSeriesChannelAssociationvariable_namestring
tagsmap of string to stringIf this variable is grouped, the tags within the groupings this event should associate with.
templateTemplateEventOriginThis event was created in this template.
Fields of
TemplateEventOriginridstring
apiApiEventOriginThis event was created programmatically via the API.
data_reviewDataReviewEventOriginThis event was created automatically from a checklist execution.
Fields of
DataReviewEventOrigindata_review_ridstring
check_metadataCheckOriginMetadataMetadata about the check that created this event.
Fields of
CheckOriginMetadatacheck_evaluation_ridstring
check_ridstring
check_lineage_ridstring
implementation_indexinteger
procedureProcedureEventOriginThis event was created automatically from a procedure execution.
Fields of
ProcedureEventOriginprocedure_execution_ridstring
procedure_ridstring
step_idstring
streaming_checklistStreamingChecklistEventOriginThis event was created automatically from the execution of a streaming checklist.
Fields of
StreamingChecklistEventOriginchecklist_ridstring
check_metadataStreamingCheckOriginMetadataMetadata about the check that created this event.
Fields of
StreamingCheckOriginMetadatacheck_ridstring
check_lineage_ridstring
implementation_indexinteger
timestampTimestamp
Fields of
Timestampsecondsinteger (int64)
nanosinteger (int64)
durationDuration
Fields of
Durationsecondsinteger (int64)
nanosinteger (int64)
namestring
descriptionstring
typeEventType
Values of
EventTypeEVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
labelsarray of string
propertiesmap of string to string deprecated
is_archivedboolean
created_bystringThe user who created the event. This field may be missing for legacy events.
dispositionEventDisposition
Fields of
EventDispositionpriorityPriority
Values of
PriorityPRIORITY_UNSPECIFIED
P0
P1
P2
P3
P4
stateDispositionState
Fields of
DispositionState- one of
pending_review,closed_with_further_action,closed_with_ignore
pending_reviewPendingReviewDispositionState
Fields of
PendingReviewDispositionStateopened_bystring
closed_with_further_actionClosedWithFurtherActionDispositionState
Fields of
ClosedWithFurtherActionDispositionStateclosed_bystring
closed_with_ignoreClosedWithIgnoreDispositionState
Fields of
ClosedWithIgnoreDispositionStateclosed_bystring
- one of
assigneesarray of string
typed_propertiesmap of string toTypedPropertyValue
Fields of
TypedPropertyValue- one of
string_value,numeric_value
string_valuestring
numeric_valuenumber
- one of
Request
import grpc
from nominal.protos.event.v2 import event_pb2, event_pb2_grpc
channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials())
event_service = event_pb2_grpc.EventServiceStub(channel)
auth = [("authorization", "Bearer <api key>")]
request = event_pb2.BatchFindEventsRequest(
query={"archived": True},
sort={"is_descending": True, "field": "START_TIME"},
queries=[
{
"asset_rids": ["<asset rids>"],
"start_inclusive": {"seconds": 1, "nanos": 1},
"end_exclusive": {"seconds": 1, "nanos": 1},
"index": 1,
},
],
)
response = event_service.BatchFindEvents(request, metadata=auth)
print(response)
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
eventv2 "github.com/nominal-io/nominal-api-protos-go/nominal/protos/event/v2"
typestime "github.com/nominal-io/nominal-api-protos-go/nominal/protos/types/time"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
"google.golang.org/protobuf/proto"
)
func main() {
conn, err := grpc.NewClient("api.gov.nominal.io:443",
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})))
if err != nil {
log.Fatal(err)
}
defer conn.Close()
eventService := eventv2.NewEventServiceClient(conn)
ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer <api key>")
request := &eventv2.BatchFindEventsRequest{
Query: &eventv2.SearchQuery{
SearchQuery: &eventv2.SearchQuery_Archived{Archived: true},
},
Sort: &eventv2.SortOptions{
IsDescending: true,
Field: eventv2.SortField_START_TIME,
},
Queries: []*eventv2.FindEventsQuery{
{
AssetRids: []string{
"<asset rids>",
},
StartInclusive: &typestime.Timestamp{
Seconds: proto.Int64(1),
Nanos: proto.Int64(1),
},
EndExclusive: &typestime.Timestamp{
Seconds: proto.Int64(1),
Nanos: proto.Int64(1),
},
Index: 1,
},
},
}
response, err := eventService.BatchFindEvents(ctx, request)
if err != nil {
log.Fatal(err)
}
fmt.Println(response)
}
Response
{
"results": [
{
"event": {
"uuid": "<uuid>",
"rid": "<rid>",
"asset_rids": [
"<asset rids>"
],
"origins": [
{
"workbook": {
"rid": "<rid>",
"data": [
{
"time_series_channel": {
"variable_name": "<variable name>",
"tags": {
"<key>": "<value>"
}
}
}
]
}
}
],
"timestamp": {
"seconds": 1,
"nanos": 1
},
"duration": {
"seconds": 1,
"nanos": 1
},
"name": "<name>",
"description": "<description>",
"type": "INFO",
"labels": [
"<labels>"
],
"properties": {
"<key>": "<value>"
},
"is_archived": true,
"created_by": "<created by>",
"disposition": {
"priority": "P0",
"state": {
"pending_review": {
"opened_by": "<opened by>"
}
},
"assignees": [
"<assignees>"
]
},
"typed_properties": {
"<key>": {
"string_value": "<string value>"
}
}
}
}
]
}
Batch get events#
gRPC /nominal.event.v2.EventService/BatchGetEvents
Gets a set of events by RID.
Request: BatchGetEventsRequest
event_ridsarray of string
Response: BatchGetEventsResponse
eventsarray ofEvent
Fields of
Eventuuidstring
ridstring
asset_ridsarray of stringA set of asset rids associated with the event.
originsarray ofEventOriginA set of origins associated with the event.
Fields of
EventOrigin- one of 6 fields
workbookWorkbookEventOriginThis event was created in this workbook.
Fields of
WorkbookEventOriginridstring
dataarray ofWorkbookDataAssociationData visualizations to associate this event with.
Fields of
WorkbookDataAssociationtime_series_channelTimeSeriesChannelAssociation
Fields of
TimeSeriesChannelAssociationvariable_namestring
tagsmap of string to stringIf this variable is grouped, the tags within the groupings this event should associate with.
templateTemplateEventOriginThis event was created in this template.
Fields of
TemplateEventOriginridstring
apiApiEventOriginThis event was created programmatically via the API.
data_reviewDataReviewEventOriginThis event was created automatically from a checklist execution.
Fields of
DataReviewEventOrigindata_review_ridstring
check_metadataCheckOriginMetadataMetadata about the check that created this event.
Fields of
CheckOriginMetadatacheck_evaluation_ridstring
check_ridstring
check_lineage_ridstring
implementation_indexinteger
procedureProcedureEventOriginThis event was created automatically from a procedure execution.
Fields of
ProcedureEventOriginprocedure_execution_ridstring
procedure_ridstring
step_idstring
streaming_checklistStreamingChecklistEventOriginThis event was created automatically from the execution of a streaming checklist.
Fields of
StreamingChecklistEventOriginchecklist_ridstring
check_metadataStreamingCheckOriginMetadataMetadata about the check that created this event.
Fields of
StreamingCheckOriginMetadatacheck_ridstring
check_lineage_ridstring
implementation_indexinteger
timestampTimestamp
Fields of
Timestampsecondsinteger (int64)
nanosinteger (int64)
durationDuration
Fields of
Durationsecondsinteger (int64)
nanosinteger (int64)
namestring
descriptionstring
typeEventType
Values of
EventTypeEVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
labelsarray of string
propertiesmap of string to string deprecated
is_archivedboolean
created_bystringThe user who created the event. This field may be missing for legacy events.
dispositionEventDisposition
Fields of
EventDispositionpriorityPriority
Values of
PriorityPRIORITY_UNSPECIFIED
P0
P1
P2
P3
P4
stateDispositionState
Fields of
DispositionState- one of
pending_review,closed_with_further_action,closed_with_ignore
pending_reviewPendingReviewDispositionState
Fields of
PendingReviewDispositionStateopened_bystring
closed_with_further_actionClosedWithFurtherActionDispositionState
Fields of
ClosedWithFurtherActionDispositionStateclosed_bystring
closed_with_ignoreClosedWithIgnoreDispositionState
Fields of
ClosedWithIgnoreDispositionStateclosed_bystring
- one of
assigneesarray of string
typed_propertiesmap of string toTypedPropertyValue
Fields of
TypedPropertyValue- one of
string_value,numeric_value
string_valuestring
numeric_valuenumber
- one of
Request
import grpc
from nominal.protos.event.v2 import event_pb2, event_pb2_grpc
channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials())
event_service = event_pb2_grpc.EventServiceStub(channel)
auth = [("authorization", "Bearer <api key>")]
request = event_pb2.BatchGetEventsRequest(event_rids=["<event rids>"])
response = event_service.BatchGetEvents(request, metadata=auth)
print(response)
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
eventv2 "github.com/nominal-io/nominal-api-protos-go/nominal/protos/event/v2"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
)
func main() {
conn, err := grpc.NewClient("api.gov.nominal.io:443",
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})))
if err != nil {
log.Fatal(err)
}
defer conn.Close()
eventService := eventv2.NewEventServiceClient(conn)
ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer <api key>")
request := &eventv2.BatchGetEventsRequest{
EventRids: []string{
"<event rids>",
},
}
response, err := eventService.BatchGetEvents(ctx, request)
if err != nil {
log.Fatal(err)
}
fmt.Println(response)
}
Response
{
"events": [
{
"uuid": "<uuid>",
"rid": "<rid>",
"asset_rids": [
"<asset rids>"
],
"origins": [
{
"workbook": {
"rid": "<rid>",
"data": [
{
"time_series_channel": {
"variable_name": "<variable name>",
"tags": {
"<key>": "<value>"
}
}
}
]
}
}
],
"timestamp": {
"seconds": 1,
"nanos": 1
},
"duration": {
"seconds": 1,
"nanos": 1
},
"name": "<name>",
"description": "<description>",
"type": "INFO",
"labels": [
"<labels>"
],
"properties": {
"<key>": "<value>"
},
"is_archived": true,
"created_by": "<created by>",
"disposition": {
"priority": "P0",
"state": {
"pending_review": {
"opened_by": "<opened by>"
}
},
"assignees": [
"<assignees>"
]
},
"typed_properties": {
"<key>": {
"string_value": "<string value>"
}
}
}
]
}
Batch unarchive event#
gRPC /nominal.event.v2.EventService/BatchUnarchiveEvent
Unarchives a set of events.
Request: BatchUnarchiveEventRequest
event_ridsarray of string
Response: BatchUnarchiveEventResponse
A message with no fields.
Request
import grpc
from nominal.protos.event.v2 import event_pb2, event_pb2_grpc
channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials())
event_service = event_pb2_grpc.EventServiceStub(channel)
auth = [("authorization", "Bearer <api key>")]
request = event_pb2.BatchUnarchiveEventRequest(event_rids=["<event rids>"])
response = event_service.BatchUnarchiveEvent(request, metadata=auth)
print(response)
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
eventv2 "github.com/nominal-io/nominal-api-protos-go/nominal/protos/event/v2"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
)
func main() {
conn, err := grpc.NewClient("api.gov.nominal.io:443",
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})))
if err != nil {
log.Fatal(err)
}
defer conn.Close()
eventService := eventv2.NewEventServiceClient(conn)
ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer <api key>")
request := &eventv2.BatchUnarchiveEventRequest{
EventRids: []string{
"<event rids>",
},
}
response, err := eventService.BatchUnarchiveEvent(ctx, request)
if err != nil {
log.Fatal(err)
}
fmt.Println(response)
}
Response
{}
Batch update disposition#
gRPC /nominal.event.v2.EventService/BatchUpdateDisposition
Updates the disposition of a set of events.
Request: BatchUpdateDispositionRequest
requestsarray ofUpdateDispositionRequest
Fields of
UpdateDispositionRequestridstring
dispositionEventDispositionThe new disposition for the event. If empty, removes the disposition from the event.
Fields of
EventDispositionpriorityPriority
Values of
PriorityPRIORITY_UNSPECIFIED
P0
P1
P2
P3
P4
stateDispositionState
Fields of
DispositionState- one of
pending_review,closed_with_further_action,closed_with_ignore
pending_reviewPendingReviewDispositionState
Fields of
PendingReviewDispositionStateopened_bystring
closed_with_further_actionClosedWithFurtherActionDispositionState
Fields of
ClosedWithFurtherActionDispositionStateclosed_bystring
closed_with_ignoreClosedWithIgnoreDispositionState
Fields of
ClosedWithIgnoreDispositionStateclosed_bystring
- one of
assigneesarray of string
Response: BatchUpdateDispositionResponse
eventsarray ofEvent
Fields of
Eventuuidstring
ridstring
asset_ridsarray of stringA set of asset rids associated with the event.
originsarray ofEventOriginA set of origins associated with the event.
Fields of
EventOrigin- one of 6 fields
workbookWorkbookEventOriginThis event was created in this workbook.
Fields of
WorkbookEventOriginridstring
dataarray ofWorkbookDataAssociationData visualizations to associate this event with.
Fields of
WorkbookDataAssociationtime_series_channelTimeSeriesChannelAssociation
Fields of
TimeSeriesChannelAssociationvariable_namestring
tagsmap of string to stringIf this variable is grouped, the tags within the groupings this event should associate with.
templateTemplateEventOriginThis event was created in this template.
Fields of
TemplateEventOriginridstring
apiApiEventOriginThis event was created programmatically via the API.
data_reviewDataReviewEventOriginThis event was created automatically from a checklist execution.
Fields of
DataReviewEventOrigindata_review_ridstring
check_metadataCheckOriginMetadataMetadata about the check that created this event.
Fields of
CheckOriginMetadatacheck_evaluation_ridstring
check_ridstring
check_lineage_ridstring
implementation_indexinteger
procedureProcedureEventOriginThis event was created automatically from a procedure execution.
Fields of
ProcedureEventOriginprocedure_execution_ridstring
procedure_ridstring
step_idstring
streaming_checklistStreamingChecklistEventOriginThis event was created automatically from the execution of a streaming checklist.
Fields of
StreamingChecklistEventOriginchecklist_ridstring
check_metadataStreamingCheckOriginMetadataMetadata about the check that created this event.
Fields of
StreamingCheckOriginMetadatacheck_ridstring
check_lineage_ridstring
implementation_indexinteger
timestampTimestamp
Fields of
Timestampsecondsinteger (int64)
nanosinteger (int64)
durationDuration
Fields of
Durationsecondsinteger (int64)
nanosinteger (int64)
namestring
descriptionstring
typeEventType
Values of
EventTypeEVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
labelsarray of string
propertiesmap of string to string deprecated
is_archivedboolean
created_bystringThe user who created the event. This field may be missing for legacy events.
dispositionEventDisposition
Fields of
EventDispositionpriorityPriority
Values of
PriorityPRIORITY_UNSPECIFIED
P0
P1
P2
P3
P4
stateDispositionState
Fields of
DispositionState- one of
pending_review,closed_with_further_action,closed_with_ignore
pending_reviewPendingReviewDispositionState
Fields of
PendingReviewDispositionStateopened_bystring
closed_with_further_actionClosedWithFurtherActionDispositionState
Fields of
ClosedWithFurtherActionDispositionStateclosed_bystring
closed_with_ignoreClosedWithIgnoreDispositionState
Fields of
ClosedWithIgnoreDispositionStateclosed_bystring
- one of
assigneesarray of string
typed_propertiesmap of string toTypedPropertyValue
Fields of
TypedPropertyValue- one of
string_value,numeric_value
string_valuestring
numeric_valuenumber
- one of
Request
import grpc
from nominal.protos.event.v2 import event_pb2, event_pb2_grpc
channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials())
event_service = event_pb2_grpc.EventServiceStub(channel)
auth = [("authorization", "Bearer <api key>")]
request = event_pb2.BatchUpdateDispositionRequest(
requests=[
{
"rid": "<rid>",
"disposition": {
"priority": "P0",
"state": {"pending_review": {"opened_by": "<opened by>"}},
"assignees": ["<assignees>"],
},
},
],
)
response = event_service.BatchUpdateDisposition(request, metadata=auth)
print(response)
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
eventv2 "github.com/nominal-io/nominal-api-protos-go/nominal/protos/event/v2"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
)
func main() {
conn, err := grpc.NewClient("api.gov.nominal.io:443",
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})))
if err != nil {
log.Fatal(err)
}
defer conn.Close()
eventService := eventv2.NewEventServiceClient(conn)
ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer <api key>")
request := &eventv2.BatchUpdateDispositionRequest{
Requests: []*eventv2.UpdateDispositionRequest{
{
Rid: "<rid>",
Disposition: &eventv2.EventDisposition{
Priority: eventv2.Priority_P0,
State: &eventv2.DispositionState{
DispositionState: &eventv2.DispositionState_PendingReview{PendingReview: &eventv2.PendingReviewDispositionState{
OpenedBy: "<opened by>",
}},
},
Assignees: []string{
"<assignees>",
},
},
},
},
}
response, err := eventService.BatchUpdateDisposition(ctx, request)
if err != nil {
log.Fatal(err)
}
fmt.Println(response)
}
Response
{
"events": [
{
"uuid": "<uuid>",
"rid": "<rid>",
"asset_rids": [
"<asset rids>"
],
"origins": [
{
"workbook": {
"rid": "<rid>",
"data": [
{
"time_series_channel": {
"variable_name": "<variable name>",
"tags": {
"<key>": "<value>"
}
}
}
]
}
}
],
"timestamp": {
"seconds": 1,
"nanos": 1
},
"duration": {
"seconds": 1,
"nanos": 1
},
"name": "<name>",
"description": "<description>",
"type": "INFO",
"labels": [
"<labels>"
],
"properties": {
"<key>": "<value>"
},
"is_archived": true,
"created_by": "<created by>",
"disposition": {
"priority": "P0",
"state": {
"pending_review": {
"opened_by": "<opened by>"
}
},
"assignees": [
"<assignees>"
]
},
"typed_properties": {
"<key>": {
"string_value": "<string value>"
}
}
}
]
}
Batch update event#
gRPC /nominal.event.v2.EventService/BatchUpdateEvent
Updates the fields of an event specified by each request in the batch. Empty fields are left unchanged.
Request: BatchUpdateEventRequest
updatesarray ofEventUpdate
Fields of
EventUpdateridstring
asset_ridsAssetRidSetIf provided, replaces the existing asset rids. If provided, must contain at least one asset rid.
Fields of
AssetRidSetasset_ridsarray of string
timestampTimestamp
Fields of
Timestampsecondsinteger (int64)
nanosinteger (int64)
durationDuration
Fields of
Durationsecondsinteger (int64)
nanosinteger (int64)
namestring
descriptionstring
typeEventType
Values of
EventTypeEVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
labelsLabelUpdateWrapper
Fields of
LabelUpdateWrapperlabelsarray of string
propertiesPropertyUpdateWrapperdeprecated
Fields of
PropertyUpdateWrapperpropertiesmap of string to string
typed_propertiesTypedPropertyUpdateWrapper
Fields of
TypedPropertyUpdateWrappertyped_propertiesmap of string toTypedPropertyValue
Fields of
TypedPropertyValue- one of
string_value,numeric_valuerequired
string_valuestring
numeric_valuenumber
- one of
Response: BatchUpdateEventResponse
eventsarray ofEvent
Fields of
Eventuuidstring
ridstring
asset_ridsarray of stringA set of asset rids associated with the event.
originsarray ofEventOriginA set of origins associated with the event.
Fields of
EventOrigin- one of 6 fields
workbookWorkbookEventOriginThis event was created in this workbook.
Fields of
WorkbookEventOriginridstring
dataarray ofWorkbookDataAssociationData visualizations to associate this event with.
Fields of
WorkbookDataAssociationtime_series_channelTimeSeriesChannelAssociation
Fields of
TimeSeriesChannelAssociationvariable_namestring
tagsmap of string to stringIf this variable is grouped, the tags within the groupings this event should associate with.
templateTemplateEventOriginThis event was created in this template.
Fields of
TemplateEventOriginridstring
apiApiEventOriginThis event was created programmatically via the API.
data_reviewDataReviewEventOriginThis event was created automatically from a checklist execution.
Fields of
DataReviewEventOrigindata_review_ridstring
check_metadataCheckOriginMetadataMetadata about the check that created this event.
Fields of
CheckOriginMetadatacheck_evaluation_ridstring
check_ridstring
check_lineage_ridstring
implementation_indexinteger
procedureProcedureEventOriginThis event was created automatically from a procedure execution.
Fields of
ProcedureEventOriginprocedure_execution_ridstring
procedure_ridstring
step_idstring
streaming_checklistStreamingChecklistEventOriginThis event was created automatically from the execution of a streaming checklist.
Fields of
StreamingChecklistEventOriginchecklist_ridstring
check_metadataStreamingCheckOriginMetadataMetadata about the check that created this event.
Fields of
StreamingCheckOriginMetadatacheck_ridstring
check_lineage_ridstring
implementation_indexinteger
timestampTimestamp
Fields of
Timestampsecondsinteger (int64)
nanosinteger (int64)
durationDuration
Fields of
Durationsecondsinteger (int64)
nanosinteger (int64)
namestring
descriptionstring
typeEventType
Values of
EventTypeEVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
labelsarray of string
propertiesmap of string to string deprecated
is_archivedboolean
created_bystringThe user who created the event. This field may be missing for legacy events.
dispositionEventDisposition
Fields of
EventDispositionpriorityPriority
Values of
PriorityPRIORITY_UNSPECIFIED
P0
P1
P2
P3
P4
stateDispositionState
Fields of
DispositionState- one of
pending_review,closed_with_further_action,closed_with_ignore
pending_reviewPendingReviewDispositionState
Fields of
PendingReviewDispositionStateopened_bystring
closed_with_further_actionClosedWithFurtherActionDispositionState
Fields of
ClosedWithFurtherActionDispositionStateclosed_bystring
closed_with_ignoreClosedWithIgnoreDispositionState
Fields of
ClosedWithIgnoreDispositionStateclosed_bystring
- one of
assigneesarray of string
typed_propertiesmap of string toTypedPropertyValue
Fields of
TypedPropertyValue- one of
string_value,numeric_value
string_valuestring
numeric_valuenumber
- one of
Request
import grpc
from nominal.protos.event.v2 import event_pb2, event_pb2_grpc
channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials())
event_service = event_pb2_grpc.EventServiceStub(channel)
auth = [("authorization", "Bearer <api key>")]
request = event_pb2.BatchUpdateEventRequest(
updates=[
{
"rid": "<rid>",
"asset_rids": {"asset_rids": ["<asset rids>"]},
"timestamp": {"seconds": 1, "nanos": 1},
"duration": {"seconds": 1, "nanos": 1},
"name": "<name>",
"description": "<description>",
"type": "INFO",
"labels": {"labels": ["<labels>"]},
"properties": {"properties": {"<key>": "<value>"}},
"typed_properties": {
"typed_properties": {"<key>": {"string_value": "<string value>"}},
},
},
],
)
response = event_service.BatchUpdateEvent(request, metadata=auth)
print(response)
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
eventv2 "github.com/nominal-io/nominal-api-protos-go/nominal/protos/event/v2"
"github.com/nominal-io/nominal-api-protos-go/nominal/protos/types"
typestime "github.com/nominal-io/nominal-api-protos-go/nominal/protos/types/time"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
"google.golang.org/protobuf/proto"
)
func main() {
conn, err := grpc.NewClient("api.gov.nominal.io:443",
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})))
if err != nil {
log.Fatal(err)
}
defer conn.Close()
eventService := eventv2.NewEventServiceClient(conn)
ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer <api key>")
request := &eventv2.BatchUpdateEventRequest{
Updates: []*eventv2.EventUpdate{
{
Rid: "<rid>",
AssetRids: &eventv2.AssetRidSet{
AssetRids: []string{
"<asset rids>",
},
},
Timestamp: &typestime.Timestamp{
Seconds: proto.Int64(1),
Nanos: proto.Int64(1),
},
Duration: &types.Duration{
Seconds: 1,
Nanos: 1,
},
Name: proto.String("<name>"),
Description: proto.String("<description>"),
Type: eventv2.EventType_INFO.Enum(),
Labels: &types.LabelUpdateWrapper{
Labels: []string{
"<labels>",
},
},
Properties: &types.PropertyUpdateWrapper{
Properties: map[string]string{
"<key>": "<value>",
},
},
TypedProperties: &types.TypedPropertyUpdateWrapper{
TypedProperties: map[string]*types.TypedPropertyValue{
"<key>": {
TypedPropertyValue: &types.TypedPropertyValue_StringValue{StringValue: "<string value>"},
},
},
},
},
},
}
response, err := eventService.BatchUpdateEvent(ctx, request)
if err != nil {
log.Fatal(err)
}
fmt.Println(response)
}
Response
{
"events": [
{
"uuid": "<uuid>",
"rid": "<rid>",
"asset_rids": [
"<asset rids>"
],
"origins": [
{
"workbook": {
"rid": "<rid>",
"data": [
{
"time_series_channel": {
"variable_name": "<variable name>",
"tags": {
"<key>": "<value>"
}
}
}
]
}
}
],
"timestamp": {
"seconds": 1,
"nanos": 1
},
"duration": {
"seconds": 1,
"nanos": 1
},
"name": "<name>",
"description": "<description>",
"type": "INFO",
"labels": [
"<labels>"
],
"properties": {
"<key>": "<value>"
},
"is_archived": true,
"created_by": "<created by>",
"disposition": {
"priority": "P0",
"state": {
"pending_review": {
"opened_by": "<opened by>"
}
},
"assignees": [
"<assignees>"
]
},
"typed_properties": {
"<key>": {
"string_value": "<string value>"
}
}
}
]
}
Create event#
gRPC /nominal.event.v2.EventService/CreateEvent
Creates an event.
Request: CreateEventRequest
asset_ridsarray of stringMust contain at least one asset rid.
originsarray ofEventOriginIf empty, defaults to a single API origin.
Fields of
EventOrigin- one of 6 fields
workbookWorkbookEventOriginThis event was created in this workbook.
Fields of
WorkbookEventOriginridstring
dataarray ofWorkbookDataAssociationData visualizations to associate this event with.
Fields of
WorkbookDataAssociationtime_series_channelTimeSeriesChannelAssociation
Fields of
TimeSeriesChannelAssociationvariable_namestring
tagsmap of string to stringIf this variable is grouped, the tags within the groupings this event should associate with.
templateTemplateEventOriginThis event was created in this template.
Fields of
TemplateEventOriginridstring
apiApiEventOriginThis event was created programmatically via the API.
data_reviewDataReviewEventOriginThis event was created automatically from a checklist execution.
Fields of
DataReviewEventOrigindata_review_ridstring
check_metadataCheckOriginMetadataMetadata about the check that created this event.
Fields of
CheckOriginMetadatacheck_evaluation_ridstring
check_ridstring
check_lineage_ridstring
implementation_indexinteger
procedureProcedureEventOriginThis event was created automatically from a procedure execution.
Fields of
ProcedureEventOriginprocedure_execution_ridstring
procedure_ridstring
step_idstring
streaming_checklistStreamingChecklistEventOriginThis event was created automatically from the execution of a streaming checklist.
Fields of
StreamingChecklistEventOriginchecklist_ridstring
check_metadataStreamingCheckOriginMetadataMetadata about the check that created this event.
Fields of
StreamingCheckOriginMetadatacheck_ridstring
check_lineage_ridstring
implementation_indexinteger
timestampTimestamp
Fields of
Timestampsecondsinteger (int64)
nanosinteger (int64)
durationDuration
Fields of
Durationsecondsinteger (int64)
nanosinteger (int64)
namestring
descriptionstringIf not provided, defaults to an empty string.
typeEventType
Values of
EventTypeEVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
labelsarray of string
propertiesmap of string to string deprecated
dispositionEventDisposition
Fields of
EventDispositionpriorityPriority
Values of
PriorityPRIORITY_UNSPECIFIED
P0
P1
P2
P3
P4
stateDispositionState
Fields of
DispositionState- one of
pending_review,closed_with_further_action,closed_with_ignore
pending_reviewPendingReviewDispositionState
Fields of
PendingReviewDispositionStateopened_bystring
closed_with_further_actionClosedWithFurtherActionDispositionState
Fields of
ClosedWithFurtherActionDispositionStateclosed_bystring
closed_with_ignoreClosedWithIgnoreDispositionState
Fields of
ClosedWithIgnoreDispositionStateclosed_bystring
- one of
assigneesarray of string
typed_propertiesmap of string toTypedPropertyValue
Fields of
TypedPropertyValue- one of
string_value,numeric_valuerequired
string_valuestring
numeric_valuenumber
- one of
Response: CreateEventResponse
eventEvent
Fields of
Eventuuidstring
ridstring
asset_ridsarray of stringA set of asset rids associated with the event.
originsarray ofEventOriginA set of origins associated with the event.
Fields of
EventOrigin- one of 6 fields
workbookWorkbookEventOriginThis event was created in this workbook.
Fields of
WorkbookEventOriginridstring
dataarray ofWorkbookDataAssociationData visualizations to associate this event with.
Fields of
WorkbookDataAssociationtime_series_channelTimeSeriesChannelAssociation
Fields of
TimeSeriesChannelAssociationvariable_namestring
tagsmap of string to stringIf this variable is grouped, the tags within the groupings this event should associate with.
templateTemplateEventOriginThis event was created in this template.
Fields of
TemplateEventOriginridstring
apiApiEventOriginThis event was created programmatically via the API.
data_reviewDataReviewEventOriginThis event was created automatically from a checklist execution.
Fields of
DataReviewEventOrigindata_review_ridstring
check_metadataCheckOriginMetadataMetadata about the check that created this event.
Fields of
CheckOriginMetadatacheck_evaluation_ridstring
check_ridstring
check_lineage_ridstring
implementation_indexinteger
procedureProcedureEventOriginThis event was created automatically from a procedure execution.
Fields of
ProcedureEventOriginprocedure_execution_ridstring
procedure_ridstring
step_idstring
streaming_checklistStreamingChecklistEventOriginThis event was created automatically from the execution of a streaming checklist.
Fields of
StreamingChecklistEventOriginchecklist_ridstring
check_metadataStreamingCheckOriginMetadataMetadata about the check that created this event.
Fields of
StreamingCheckOriginMetadatacheck_ridstring
check_lineage_ridstring
implementation_indexinteger
timestampTimestamp
Fields of
Timestampsecondsinteger (int64)
nanosinteger (int64)
durationDuration
Fields of
Durationsecondsinteger (int64)
nanosinteger (int64)
namestring
descriptionstring
typeEventType
Values of
EventTypeEVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
labelsarray of string
propertiesmap of string to string deprecated
is_archivedboolean
created_bystringThe user who created the event. This field may be missing for legacy events.
dispositionEventDisposition
Fields of
EventDispositionpriorityPriority
Values of
PriorityPRIORITY_UNSPECIFIED
P0
P1
P2
P3
P4
stateDispositionState
Fields of
DispositionState- one of
pending_review,closed_with_further_action,closed_with_ignore
pending_reviewPendingReviewDispositionState
Fields of
PendingReviewDispositionStateopened_bystring
closed_with_further_actionClosedWithFurtherActionDispositionState
Fields of
ClosedWithFurtherActionDispositionStateclosed_bystring
closed_with_ignoreClosedWithIgnoreDispositionState
Fields of
ClosedWithIgnoreDispositionStateclosed_bystring
- one of
assigneesarray of string
typed_propertiesmap of string toTypedPropertyValue
Fields of
TypedPropertyValue- one of
string_value,numeric_value
string_valuestring
numeric_valuenumber
- one of
Request
import grpc
from nominal.protos.event.v2 import event_pb2, event_pb2_grpc
channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials())
event_service = event_pb2_grpc.EventServiceStub(channel)
auth = [("authorization", "Bearer <api key>")]
request = event_pb2.CreateEventRequest(
asset_rids=["<asset rids>"],
origins=[
{
"workbook": {
"rid": "<rid>",
"data": [
{
"time_series_channel": {
"variable_name": "<variable name>",
"tags": {"<key>": "<value>"},
},
},
],
},
},
],
timestamp={"seconds": 1, "nanos": 1},
duration={"seconds": 1, "nanos": 1},
name="<name>",
description="<description>",
type="INFO",
labels=["<labels>"],
properties={"<key>": "<value>"},
disposition={
"priority": "P0",
"state": {"pending_review": {"opened_by": "<opened by>"}},
"assignees": ["<assignees>"],
},
typed_properties={"<key>": {"string_value": "<string value>"}},
)
response = event_service.CreateEvent(request, metadata=auth)
print(response)
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
eventv2 "github.com/nominal-io/nominal-api-protos-go/nominal/protos/event/v2"
"github.com/nominal-io/nominal-api-protos-go/nominal/protos/types"
typestime "github.com/nominal-io/nominal-api-protos-go/nominal/protos/types/time"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
"google.golang.org/protobuf/proto"
)
func main() {
conn, err := grpc.NewClient("api.gov.nominal.io:443",
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})))
if err != nil {
log.Fatal(err)
}
defer conn.Close()
eventService := eventv2.NewEventServiceClient(conn)
ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer <api key>")
request := &eventv2.CreateEventRequest{
AssetRids: []string{
"<asset rids>",
},
Origins: []*eventv2.EventOrigin{
{
EventOrigin: &eventv2.EventOrigin_Workbook{Workbook: &eventv2.WorkbookEventOrigin{
Rid: "<rid>",
Data: []*eventv2.WorkbookDataAssociation{
{
WorkbookDataAssociation: &eventv2.WorkbookDataAssociation_TimeSeriesChannel{TimeSeriesChannel: &eventv2.TimeSeriesChannelAssociation{
VariableName: "<variable name>",
Tags: map[string]string{
"<key>": "<value>",
},
}},
},
},
}},
},
},
Timestamp: &typestime.Timestamp{
Seconds: proto.Int64(1),
Nanos: proto.Int64(1),
},
Duration: &types.Duration{
Seconds: 1,
Nanos: 1,
},
Name: "<name>",
Description: proto.String("<description>"),
Type: eventv2.EventType_INFO,
Labels: []string{
"<labels>",
},
Properties: map[string]string{
"<key>": "<value>",
},
Disposition: &eventv2.EventDisposition{
Priority: eventv2.Priority_P0,
State: &eventv2.DispositionState{
DispositionState: &eventv2.DispositionState_PendingReview{PendingReview: &eventv2.PendingReviewDispositionState{
OpenedBy: "<opened by>",
}},
},
Assignees: []string{
"<assignees>",
},
},
TypedProperties: map[string]*types.TypedPropertyValue{
"<key>": {
TypedPropertyValue: &types.TypedPropertyValue_StringValue{StringValue: "<string value>"},
},
},
}
response, err := eventService.CreateEvent(ctx, request)
if err != nil {
log.Fatal(err)
}
fmt.Println(response)
}
Response
{
"event": {
"uuid": "<uuid>",
"rid": "<rid>",
"asset_rids": [
"<asset rids>"
],
"origins": [
{
"workbook": {
"rid": "<rid>",
"data": [
{
"time_series_channel": {
"variable_name": "<variable name>",
"tags": {
"<key>": "<value>"
}
}
}
]
}
}
],
"timestamp": {
"seconds": 1,
"nanos": 1
},
"duration": {
"seconds": 1,
"nanos": 1
},
"name": "<name>",
"description": "<description>",
"type": "INFO",
"labels": [
"<labels>"
],
"properties": {
"<key>": "<value>"
},
"is_archived": true,
"created_by": "<created by>",
"disposition": {
"priority": "P0",
"state": {
"pending_review": {
"opened_by": "<opened by>"
}
},
"assignees": [
"<assignees>"
]
},
"typed_properties": {
"<key>": {
"string_value": "<string value>"
}
}
}
}
Get events#
gRPC /nominal.event.v2.EventService/GetEvents
Gets a set of events by UUIDs.
Request: GetEventsRequest
uuidsarray of string
Response: GetEventsResponse
eventsarray ofEvent
Fields of
Eventuuidstring
ridstring
asset_ridsarray of stringA set of asset rids associated with the event.
originsarray ofEventOriginA set of origins associated with the event.
Fields of
EventOrigin- one of 6 fields
workbookWorkbookEventOriginThis event was created in this workbook.
Fields of
WorkbookEventOriginridstring
dataarray ofWorkbookDataAssociationData visualizations to associate this event with.
Fields of
WorkbookDataAssociationtime_series_channelTimeSeriesChannelAssociation
Fields of
TimeSeriesChannelAssociationvariable_namestring
tagsmap of string to stringIf this variable is grouped, the tags within the groupings this event should associate with.
templateTemplateEventOriginThis event was created in this template.
Fields of
TemplateEventOriginridstring
apiApiEventOriginThis event was created programmatically via the API.
data_reviewDataReviewEventOriginThis event was created automatically from a checklist execution.
Fields of
DataReviewEventOrigindata_review_ridstring
check_metadataCheckOriginMetadataMetadata about the check that created this event.
Fields of
CheckOriginMetadatacheck_evaluation_ridstring
check_ridstring
check_lineage_ridstring
implementation_indexinteger
procedureProcedureEventOriginThis event was created automatically from a procedure execution.
Fields of
ProcedureEventOriginprocedure_execution_ridstring
procedure_ridstring
step_idstring
streaming_checklistStreamingChecklistEventOriginThis event was created automatically from the execution of a streaming checklist.
Fields of
StreamingChecklistEventOriginchecklist_ridstring
check_metadataStreamingCheckOriginMetadataMetadata about the check that created this event.
Fields of
StreamingCheckOriginMetadatacheck_ridstring
check_lineage_ridstring
implementation_indexinteger
timestampTimestamp
Fields of
Timestampsecondsinteger (int64)
nanosinteger (int64)
durationDuration
Fields of
Durationsecondsinteger (int64)
nanosinteger (int64)
namestring
descriptionstring
typeEventType
Values of
EventTypeEVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
labelsarray of string
propertiesmap of string to string deprecated
is_archivedboolean
created_bystringThe user who created the event. This field may be missing for legacy events.
dispositionEventDisposition
Fields of
EventDispositionpriorityPriority
Values of
PriorityPRIORITY_UNSPECIFIED
P0
P1
P2
P3
P4
stateDispositionState
Fields of
DispositionState- one of
pending_review,closed_with_further_action,closed_with_ignore
pending_reviewPendingReviewDispositionState
Fields of
PendingReviewDispositionStateopened_bystring
closed_with_further_actionClosedWithFurtherActionDispositionState
Fields of
ClosedWithFurtherActionDispositionStateclosed_bystring
closed_with_ignoreClosedWithIgnoreDispositionState
Fields of
ClosedWithIgnoreDispositionStateclosed_bystring
- one of
assigneesarray of string
typed_propertiesmap of string toTypedPropertyValue
Fields of
TypedPropertyValue- one of
string_value,numeric_value
string_valuestring
numeric_valuenumber
- one of
Request
import grpc
from nominal.protos.event.v2 import event_pb2, event_pb2_grpc
channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials())
event_service = event_pb2_grpc.EventServiceStub(channel)
auth = [("authorization", "Bearer <api key>")]
request = event_pb2.GetEventsRequest(uuids=["<uuids>"])
response = event_service.GetEvents(request, metadata=auth)
print(response)
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
eventv2 "github.com/nominal-io/nominal-api-protos-go/nominal/protos/event/v2"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
)
func main() {
conn, err := grpc.NewClient("api.gov.nominal.io:443",
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})))
if err != nil {
log.Fatal(err)
}
defer conn.Close()
eventService := eventv2.NewEventServiceClient(conn)
ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer <api key>")
request := &eventv2.GetEventsRequest{
Uuids: []string{
"<uuids>",
},
}
response, err := eventService.GetEvents(ctx, request)
if err != nil {
log.Fatal(err)
}
fmt.Println(response)
}
Response
{
"events": [
{
"uuid": "<uuid>",
"rid": "<rid>",
"asset_rids": [
"<asset rids>"
],
"origins": [
{
"workbook": {
"rid": "<rid>",
"data": [
{
"time_series_channel": {
"variable_name": "<variable name>",
"tags": {
"<key>": "<value>"
}
}
}
]
}
}
],
"timestamp": {
"seconds": 1,
"nanos": 1
},
"duration": {
"seconds": 1,
"nanos": 1
},
"name": "<name>",
"description": "<description>",
"type": "INFO",
"labels": [
"<labels>"
],
"properties": {
"<key>": "<value>"
},
"is_archived": true,
"created_by": "<created by>",
"disposition": {
"priority": "P0",
"state": {
"pending_review": {
"opened_by": "<opened by>"
}
},
"assignees": [
"<assignees>"
]
},
"typed_properties": {
"<key>": {
"string_value": "<string value>"
}
}
}
]
}
Get events histogram#
gRPC /nominal.event.v2.EventService/GetEventsHistogram
Gets a histogram of events that match the given filters.
Request: GetEventsHistogramRequest
start_inclusiveTimestamp
Fields of
Timestampsecondsinteger (int64)
nanosinteger (int64)
end_exclusiveTimestamp
filter_queryHistogramFilterQueryThe query to filter the events included in the histogram.
Fields of
HistogramFilterQuery- one of 21 fields
search_textstring
assetstring
templatestring
workbookstring
data_reviewstring
origin_typeSearchEventOriginType
Values of
SearchEventOriginTypeSEARCH_EVENT_ORIGIN_TYPE_UNSPECIFIED
WORKBOOK
TEMPLATE
API
DATA_REVIEW
PROCEDURE
STREAMING_CHECKLIST
data_review_checkstring
disposition_statusEventDispositionStatus
Values of
EventDispositionStatusEVENT_DISPOSITION_STATUS_UNSPECIFIED
PENDING_REVIEW
CLOSED_IGNORED
CLOSED_REQUIRES_FURTHER_ACTION
NO_DISPOSITION
priorityPriority
Values of
PriorityPRIORITY_UNSPECIFIED
P0
P1
P2
P3
P4
assigneestring
event_typeEventType
Values of
EventTypeEVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
created_bystring
labelstring
propertyProperty
Fields of
Propertynamestring
valuestring
andHistogramFilterQueryList
Fields of
HistogramFilterQueryListqueriesarray ofHistogramFilterQuery
notHistogramFilterQuery
workspacestring
procedurestring
procedure_executionstring
step_idstring
archived_statusesarray ofArchivedStatusIf empty, defaults to NOT_ARCHIVED only.
Values of
ArchivedStatusARCHIVED_STATUS_UNSPECIFIED
NOT_ARCHIVED
ARCHIVED
num_binsintegerDefaults to 100. Throws if larger than 1_000.
event_limitintegerLimits the number of events included in the histogram. Defaults to 10_000. Throws if larger than 10_000.
Response: GetEventsHistogramResponse
bucketsarray ofEventsHistogramBucket
Request
import grpc
from nominal.protos.event.v2 import event_pb2, event_pb2_grpc
channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials())
event_service = event_pb2_grpc.EventServiceStub(channel)
auth = [("authorization", "Bearer <api key>")]
request = event_pb2.GetEventsHistogramRequest(
start_inclusive={"seconds": 1, "nanos": 1},
end_exclusive={"seconds": 1, "nanos": 1},
filter_query={"search_text": "<search text>"},
archived_statuses=["NOT_ARCHIVED"],
num_bins=1,
event_limit=1,
)
response = event_service.GetEventsHistogram(request, metadata=auth)
print(response)
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
eventv2 "github.com/nominal-io/nominal-api-protos-go/nominal/protos/event/v2"
"github.com/nominal-io/nominal-api-protos-go/nominal/protos/types"
typestime "github.com/nominal-io/nominal-api-protos-go/nominal/protos/types/time"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
"google.golang.org/protobuf/proto"
)
func main() {
conn, err := grpc.NewClient("api.gov.nominal.io:443",
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})))
if err != nil {
log.Fatal(err)
}
defer conn.Close()
eventService := eventv2.NewEventServiceClient(conn)
ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer <api key>")
request := &eventv2.GetEventsHistogramRequest{
StartInclusive: &typestime.Timestamp{
Seconds: proto.Int64(1),
Nanos: proto.Int64(1),
},
EndExclusive: &typestime.Timestamp{
Seconds: proto.Int64(1),
Nanos: proto.Int64(1),
},
FilterQuery: &eventv2.HistogramFilterQuery{
HistogramFilterQuery: &eventv2.HistogramFilterQuery_SearchText{SearchText: "<search text>"},
},
ArchivedStatuses: []types.ArchivedStatus{
types.ArchivedStatus_NOT_ARCHIVED,
},
NumBins: proto.Int32(1),
EventLimit: proto.Int32(1),
}
response, err := eventService.GetEventsHistogram(ctx, request)
if err != nil {
log.Fatal(err)
}
fmt.Println(response)
}
Response
{
"buckets": [
{
"start_inclusive": {
"seconds": 1,
"nanos": 1
},
"end_exclusive": {
"seconds": 1,
"nanos": 1
},
"count": 1
}
]
}
List properties and labels#
gRPC /nominal.event.v2.EventService/ListPropertiesAndLabels
Lists the properties and labels of active events in the provided workspaces.
Request: ListPropertiesAndLabelsRequest
workspace_ridsarray of stringIf empty, results come from all workspaces the user belongs to.
Response: ListPropertiesAndLabelsResponse
propertiesmap of string toPropertyValuesdeprecatedDeprecated: use the paginated SearchPropertyKeys and SearchPropertyValues methods instead. Legacy string-only property values. proto3 forbids a repeated map value, so the property values are wrapped.
Fields of
PropertyValuesvaluearray of string
labelsarray of string
Request
import grpc
from nominal.protos.event.v2 import event_pb2, event_pb2_grpc
channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials())
event_service = event_pb2_grpc.EventServiceStub(channel)
auth = [("authorization", "Bearer <api key>")]
request = event_pb2.ListPropertiesAndLabelsRequest(workspace_rids=["<workspace rids>"])
response = event_service.ListPropertiesAndLabels(request, metadata=auth)
print(response)
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
eventv2 "github.com/nominal-io/nominal-api-protos-go/nominal/protos/event/v2"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
)
func main() {
conn, err := grpc.NewClient("api.gov.nominal.io:443",
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})))
if err != nil {
log.Fatal(err)
}
defer conn.Close()
eventService := eventv2.NewEventServiceClient(conn)
ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer <api key>")
request := &eventv2.ListPropertiesAndLabelsRequest{
WorkspaceRids: []string{
"<workspace rids>",
},
}
response, err := eventService.ListPropertiesAndLabels(ctx, request)
if err != nil {
log.Fatal(err)
}
fmt.Println(response)
}
Response
{
"properties": {
"<key>": {
"value": [
"<value>"
]
}
},
"labels": [
"<labels>"
]
}
Search events#
gRPC /nominal.event.v2.EventService/SearchEvents
Searches for events that match the given filters.
Request: SearchEventsRequest
sortSortOptions
Fields of
SortOptionsis_descendingboolean
fieldSortField
Values of
SortFieldSORT_FIELD_UNSPECIFIED
START_TIME
END_TIME
DURATION
DISPOSITION_STATUS
PRIORITY
EVENT_NAME
page_sizeintegerRejects page sizes greater than 10k.
next_page_tokenstring
querySearchQuery
Fields of
SearchQuery- one of 41 fields
archivedboolean
search_textstringSearch text to perform fuzzy searching against.
exact_matchstringSearch text to perform exact matching against on the event name and description.
afterTimestampFilters to events after this timestamp, exclusive.
Fields of
Timestampsecondsinteger (int64)
nanosinteger (int64)
beforeTimestampFilters to events before this timestamp, exclusive.
advanced_time_filterEventTimeFilter
Fields of
EventTimeFiltertimestampTimestamp
timestamp_conditionEventTimeFilterCondition
Values of
EventTimeFilterConditionEVENT_TIME_FILTER_CONDITION_UNSPECIFIED
START_TIME_BEFORE_INCLUSIVE
START_TIME_BEFORE_EXCLUSIVE
START_TIME_AFTER_INCLUSIVE
START_TIME_AFTER_EXCLUSIVE
END_TIME_BEFORE_INCLUSIVE
END_TIME_BEFORE_EXCLUSIVE
END_TIME_AFTER_INCLUSIVE
END_TIME_AFTER_EXCLUSIVE
assetstring
assetsAssetsFilter
Fields of
AssetsFilteroperatorSetOperator
Values of
SetOperatorSET_OPERATOR_UNSPECIFIED
AND
OR
assetsarray of string
templatestring
workbookstring
data_reviewstring
data_reviewsDataReviewsFilter
Fields of
DataReviewsFilterdata_reviewsarray of string
origin_typeSearchEventOriginType
Values of
SearchEventOriginTypeSEARCH_EVENT_ORIGIN_TYPE_UNSPECIFIED
WORKBOOK
TEMPLATE
API
DATA_REVIEW
PROCEDURE
STREAMING_CHECKLIST
origin_typesOriginTypesFilter
Fields of
OriginTypesFilteroperatorSetOperator
origin_typesarray ofSearchEventOriginType
data_review_checkstring
data_review_checksDataReviewChecksFilter
Fields of
DataReviewChecksFilterdata_review_checksarray of string
disposition_statusEventDispositionStatus
Values of
EventDispositionStatusEVENT_DISPOSITION_STATUS_UNSPECIFIED
PENDING_REVIEW
CLOSED_IGNORED
CLOSED_REQUIRES_FURTHER_ACTION
NO_DISPOSITION
disposition_statusesEventDispositionStatusList
Fields of
EventDispositionStatusListvaluesarray ofEventDispositionStatus
priorityPriority
Values of
PriorityPRIORITY_UNSPECIFIED
P0
P1
P2
P3
P4
prioritiesPriorityList
Fields of
PriorityListvaluesarray ofPriority
assigneestring
assigneesAssigneesFilter
Fields of
AssigneesFilteroperatorSetOperator
assigneesarray of string
event_typeEventType
Values of
EventTypeEVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
event_typesEventTypeList
Fields of
EventTypeListvaluesarray ofEventType
created_bystring
created_by_any_ofUserRidList
Fields of
UserRidListvaluesarray of string
labelstring
labelsLabelsFilter
Fields of
LabelsFilteroperatorSetOperator
labelsarray of string
propertyProperty
Fields of
Propertynamestring
valuestring
propertiesPropertiesFilter
Fields of
PropertiesFilternamestring
valuesarray of string
andSearchQueryList
Fields of
SearchQueryListqueriesarray ofSearchQuery
orSearchQueryList
notSearchQuery
workspacestring
procedurestring
procedure_executionstring
step_idstring
streaming_checkliststringFilters to events created from a checklist executing in streaming.
streaming_checkstringFilters to events created from the check of a checklist executing in streaming.
numeric_propertyNumericPropertyPredicateMatches events using a numeric property comparison.
Fields of
NumericPropertyPredicatenamestring
valuenumber
operatorPropertyComparisonOperator
Values of
PropertyComparisonOperatorPROPERTY_COMPARISON_OPERATOR_UNSPECIFIED
EQ
NEQ
GT
GTE
LT
LTE
numeric_property_rangeNumericPropertyRangePredicateMatches events using an inclusive numeric property range.
Fields of
NumericPropertyRangePredicatenamestring
minnumber
maxnumber
operatorNumericPropertyRangeOperator
Values of
NumericPropertyRangeOperatorNUMERIC_PROPERTY_RANGE_OPERATOR_UNSPECIFIED
BETWEEN
NOT_BETWEEN
archived_statusesarray ofArchivedStatusIf empty, defaults to NOT_ARCHIVED only. Allows including archived events in search.
Values of
ArchivedStatusARCHIVED_STATUS_UNSPECIFIED
NOT_ARCHIVED
ARCHIVED
Response: SearchEventsResponse
resultsarray ofEvent
Fields of
Eventuuidstring
ridstring
asset_ridsarray of stringA set of asset rids associated with the event.
originsarray ofEventOriginA set of origins associated with the event.
Fields of
EventOrigin- one of 6 fields
workbookWorkbookEventOriginThis event was created in this workbook.
Fields of
WorkbookEventOriginridstring
dataarray ofWorkbookDataAssociationData visualizations to associate this event with.
Fields of
WorkbookDataAssociationtime_series_channelTimeSeriesChannelAssociation
Fields of
TimeSeriesChannelAssociationvariable_namestring
tagsmap of string to stringIf this variable is grouped, the tags within the groupings this event should associate with.
templateTemplateEventOriginThis event was created in this template.
Fields of
TemplateEventOriginridstring
apiApiEventOriginThis event was created programmatically via the API.
data_reviewDataReviewEventOriginThis event was created automatically from a checklist execution.
Fields of
DataReviewEventOrigindata_review_ridstring
check_metadataCheckOriginMetadataMetadata about the check that created this event.
Fields of
CheckOriginMetadatacheck_evaluation_ridstring
check_ridstring
check_lineage_ridstring
implementation_indexinteger
procedureProcedureEventOriginThis event was created automatically from a procedure execution.
Fields of
ProcedureEventOriginprocedure_execution_ridstring
procedure_ridstring
step_idstring
streaming_checklistStreamingChecklistEventOriginThis event was created automatically from the execution of a streaming checklist.
Fields of
StreamingChecklistEventOriginchecklist_ridstring
check_metadataStreamingCheckOriginMetadataMetadata about the check that created this event.
Fields of
StreamingCheckOriginMetadatacheck_ridstring
check_lineage_ridstring
implementation_indexinteger
timestampTimestamp
Fields of
Timestampsecondsinteger (int64)
nanosinteger (int64)
durationDuration
Fields of
Durationsecondsinteger (int64)
nanosinteger (int64)
namestring
descriptionstring
typeEventType
Values of
EventTypeEVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
labelsarray of string
propertiesmap of string to string deprecated
is_archivedboolean
created_bystringThe user who created the event. This field may be missing for legacy events.
dispositionEventDisposition
Fields of
EventDispositionpriorityPriority
Values of
PriorityPRIORITY_UNSPECIFIED
P0
P1
P2
P3
P4
stateDispositionState
Fields of
DispositionState- one of
pending_review,closed_with_further_action,closed_with_ignore
pending_reviewPendingReviewDispositionState
Fields of
PendingReviewDispositionStateopened_bystring
closed_with_further_actionClosedWithFurtherActionDispositionState
Fields of
ClosedWithFurtherActionDispositionStateclosed_bystring
closed_with_ignoreClosedWithIgnoreDispositionState
Fields of
ClosedWithIgnoreDispositionStateclosed_bystring
- one of
assigneesarray of string
typed_propertiesmap of string toTypedPropertyValue
Fields of
TypedPropertyValue- one of
string_value,numeric_value
string_valuestring
numeric_valuenumber
- one of
next_page_tokenstring
Request
import grpc
from nominal.protos.event.v2 import event_pb2, event_pb2_grpc
channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials())
event_service = event_pb2_grpc.EventServiceStub(channel)
auth = [("authorization", "Bearer <api key>")]
request = event_pb2.SearchEventsRequest(
sort={"is_descending": True, "field": "START_TIME"},
page_size=1,
next_page_token="<next page token>",
query={"archived": True},
archived_statuses=["NOT_ARCHIVED"],
)
response = event_service.SearchEvents(request, metadata=auth)
print(response)
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
eventv2 "github.com/nominal-io/nominal-api-protos-go/nominal/protos/event/v2"
"github.com/nominal-io/nominal-api-protos-go/nominal/protos/types"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
"google.golang.org/protobuf/proto"
)
func main() {
conn, err := grpc.NewClient("api.gov.nominal.io:443",
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})))
if err != nil {
log.Fatal(err)
}
defer conn.Close()
eventService := eventv2.NewEventServiceClient(conn)
ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer <api key>")
request := &eventv2.SearchEventsRequest{
Sort: &eventv2.SortOptions{
IsDescending: true,
Field: eventv2.SortField_START_TIME,
},
PageSize: 1,
NextPageToken: proto.String("<next page token>"),
Query: &eventv2.SearchQuery{
SearchQuery: &eventv2.SearchQuery_Archived{Archived: true},
},
ArchivedStatuses: []types.ArchivedStatus{
types.ArchivedStatus_NOT_ARCHIVED,
},
}
response, err := eventService.SearchEvents(ctx, request)
if err != nil {
log.Fatal(err)
}
fmt.Println(response)
}
Response
{
"results": [
{
"uuid": "<uuid>",
"rid": "<rid>",
"asset_rids": [
"<asset rids>"
],
"origins": [
{
"workbook": {
"rid": "<rid>",
"data": [
{
"time_series_channel": {
"variable_name": "<variable name>",
"tags": {
"<key>": "<value>"
}
}
}
]
}
}
],
"timestamp": {
"seconds": 1,
"nanos": 1
},
"duration": {
"seconds": 1,
"nanos": 1
},
"name": "<name>",
"description": "<description>",
"type": "INFO",
"labels": [
"<labels>"
],
"properties": {
"<key>": "<value>"
},
"is_archived": true,
"created_by": "<created by>",
"disposition": {
"priority": "P0",
"state": {
"pending_review": {
"opened_by": "<opened by>"
}
},
"assignees": [
"<assignees>"
]
},
"typed_properties": {
"<key>": {
"string_value": "<string value>"
}
}
}
],
"next_page_token": "<next page token>"
}
Update event#
gRPC /nominal.event.v2.EventService/UpdateEvent
Updates the fields of an event. Empty fields are left unchanged.
Request: UpdateEventRequest
uuidstring
ridstringThe unique identifier for the event. Required if the uuid field is not provided.
asset_ridsAssetRidSetIf provided, replaces the existing asset rids. If provided, must contain at least one asset rid.
Fields of
AssetRidSetasset_ridsarray of string
timestampTimestamp
Fields of
Timestampsecondsinteger (int64)
nanosinteger (int64)
durationDuration
Fields of
Durationsecondsinteger (int64)
nanosinteger (int64)
namestring
descriptionstring
typeEventType
Values of
EventTypeEVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
labelsLabelUpdateWrapper
Fields of
LabelUpdateWrapperlabelsarray of string
propertiesPropertyUpdateWrapperdeprecated
Fields of
PropertyUpdateWrapperpropertiesmap of string to string
typed_propertiesTypedPropertyUpdateWrapper
Fields of
TypedPropertyUpdateWrappertyped_propertiesmap of string toTypedPropertyValue
Fields of
TypedPropertyValue- one of
string_value,numeric_valuerequired
string_valuestring
numeric_valuenumber
- one of
Response: UpdateEventResponse
eventEvent
Fields of
Eventuuidstring
ridstring
asset_ridsarray of stringA set of asset rids associated with the event.
originsarray ofEventOriginA set of origins associated with the event.
Fields of
EventOrigin- one of 6 fields
workbookWorkbookEventOriginThis event was created in this workbook.
Fields of
WorkbookEventOriginridstring
dataarray ofWorkbookDataAssociationData visualizations to associate this event with.
Fields of
WorkbookDataAssociationtime_series_channelTimeSeriesChannelAssociation
Fields of
TimeSeriesChannelAssociationvariable_namestring
tagsmap of string to stringIf this variable is grouped, the tags within the groupings this event should associate with.
templateTemplateEventOriginThis event was created in this template.
Fields of
TemplateEventOriginridstring
apiApiEventOriginThis event was created programmatically via the API.
data_reviewDataReviewEventOriginThis event was created automatically from a checklist execution.
Fields of
DataReviewEventOrigindata_review_ridstring
check_metadataCheckOriginMetadataMetadata about the check that created this event.
Fields of
CheckOriginMetadatacheck_evaluation_ridstring
check_ridstring
check_lineage_ridstring
implementation_indexinteger
procedureProcedureEventOriginThis event was created automatically from a procedure execution.
Fields of
ProcedureEventOriginprocedure_execution_ridstring
procedure_ridstring
step_idstring
streaming_checklistStreamingChecklistEventOriginThis event was created automatically from the execution of a streaming checklist.
Fields of
StreamingChecklistEventOriginchecklist_ridstring
check_metadataStreamingCheckOriginMetadataMetadata about the check that created this event.
Fields of
StreamingCheckOriginMetadatacheck_ridstring
check_lineage_ridstring
implementation_indexinteger
timestampTimestamp
Fields of
Timestampsecondsinteger (int64)
nanosinteger (int64)
durationDuration
Fields of
Durationsecondsinteger (int64)
nanosinteger (int64)
namestring
descriptionstring
typeEventType
Values of
EventTypeEVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
labelsarray of string
propertiesmap of string to string deprecated
is_archivedboolean
created_bystringThe user who created the event. This field may be missing for legacy events.
dispositionEventDisposition
Fields of
EventDispositionpriorityPriority
Values of
PriorityPRIORITY_UNSPECIFIED
P0
P1
P2
P3
P4
stateDispositionState
Fields of
DispositionState- one of
pending_review,closed_with_further_action,closed_with_ignore
pending_reviewPendingReviewDispositionState
Fields of
PendingReviewDispositionStateopened_bystring
closed_with_further_actionClosedWithFurtherActionDispositionState
Fields of
ClosedWithFurtherActionDispositionStateclosed_bystring
closed_with_ignoreClosedWithIgnoreDispositionState
Fields of
ClosedWithIgnoreDispositionStateclosed_bystring
- one of
assigneesarray of string
typed_propertiesmap of string toTypedPropertyValue
Fields of
TypedPropertyValue- one of
string_value,numeric_value
string_valuestring
numeric_valuenumber
- one of
Request
import grpc
from nominal.protos.event.v2 import event_pb2, event_pb2_grpc
channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials())
event_service = event_pb2_grpc.EventServiceStub(channel)
auth = [("authorization", "Bearer <api key>")]
request = event_pb2.UpdateEventRequest(
uuid="<uuid>",
rid="<rid>",
asset_rids={"asset_rids": ["<asset rids>"]},
timestamp={"seconds": 1, "nanos": 1},
duration={"seconds": 1, "nanos": 1},
name="<name>",
description="<description>",
type="INFO",
labels={"labels": ["<labels>"]},
properties={"properties": {"<key>": "<value>"}},
typed_properties={"typed_properties": {"<key>": {"string_value": "<string value>"}}},
)
response = event_service.UpdateEvent(request, metadata=auth)
print(response)
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
eventv2 "github.com/nominal-io/nominal-api-protos-go/nominal/protos/event/v2"
"github.com/nominal-io/nominal-api-protos-go/nominal/protos/types"
typestime "github.com/nominal-io/nominal-api-protos-go/nominal/protos/types/time"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
"google.golang.org/protobuf/proto"
)
func main() {
conn, err := grpc.NewClient("api.gov.nominal.io:443",
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{})))
if err != nil {
log.Fatal(err)
}
defer conn.Close()
eventService := eventv2.NewEventServiceClient(conn)
ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer <api key>")
request := &eventv2.UpdateEventRequest{
Uuid: "<uuid>",
Rid: proto.String("<rid>"),
AssetRids: &eventv2.AssetRidSet{
AssetRids: []string{
"<asset rids>",
},
},
Timestamp: &typestime.Timestamp{
Seconds: proto.Int64(1),
Nanos: proto.Int64(1),
},
Duration: &types.Duration{
Seconds: 1,
Nanos: 1,
},
Name: proto.String("<name>"),
Description: proto.String("<description>"),
Type: eventv2.EventType_INFO.Enum(),
Labels: &types.LabelUpdateWrapper{
Labels: []string{
"<labels>",
},
},
Properties: &types.PropertyUpdateWrapper{
Properties: map[string]string{
"<key>": "<value>",
},
},
TypedProperties: &types.TypedPropertyUpdateWrapper{
TypedProperties: map[string]*types.TypedPropertyValue{
"<key>": {
TypedPropertyValue: &types.TypedPropertyValue_StringValue{StringValue: "<string value>"},
},
},
},
}
response, err := eventService.UpdateEvent(ctx, request)
if err != nil {
log.Fatal(err)
}
fmt.Println(response)
}
Response
{
"event": {
"uuid": "<uuid>",
"rid": "<rid>",
"asset_rids": [
"<asset rids>"
],
"origins": [
{
"workbook": {
"rid": "<rid>",
"data": [
{
"time_series_channel": {
"variable_name": "<variable name>",
"tags": {
"<key>": "<value>"
}
}
}
]
}
}
],
"timestamp": {
"seconds": 1,
"nanos": 1
},
"duration": {
"seconds": 1,
"nanos": 1
},
"name": "<name>",
"description": "<description>",
"type": "INFO",
"labels": [
"<labels>"
],
"properties": {
"<key>": "<value>"
},
"is_archived": true,
"created_by": "<created by>",
"disposition": {
"priority": "P0",
"state": {
"pending_review": {
"opened_by": "<opened by>"
}
},
"assignees": [
"<assignees>"
]
},
"typed_properties": {
"<key>": {
"string_value": "<string value>"
}
}
}
}
Errors#
Errors shows how these errors are sent.
Code |
Reason |
Message |
|---|---|---|
|
|
FindEventsIndexInvalid |
|
|
FindEventsQueryCountTooLarge |
|
|
InvalidEventRequest |
|
|
EventSearchQueryTooBroad |
Types#
AggregateEventsRequest#
querySearchQuery
aggregate_typesarray ofAggregateType
AggregateEventsResponse#
valuesmap of string toAggregateValueKeyed by AggregateType enum value name (proto3 forbids enum map keys).
AggregateType#
AGGREGATE_TYPE_UNSPECIFIED
TOTAL_DURATION
TOTAL_COUNT
AggregateValue#
Set at most one of the fields below.
- one of
duration,count
durationDuration
countinteger
ApiEventOrigin#
A message with no fields.
ArchivedStatus#
ARCHIVED_STATUS_UNSPECIFIED
NOT_ARCHIVED
ARCHIVED
AssetRidSet#
Optional collection presence: an absent wrapper leaves the field untouched, a present (even empty) wrapper replaces it — matching the classic REST optional<set>/optional<map> update semantics.
asset_ridsarray of string
AssetsFilter#
operatorSetOperator
assetsarray of string
AssigneesFilter#
operatorSetOperator
assigneesarray of string
CheckOriginMetadata#
check_evaluation_ridstring
check_ridstring
check_lineage_ridstring
implementation_indexinteger
ClosedWithFurtherActionDispositionState#
closed_bystring
ClosedWithIgnoreDispositionState#
closed_bystring
DataReviewChecksFilter#
data_review_checksarray of string
DataReviewEventOrigin#
data_review_ridstring
check_metadataCheckOriginMetadataMetadata about the check that created this event.
DataReviewsFilter#
data_reviewsarray of string
DispositionState#
Set at most one of the fields below.
- one of
pending_review,closed_with_further_action,closed_with_ignore
pending_reviewPendingReviewDispositionState
closed_with_further_actionClosedWithFurtherActionDispositionState
closed_with_ignoreClosedWithIgnoreDispositionState
Duration#
secondsinteger (int64)
nanosinteger (int64)
Event#
uuidstring
ridstring
asset_ridsarray of stringA set of asset rids associated with the event.
originsarray ofEventOriginA set of origins associated with the event.
timestampTimestamp
durationDuration
namestring
descriptionstring
typeEventType
labelsarray of string
propertiesmap of string to string deprecated
is_archivedboolean
created_bystringThe user who created the event. This field may be missing for legacy events.
dispositionEventDisposition
typed_propertiesmap of string toTypedPropertyValue
EventDisposition#
Describes the review status for an event.
priorityPriority
stateDispositionState
assigneesarray of string
EventDispositionStatus#
EVENT_DISPOSITION_STATUS_UNSPECIFIED
PENDING_REVIEW
CLOSED_IGNORED
CLOSED_REQUIRES_FURTHER_ACTION
NO_DISPOSITION
EventDispositionStatusList#
valuesarray ofEventDispositionStatus
EventOrigin#
Describes where an event came from.
Set at most one of the fields below.
- one of 6 fields
workbookWorkbookEventOriginThis event was created in this workbook.
templateTemplateEventOriginThis event was created in this template.
apiApiEventOriginThis event was created programmatically via the API.
data_reviewDataReviewEventOriginThis event was created automatically from a checklist execution.
procedureProcedureEventOriginThis event was created automatically from a procedure execution.
streaming_checklistStreamingChecklistEventOriginThis event was created automatically from the execution of a streaming checklist.
EventsHistogramBucket#
EventTimeFilter#
timestampTimestamp
timestamp_conditionEventTimeFilterCondition
EventTimeFilterCondition#
EVENT_TIME_FILTER_CONDITION_UNSPECIFIED
START_TIME_BEFORE_INCLUSIVE
START_TIME_BEFORE_EXCLUSIVE
START_TIME_AFTER_INCLUSIVE
START_TIME_AFTER_EXCLUSIVE
END_TIME_BEFORE_INCLUSIVE
END_TIME_BEFORE_EXCLUSIVE
END_TIME_AFTER_INCLUSIVE
END_TIME_AFTER_EXCLUSIVE
EventType#
EVENT_TYPE_UNSPECIFIED
INFO
FLAG
ERROR
SUCCESS
EventTypeList#
valuesarray ofEventType
EventUpdate#
ridstring
asset_ridsAssetRidSetIf provided, replaces the existing asset rids. If provided, must contain at least one asset rid.
timestampTimestamp
durationDuration
namestring
descriptionstring
typeEventType
labelsLabelUpdateWrapper
propertiesPropertyUpdateWrapperdeprecated
typed_propertiesTypedPropertyUpdateWrapper
FindEventsQuery#
asset_ridsarray of stringWhen non-empty, only events associated with at least one of these assets match. When empty, events match on the time window alone.
start_inclusiveTimestampHalf-open window [start_inclusive, end_exclusive) over event start times. An absent bound leaves that side of the window open.
end_exclusiveTimestamp
indexintegerZero-based rank of the event to return after applying the request sort and permission filtering. Must be non-negative. When permission filtering hides events within the first index matches, the result may be absent even though later matches exist.
FindEventsResult#
eventEventAbsent when no event matches the query at the requested index.
HistogramFilterQuery#
Set at most one of the fields below.
- one of 21 fields
search_textstring
assetstring
templatestring
workbookstring
data_reviewstring
origin_typeSearchEventOriginType
data_review_checkstring
disposition_statusEventDispositionStatus
priorityPriority
assigneestring
event_typeEventType
created_bystring
labelstring
propertyProperty
notHistogramFilterQuery
workspacestring
procedurestring
procedure_executionstring
step_idstring
HistogramFilterQueryList#
queriesarray ofHistogramFilterQuery
LabelsFilter#
operatorSetOperator
labelsarray of string
LabelUpdateWrapper#
Wrapper classes to allow for optional fields on update requests
labelsarray of string
NumericPropertyPredicate#
Matches resources that have a numeric value for the named property and whose value satisfies the operator. NEQ excludes resources that lack the property or store a string value under the same name.
namestring
valuenumber
operatorPropertyComparisonOperator
NumericPropertyRangeOperator#
NUMERIC_PROPERTY_RANGE_OPERATOR_UNSPECIFIED
BETWEEN
NOT_BETWEEN
NumericPropertyRangePredicate#
Inclusive range on a numeric property. At least one bound is required. BETWEEN: min <= x <= max. An absent bound is unbounded on that side. NOT_BETWEEN: x < min OR x > max. An absent bound drops that side. Both operators require a numeric value for name. Missing properties and string values never match. Bounds are closed [min, max] to match the number chip (is between / is not between), not half-open.
namestring
minnumber
maxnumber
operatorNumericPropertyRangeOperator
OriginTypesFilter#
operatorSetOperator
origin_typesarray ofSearchEventOriginType
PendingReviewDispositionState#
opened_bystring
Priority#
PRIORITY_UNSPECIFIED
P0
P1
P2
P3
P4
PriorityList#
valuesarray ofPriority
ProcedureEventOrigin#
procedure_execution_ridstring
procedure_ridstring
step_idstring
PropertiesFilter#
namestring
valuesarray of string
Property#
namestring
valuestring
PropertyComparisonOperator#
PROPERTY_COMPARISON_OPERATOR_UNSPECIFIED
EQ
NEQ
GT
GTE
LT
LTE
PropertyUpdateWrapper#
propertiesmap of string to string
PropertyValues#
valuearray of string
SearchEventOriginType#
SEARCH_EVENT_ORIGIN_TYPE_UNSPECIFIED
WORKBOOK
TEMPLATE
API
DATA_REVIEW
PROCEDURE
STREAMING_CHECKLIST
SearchQuery#
Set at most one of the fields below.
- one of 41 fields
archivedboolean
search_textstringSearch text to perform fuzzy searching against.
exact_matchstringSearch text to perform exact matching against on the event name and description.
afterTimestampFilters to events after this timestamp, exclusive.
beforeTimestampFilters to events before this timestamp, exclusive.
advanced_time_filterEventTimeFilter
assetstring
assetsAssetsFilter
templatestring
workbookstring
data_reviewstring
data_reviewsDataReviewsFilter
origin_typeSearchEventOriginType
origin_typesOriginTypesFilter
data_review_checkstring
data_review_checksDataReviewChecksFilter
disposition_statusEventDispositionStatus
disposition_statusesEventDispositionStatusList
priorityPriority
prioritiesPriorityList
assigneestring
assigneesAssigneesFilter
event_typeEventType
event_typesEventTypeList
created_bystring
created_by_any_ofUserRidList
labelstring
labelsLabelsFilter
propertyProperty
propertiesPropertiesFilter
andSearchQueryList
orSearchQueryList
notSearchQuery
workspacestring
procedurestring
procedure_executionstring
step_idstring
streaming_checkliststringFilters to events created from a checklist executing in streaming.
streaming_checkstringFilters to events created from the check of a checklist executing in streaming.
numeric_propertyNumericPropertyPredicateMatches events using a numeric property comparison.
numeric_property_rangeNumericPropertyRangePredicateMatches events using an inclusive numeric property range.
SearchQueryList#
Repeated-value arms of the SearchQuery / HistogramFilterQuery oneofs are message-wrapped: proto3 oneof arms cannot be repeated directly.
queriesarray ofSearchQuery
SetOperator#
SET_OPERATOR_UNSPECIFIED
AND
OR
SortField#
SORT_FIELD_UNSPECIFIED
START_TIME
END_TIME
DURATION
DISPOSITION_STATUS
PRIORITY
EVENT_NAME
SortOptions#
is_descendingboolean
fieldSortField
StreamingChecklistEventOrigin#
checklist_ridstring
check_metadataStreamingCheckOriginMetadataMetadata about the check that created this event.
StreamingCheckOriginMetadata#
check_ridstring
check_lineage_ridstring
implementation_indexinteger
TemplateEventOrigin#
ridstring
TimeSeriesChannelAssociation#
A singular time series to associate the event with.
variable_namestring
tagsmap of string to stringIf this variable is grouped, the tags within the groupings this event should associate with.
Timestamp#
Deprecated for new APIs. Use google.protobuf.Timestamp for absolute instants.
This legacy nanosecond-precision timestamp is represented by an epoch time in seconds and a nanosecond offset. The nanosecond offset is from the start of the epoch second, so must be less than 1 billion.
secondsinteger (int64)
nanosinteger (int64)
TypedPropertyUpdateWrapper#
typed_propertiesmap of string toTypedPropertyValue
TypedPropertyValue#
Set exactly one of the fields below.
- one of
string_value,numeric_valuerequired
string_valuestring
numeric_valuenumber
UpdateDispositionRequest#
ridstring
dispositionEventDispositionThe new disposition for the event. If empty, removes the disposition from the event.
UserRidList#
valuesarray of string
WorkbookDataAssociation#
time_series_channelTimeSeriesChannelAssociation
WorkbookEventOrigin#
ridstring
dataarray ofWorkbookDataAssociationData visualizations to associate this event with.
Page design based on Scalar, MIT License.