{
  "swagger": "2.0",
  "info": {
    "title": "Event service",
    "version": "0.1507.0",
    "description": "Send your API key as a bearer token: `Authorization: Bearer <api key>`."
  },
  "tags": [
    {
      "name": "EventService",
      "x-displayName": "Event service",
      "description": "An Event is an annotated moment or time range. The Event Service is responsible for creating and retrieving events for a particular data source.",
      "x-errors": [
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "NominalEventV2:EventErrorInvalidEventRequest",
          "message": "InvalidEventRequest"
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "NominalEventV2:EventErrorFindEventsQueryCountTooLarge",
          "message": "FindEventsQueryCountTooLarge"
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "NominalEventV2:EventErrorFindEventsIndexInvalid",
          "message": "FindEventsIndexInvalid"
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "NominalEventV2:EventErrorSearchQueryTooBroad",
          "message": "EventSearchQueryTooBroad"
        }
      ]
    }
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/event/v2/events": {
      "post": {
        "operationId": "EventService_CreateEvent",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/CreateEventResponse"
            },
            "x-example": {
              "event": {
                "uuid": "<uuid>",
                "rid": "<rid>",
                "assetRids": [
                  "<asset rids>"
                ],
                "origins": [
                  {
                    "workbook": {
                      "rid": "<rid>",
                      "data": [
                        {
                          "timeSeriesChannel": {
                            "variableName": "<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>"
                },
                "isArchived": true,
                "createdBy": "<created by>",
                "disposition": {
                  "priority": "P0",
                  "state": {
                    "pendingReview": {
                      "openedBy": "<opened by>"
                    }
                  },
                  "assignees": [
                    "<assignees>"
                  ]
                },
                "typedProperties": {
                  "<key>": {
                    "stringValue": "<string value>"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateEventRequest"
            },
            "x-example": {
              "assetRids": [
                "<asset rids>"
              ],
              "origins": [
                {
                  "workbook": {
                    "rid": "<rid>",
                    "data": [
                      {
                        "timeSeriesChannel": {
                          "variableName": "<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": {
                  "pendingReview": {
                    "openedBy": "<opened by>"
                  }
                },
                "assignees": [
                  "<assignees>"
                ]
              },
              "typedProperties": {
                "<key>": {
                  "stringValue": "<string value>"
                }
              }
            }
          }
        ],
        "tags": [
          "EventService"
        ],
        "summary": "Create event",
        "description": "Creates an event."
      }
    },
    "/event/v2/events/aggregate": {
      "post": {
        "operationId": "EventService_AggregateEvents",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/AggregateEventsResponse"
            },
            "x-example": {
              "values": {
                "<key>": {
                  "duration": {
                    "seconds": "1",
                    "nanos": "1"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/AggregateEventsRequest"
            },
            "x-example": {
              "query": {
                "archived": true
              },
              "aggregateTypes": [
                "TOTAL_DURATION"
              ]
            }
          }
        ],
        "tags": [
          "EventService"
        ],
        "summary": "Aggregate events",
        "description": "Searches for events matching the given filter and aggregates them based on the requested functions."
      }
    },
    "/event/v2/events/archive": {
      "post": {
        "operationId": "EventService_ArchiveEvent",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ArchiveEventResponse"
            },
            "x-example": {}
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ArchiveEventRequest"
            },
            "x-example": {
              "uuid": "<uuid>"
            }
          }
        ],
        "tags": [
          "EventService"
        ],
        "summary": "Archive event",
        "description": "Archives an event."
      }
    },
    "/event/v2/events/batch-aggregate": {
      "post": {
        "operationId": "EventService_BatchAggregateEvents",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/BatchAggregateEventsResponse"
            },
            "x-example": {
              "responses": [
                {
                  "values": {
                    "<key>": {
                      "duration": {
                        "seconds": "1",
                        "nanos": "1"
                      }
                    }
                  }
                }
              ]
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BatchAggregateEventsRequest"
            },
            "x-example": {
              "requests": [
                {
                  "query": {
                    "archived": true
                  },
                  "aggregateTypes": [
                    "TOTAL_DURATION"
                  ]
                }
              ]
            }
          }
        ],
        "tags": [
          "EventService"
        ],
        "summary": "Batch aggregate events",
        "description": "Aggregates each batched request and returns responses in the same order."
      }
    },
    "/event/v2/events/batch-archive": {
      "post": {
        "operationId": "EventService_BatchArchiveEvent",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/BatchArchiveEventResponse"
            },
            "x-example": {}
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BatchArchiveEventRequest"
            },
            "x-example": {
              "eventRids": [
                "<event rids>"
              ]
            }
          }
        ],
        "tags": [
          "EventService"
        ],
        "summary": "Batch archive event",
        "description": "Archives a set of events."
      }
    },
    "/event/v2/events/batch-filter-get": {
      "post": {
        "operationId": "EventService_BatchFilterEvents",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/BatchFilterEventsResponse"
            },
            "x-example": {
              "events": [
                {
                  "uuid": "<uuid>",
                  "rid": "<rid>",
                  "assetRids": [
                    "<asset rids>"
                  ],
                  "origins": [
                    {
                      "workbook": {
                        "rid": "<rid>",
                        "data": [
                          {
                            "timeSeriesChannel": {
                              "variableName": "<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>"
                  },
                  "isArchived": true,
                  "createdBy": "<created by>",
                  "disposition": {
                    "priority": "P0",
                    "state": {
                      "pendingReview": {
                        "openedBy": "<opened by>"
                      }
                    },
                    "assignees": [
                      "<assignees>"
                    ]
                  },
                  "typedProperties": {
                    "<key>": {
                      "stringValue": "<string value>"
                    }
                  }
                }
              ]
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BatchFilterEventsRequest"
            },
            "x-example": {
              "eventRids": [
                "<event rids>"
              ],
              "filterQuery": {
                "archived": true
              }
            }
          }
        ],
        "tags": [
          "EventService"
        ],
        "summary": "Batch filter events",
        "description": "Gets a filtered set of events by RID and search filters."
      }
    },
    "/event/v2/events/batch-find": {
      "post": {
        "description": "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.\n\nBest-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.",
        "operationId": "EventService_BatchFindEvents",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/BatchFindEventsResponse"
            },
            "x-example": {
              "results": [
                {
                  "event": {
                    "uuid": "<uuid>",
                    "rid": "<rid>",
                    "assetRids": [
                      "<asset rids>"
                    ],
                    "origins": [
                      {
                        "workbook": {
                          "rid": "<rid>",
                          "data": [
                            {
                              "timeSeriesChannel": {
                                "variableName": "<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>"
                    },
                    "isArchived": true,
                    "createdBy": "<created by>",
                    "disposition": {
                      "priority": "P0",
                      "state": {
                        "pendingReview": {
                          "openedBy": "<opened by>"
                        }
                      },
                      "assignees": [
                        "<assignees>"
                      ]
                    },
                    "typedProperties": {
                      "<key>": {
                        "stringValue": "<string value>"
                      }
                    }
                  }
                }
              ]
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BatchFindEventsRequest"
            },
            "x-example": {
              "query": {
                "archived": true
              },
              "sort": {
                "isDescending": true,
                "field": "START_TIME"
              },
              "queries": [
                {
                  "assetRids": [
                    "<asset rids>"
                  ],
                  "startInclusive": {
                    "seconds": "1",
                    "nanos": "1"
                  },
                  "endExclusive": {
                    "seconds": "1",
                    "nanos": "1"
                  },
                  "index": 1
                }
              ]
            }
          }
        ],
        "tags": [
          "EventService"
        ],
        "summary": "Batch find events"
      }
    },
    "/event/v2/events/batch-get": {
      "post": {
        "operationId": "EventService_BatchGetEvents",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/BatchGetEventsResponse"
            },
            "x-example": {
              "events": [
                {
                  "uuid": "<uuid>",
                  "rid": "<rid>",
                  "assetRids": [
                    "<asset rids>"
                  ],
                  "origins": [
                    {
                      "workbook": {
                        "rid": "<rid>",
                        "data": [
                          {
                            "timeSeriesChannel": {
                              "variableName": "<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>"
                  },
                  "isArchived": true,
                  "createdBy": "<created by>",
                  "disposition": {
                    "priority": "P0",
                    "state": {
                      "pendingReview": {
                        "openedBy": "<opened by>"
                      }
                    },
                    "assignees": [
                      "<assignees>"
                    ]
                  },
                  "typedProperties": {
                    "<key>": {
                      "stringValue": "<string value>"
                    }
                  }
                }
              ]
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BatchGetEventsRequest"
            },
            "x-example": {
              "eventRids": [
                "<event rids>"
              ]
            }
          }
        ],
        "tags": [
          "EventService"
        ],
        "summary": "Batch get events",
        "description": "Gets a set of events by RID."
      }
    },
    "/event/v2/events/batch-unarchive": {
      "post": {
        "operationId": "EventService_BatchUnarchiveEvent",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/BatchUnarchiveEventResponse"
            },
            "x-example": {}
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BatchUnarchiveEventRequest"
            },
            "x-example": {
              "eventRids": [
                "<event rids>"
              ]
            }
          }
        ],
        "tags": [
          "EventService"
        ],
        "summary": "Batch unarchive event",
        "description": "Unarchives a set of events."
      }
    },
    "/event/v2/events/batch-update": {
      "post": {
        "operationId": "EventService_BatchUpdateEvent",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/BatchUpdateEventResponse"
            },
            "x-example": {
              "events": [
                {
                  "uuid": "<uuid>",
                  "rid": "<rid>",
                  "assetRids": [
                    "<asset rids>"
                  ],
                  "origins": [
                    {
                      "workbook": {
                        "rid": "<rid>",
                        "data": [
                          {
                            "timeSeriesChannel": {
                              "variableName": "<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>"
                  },
                  "isArchived": true,
                  "createdBy": "<created by>",
                  "disposition": {
                    "priority": "P0",
                    "state": {
                      "pendingReview": {
                        "openedBy": "<opened by>"
                      }
                    },
                    "assignees": [
                      "<assignees>"
                    ]
                  },
                  "typedProperties": {
                    "<key>": {
                      "stringValue": "<string value>"
                    }
                  }
                }
              ]
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BatchUpdateEventRequest"
            },
            "x-example": {
              "updates": [
                {
                  "rid": "<rid>",
                  "assetRids": {
                    "assetRids": [
                      "<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>"
                    }
                  },
                  "typedProperties": {
                    "typedProperties": {
                      "<key>": {
                        "stringValue": "<string value>"
                      }
                    }
                  }
                }
              ]
            }
          }
        ],
        "tags": [
          "EventService"
        ],
        "summary": "Batch update event",
        "description": "Updates the fields of an event specified by each request in the batch. Empty fields are left unchanged."
      }
    },
    "/event/v2/events/batch-update-disposition": {
      "post": {
        "operationId": "EventService_BatchUpdateDisposition",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/BatchUpdateDispositionResponse"
            },
            "x-example": {
              "events": [
                {
                  "uuid": "<uuid>",
                  "rid": "<rid>",
                  "assetRids": [
                    "<asset rids>"
                  ],
                  "origins": [
                    {
                      "workbook": {
                        "rid": "<rid>",
                        "data": [
                          {
                            "timeSeriesChannel": {
                              "variableName": "<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>"
                  },
                  "isArchived": true,
                  "createdBy": "<created by>",
                  "disposition": {
                    "priority": "P0",
                    "state": {
                      "pendingReview": {
                        "openedBy": "<opened by>"
                      }
                    },
                    "assignees": [
                      "<assignees>"
                    ]
                  },
                  "typedProperties": {
                    "<key>": {
                      "stringValue": "<string value>"
                    }
                  }
                }
              ]
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BatchUpdateDispositionRequest"
            },
            "x-example": {
              "requests": [
                {
                  "rid": "<rid>",
                  "disposition": {
                    "priority": "P0",
                    "state": {
                      "pendingReview": {
                        "openedBy": "<opened by>"
                      }
                    },
                    "assignees": [
                      "<assignees>"
                    ]
                  }
                }
              ]
            }
          }
        ],
        "tags": [
          "EventService"
        ],
        "summary": "Batch update disposition",
        "description": "Updates the disposition of a set of events."
      }
    },
    "/event/v2/events/get-by-uuids": {
      "post": {
        "operationId": "EventService_GetEvents",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/GetEventsResponse"
            },
            "x-example": {
              "events": [
                {
                  "uuid": "<uuid>",
                  "rid": "<rid>",
                  "assetRids": [
                    "<asset rids>"
                  ],
                  "origins": [
                    {
                      "workbook": {
                        "rid": "<rid>",
                        "data": [
                          {
                            "timeSeriesChannel": {
                              "variableName": "<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>"
                  },
                  "isArchived": true,
                  "createdBy": "<created by>",
                  "disposition": {
                    "priority": "P0",
                    "state": {
                      "pendingReview": {
                        "openedBy": "<opened by>"
                      }
                    },
                    "assignees": [
                      "<assignees>"
                    ]
                  },
                  "typedProperties": {
                    "<key>": {
                      "stringValue": "<string value>"
                    }
                  }
                }
              ]
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/GetEventsRequest"
            },
            "x-example": {
              "uuids": [
                "<uuids>"
              ]
            }
          }
        ],
        "tags": [
          "EventService"
        ],
        "summary": "Get events",
        "description": "Gets a set of events by UUIDs."
      }
    },
    "/event/v2/events/histogram": {
      "post": {
        "operationId": "EventService_GetEventsHistogram",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/GetEventsHistogramResponse"
            },
            "x-example": {
              "buckets": [
                {
                  "startInclusive": {
                    "seconds": "1",
                    "nanos": "1"
                  },
                  "endExclusive": {
                    "seconds": "1",
                    "nanos": "1"
                  },
                  "count": 1
                }
              ]
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/GetEventsHistogramRequest"
            },
            "x-example": {
              "startInclusive": {
                "seconds": "1",
                "nanos": "1"
              },
              "endExclusive": {
                "seconds": "1",
                "nanos": "1"
              },
              "filterQuery": {
                "searchText": "<search text>"
              },
              "archivedStatuses": [
                "NOT_ARCHIVED"
              ],
              "numBins": 1,
              "eventLimit": 1
            }
          }
        ],
        "tags": [
          "EventService"
        ],
        "summary": "Get events histogram",
        "description": "Gets a histogram of events that match the given filters."
      }
    },
    "/event/v2/events/search": {
      "post": {
        "operationId": "EventService_SearchEvents",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/SearchEventsResponse"
            },
            "x-example": {
              "results": [
                {
                  "uuid": "<uuid>",
                  "rid": "<rid>",
                  "assetRids": [
                    "<asset rids>"
                  ],
                  "origins": [
                    {
                      "workbook": {
                        "rid": "<rid>",
                        "data": [
                          {
                            "timeSeriesChannel": {
                              "variableName": "<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>"
                  },
                  "isArchived": true,
                  "createdBy": "<created by>",
                  "disposition": {
                    "priority": "P0",
                    "state": {
                      "pendingReview": {
                        "openedBy": "<opened by>"
                      }
                    },
                    "assignees": [
                      "<assignees>"
                    ]
                  },
                  "typedProperties": {
                    "<key>": {
                      "stringValue": "<string value>"
                    }
                  }
                }
              ],
              "nextPageToken": "<next page token>"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SearchEventsRequest"
            },
            "x-example": {
              "sort": {
                "isDescending": true,
                "field": "START_TIME"
              },
              "pageSize": 1,
              "nextPageToken": "<next page token>",
              "query": {
                "archived": true
              },
              "archivedStatuses": [
                "NOT_ARCHIVED"
              ]
            }
          }
        ],
        "tags": [
          "EventService"
        ],
        "summary": "Search events",
        "description": "Searches for events that match the given filters."
      }
    },
    "/event/v2/events/update": {
      "post": {
        "operationId": "EventService_UpdateEvent",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/UpdateEventResponse"
            },
            "x-example": {
              "event": {
                "uuid": "<uuid>",
                "rid": "<rid>",
                "assetRids": [
                  "<asset rids>"
                ],
                "origins": [
                  {
                    "workbook": {
                      "rid": "<rid>",
                      "data": [
                        {
                          "timeSeriesChannel": {
                            "variableName": "<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>"
                },
                "isArchived": true,
                "createdBy": "<created by>",
                "disposition": {
                  "priority": "P0",
                  "state": {
                    "pendingReview": {
                      "openedBy": "<opened by>"
                    }
                  },
                  "assignees": [
                    "<assignees>"
                  ]
                },
                "typedProperties": {
                  "<key>": {
                    "stringValue": "<string value>"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateEventRequest"
            },
            "x-example": {
              "uuid": "<uuid>",
              "rid": "<rid>",
              "assetRids": {
                "assetRids": [
                  "<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>"
                }
              },
              "typedProperties": {
                "typedProperties": {
                  "<key>": {
                    "stringValue": "<string value>"
                  }
                }
              }
            }
          }
        ],
        "tags": [
          "EventService"
        ],
        "summary": "Update event",
        "description": "Updates the fields of an event. Empty fields are left unchanged."
      }
    },
    "/event/v2/list-properties-labels": {
      "post": {
        "operationId": "EventService_ListPropertiesAndLabels",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ListPropertiesAndLabelsResponse"
            },
            "x-example": {
              "properties": {
                "<key>": {
                  "value": [
                    "<value>"
                  ]
                }
              },
              "labels": [
                "<labels>"
              ]
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ListPropertiesAndLabelsRequest"
            },
            "x-example": {
              "workspaceRids": [
                "<workspace rids>"
              ]
            }
          }
        ],
        "tags": [
          "EventService"
        ],
        "summary": "List properties and labels",
        "description": "Lists the properties and labels of active events in the provided workspaces."
      }
    }
  },
  "definitions": {
    "AggregateEventsRequest": {
      "type": "object",
      "properties": {
        "query": {
          "$ref": "#/definitions/SearchQuery"
        },
        "aggregateTypes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AggregateType"
          }
        }
      },
      "example": {
        "query": {
          "archived": true
        },
        "aggregateTypes": [
          "TOTAL_DURATION"
        ]
      }
    },
    "AggregateEventsResponse": {
      "type": "object",
      "properties": {
        "values": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/AggregateValue"
          },
          "description": "Keyed by AggregateType enum value name (proto3 forbids enum map keys)."
        }
      }
    },
    "AggregateType": {
      "type": "string",
      "enum": [
        "AGGREGATE_TYPE_UNSPECIFIED",
        "TOTAL_DURATION",
        "TOTAL_COUNT"
      ],
      "default": "AGGREGATE_TYPE_UNSPECIFIED",
      "example": "TOTAL_DURATION"
    },
    "AggregateValue": {
      "type": "object",
      "properties": {
        "duration": {
          "$ref": "#/definitions/Duration"
        },
        "count": {
          "type": "integer",
          "format": "int32"
        }
      },
      "x-oneofs": [
        {
          "fields": [
            "duration",
            "count"
          ],
          "required": false
        }
      ],
      "description": "Set at most one of the fields below.",
      "example": {
        "duration": {
          "seconds": "1",
          "nanos": "1"
        }
      }
    },
    "ApiEventOrigin": {
      "type": "object"
    },
    "ArchiveEventRequest": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string"
        }
      },
      "example": {
        "uuid": "<uuid>"
      }
    },
    "ArchiveEventResponse": {
      "type": "object"
    },
    "AssetRidSet": {
      "type": "object",
      "properties": {
        "assetRids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "description": "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."
    },
    "AssetsFilter": {
      "type": "object",
      "properties": {
        "operator": {
          "$ref": "#/definitions/SetOperator"
        },
        "assets": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "AssigneesFilter": {
      "type": "object",
      "properties": {
        "operator": {
          "$ref": "#/definitions/SetOperator"
        },
        "assignees": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "BatchAggregateEventsRequest": {
      "type": "object",
      "properties": {
        "requests": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/AggregateEventsRequest"
          }
        }
      },
      "example": {
        "requests": [
          {
            "query": {
              "archived": true
            },
            "aggregateTypes": [
              "TOTAL_DURATION"
            ]
          }
        ]
      }
    },
    "BatchAggregateEventsResponse": {
      "type": "object",
      "properties": {
        "responses": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/AggregateEventsResponse"
          }
        }
      }
    },
    "BatchArchiveEventRequest": {
      "type": "object",
      "properties": {
        "eventRids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "example": {
        "eventRids": [
          "<event rids>"
        ]
      }
    },
    "BatchArchiveEventResponse": {
      "type": "object"
    },
    "BatchFilterEventsRequest": {
      "type": "object",
      "properties": {
        "eventRids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "filterQuery": {
          "$ref": "#/definitions/SearchQuery"
        }
      },
      "example": {
        "eventRids": [
          "<event rids>"
        ],
        "filterQuery": {
          "archived": true
        }
      }
    },
    "BatchFilterEventsResponse": {
      "type": "object",
      "properties": {
        "events": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/Event"
          }
        }
      }
    },
    "BatchFindEventsRequest": {
      "type": "object",
      "properties": {
        "query": {
          "$ref": "#/definitions/SearchQuery",
          "description": "The base query every batched find matches against, combined with each query's asset and window constraints."
        },
        "sort": {
          "$ref": "#/definitions/SortOptions"
        },
        "queries": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/FindEventsQuery"
          },
          "description": "Rejects batches with more than 1k queries."
        }
      },
      "example": {
        "query": {
          "archived": true
        },
        "sort": {
          "isDescending": true,
          "field": "START_TIME"
        },
        "queries": [
          {
            "assetRids": [
              "<asset rids>"
            ],
            "startInclusive": {
              "seconds": "1",
              "nanos": "1"
            },
            "endExclusive": {
              "seconds": "1",
              "nanos": "1"
            },
            "index": 1
          }
        ]
      }
    },
    "BatchFindEventsResponse": {
      "type": "object",
      "properties": {
        "results": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/FindEventsResult"
          },
          "description": "One result per request query, in the same order."
        }
      }
    },
    "BatchGetEventsRequest": {
      "type": "object",
      "properties": {
        "eventRids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "example": {
        "eventRids": [
          "<event rids>"
        ]
      }
    },
    "BatchGetEventsResponse": {
      "type": "object",
      "properties": {
        "events": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/Event"
          }
        }
      }
    },
    "BatchUnarchiveEventRequest": {
      "type": "object",
      "properties": {
        "eventRids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "example": {
        "eventRids": [
          "<event rids>"
        ]
      }
    },
    "BatchUnarchiveEventResponse": {
      "type": "object"
    },
    "BatchUpdateDispositionRequest": {
      "type": "object",
      "properties": {
        "requests": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/UpdateDispositionRequest"
          }
        }
      },
      "example": {
        "requests": [
          {
            "rid": "<rid>",
            "disposition": {
              "priority": "P0",
              "state": {
                "pendingReview": {
                  "openedBy": "<opened by>"
                }
              },
              "assignees": [
                "<assignees>"
              ]
            }
          }
        ]
      }
    },
    "BatchUpdateDispositionResponse": {
      "type": "object",
      "properties": {
        "events": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/Event"
          }
        }
      }
    },
    "BatchUpdateEventRequest": {
      "type": "object",
      "properties": {
        "updates": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/EventUpdate"
          }
        }
      },
      "example": {
        "updates": [
          {
            "rid": "<rid>",
            "assetRids": {
              "assetRids": [
                "<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>"
              }
            },
            "typedProperties": {
              "typedProperties": {
                "<key>": {
                  "stringValue": "<string value>"
                }
              }
            }
          }
        ]
      }
    },
    "BatchUpdateEventResponse": {
      "type": "object",
      "properties": {
        "events": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/Event"
          }
        }
      }
    },
    "CheckOriginMetadata": {
      "type": "object",
      "properties": {
        "checkEvaluationRid": {
          "type": "string"
        },
        "checkRid": {
          "type": "string"
        },
        "checkLineageRid": {
          "type": "string"
        },
        "implementationIndex": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "ClosedWithFurtherActionDispositionState": {
      "type": "object",
      "properties": {
        "closedBy": {
          "type": "string"
        }
      }
    },
    "ClosedWithIgnoreDispositionState": {
      "type": "object",
      "properties": {
        "closedBy": {
          "type": "string"
        }
      }
    },
    "CreateEventRequest": {
      "type": "object",
      "properties": {
        "assetRids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Must contain at least one asset rid."
        },
        "origins": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/EventOrigin"
          },
          "description": "If empty, defaults to a single API origin."
        },
        "timestamp": {
          "$ref": "#/definitions/Timestamp"
        },
        "duration": {
          "$ref": "#/definitions/Duration"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string",
          "description": "If not provided, defaults to an empty string."
        },
        "type": {
          "$ref": "#/definitions/EventType"
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "x-deprecated": true
        },
        "disposition": {
          "$ref": "#/definitions/EventDisposition"
        },
        "typedProperties": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/TypedPropertyValue"
          }
        }
      },
      "example": {
        "assetRids": [
          "<asset rids>"
        ],
        "origins": [
          {
            "workbook": {
              "rid": "<rid>",
              "data": [
                {
                  "timeSeriesChannel": {
                    "variableName": "<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": {
            "pendingReview": {
              "openedBy": "<opened by>"
            }
          },
          "assignees": [
            "<assignees>"
          ]
        },
        "typedProperties": {
          "<key>": {
            "stringValue": "<string value>"
          }
        }
      }
    },
    "CreateEventResponse": {
      "type": "object",
      "properties": {
        "event": {
          "$ref": "#/definitions/Event"
        }
      }
    },
    "DataReviewChecksFilter": {
      "type": "object",
      "properties": {
        "dataReviewChecks": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "DataReviewEventOrigin": {
      "type": "object",
      "properties": {
        "dataReviewRid": {
          "type": "string"
        },
        "checkMetadata": {
          "$ref": "#/definitions/CheckOriginMetadata",
          "description": "Metadata about the check that created this event."
        }
      }
    },
    "DataReviewsFilter": {
      "type": "object",
      "properties": {
        "dataReviews": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "DispositionState": {
      "type": "object",
      "properties": {
        "pendingReview": {
          "$ref": "#/definitions/PendingReviewDispositionState"
        },
        "closedWithFurtherAction": {
          "$ref": "#/definitions/ClosedWithFurtherActionDispositionState"
        },
        "closedWithIgnore": {
          "$ref": "#/definitions/ClosedWithIgnoreDispositionState"
        }
      },
      "description": "Set at most one of the fields below.",
      "x-oneofs": [
        {
          "fields": [
            "pendingReview",
            "closedWithFurtherAction",
            "closedWithIgnore"
          ],
          "required": false
        }
      ],
      "example": {
        "pendingReview": {
          "openedBy": "string"
        }
      }
    },
    "Event": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string"
        },
        "rid": {
          "type": "string"
        },
        "assetRids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A set of asset rids associated with the event."
        },
        "origins": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/EventOrigin"
          },
          "description": "A set of origins associated with the event."
        },
        "timestamp": {
          "$ref": "#/definitions/Timestamp"
        },
        "duration": {
          "$ref": "#/definitions/Duration"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "type": {
          "$ref": "#/definitions/EventType"
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "x-deprecated": true
        },
        "isArchived": {
          "type": "boolean"
        },
        "createdBy": {
          "type": "string",
          "description": "The user who created the event. This field may be missing for legacy events."
        },
        "disposition": {
          "$ref": "#/definitions/EventDisposition"
        },
        "typedProperties": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/TypedPropertyValue"
          }
        }
      }
    },
    "EventDisposition": {
      "type": "object",
      "properties": {
        "priority": {
          "$ref": "#/definitions/Priority"
        },
        "state": {
          "$ref": "#/definitions/DispositionState"
        },
        "assignees": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "description": "Describes the review status for an event."
    },
    "EventDispositionStatus": {
      "type": "string",
      "enum": [
        "EVENT_DISPOSITION_STATUS_UNSPECIFIED",
        "PENDING_REVIEW",
        "CLOSED_IGNORED",
        "CLOSED_REQUIRES_FURTHER_ACTION",
        "NO_DISPOSITION"
      ],
      "default": "EVENT_DISPOSITION_STATUS_UNSPECIFIED",
      "example": "PENDING_REVIEW"
    },
    "EventDispositionStatusList": {
      "type": "object",
      "properties": {
        "values": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/EventDispositionStatus"
          }
        }
      }
    },
    "EventOrigin": {
      "type": "object",
      "properties": {
        "workbook": {
          "$ref": "#/definitions/WorkbookEventOrigin",
          "description": "This event was created in this workbook."
        },
        "template": {
          "$ref": "#/definitions/TemplateEventOrigin",
          "description": "This event was created in this template."
        },
        "api": {
          "$ref": "#/definitions/ApiEventOrigin",
          "description": "This event was created programmatically via the API."
        },
        "dataReview": {
          "$ref": "#/definitions/DataReviewEventOrigin",
          "description": "This event was created automatically from a checklist execution."
        },
        "procedure": {
          "$ref": "#/definitions/ProcedureEventOrigin",
          "description": "This event was created automatically from a procedure execution."
        },
        "streamingChecklist": {
          "$ref": "#/definitions/StreamingChecklistEventOrigin",
          "description": "This event was created automatically from the execution of a streaming checklist."
        }
      },
      "description": "Describes where an event came from.\n\nSet at most one of the fields below.",
      "x-oneofs": [
        {
          "fields": [
            "workbook",
            "template",
            "api",
            "dataReview",
            "procedure",
            "streamingChecklist"
          ],
          "required": false
        }
      ],
      "example": {
        "workbook": {
          "rid": "string",
          "data": [
            {
              "timeSeriesChannel": {
                "variableName": "string",
                "tags": {
                  "key": "string"
                }
              }
            }
          ]
        }
      }
    },
    "EventTimeFilter": {
      "type": "object",
      "properties": {
        "timestamp": {
          "$ref": "#/definitions/Timestamp"
        },
        "timestampCondition": {
          "$ref": "#/definitions/EventTimeFilterCondition"
        }
      }
    },
    "EventTimeFilterCondition": {
      "type": "string",
      "enum": [
        "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"
      ],
      "default": "EVENT_TIME_FILTER_CONDITION_UNSPECIFIED",
      "example": "START_TIME_BEFORE_INCLUSIVE"
    },
    "EventType": {
      "type": "string",
      "enum": [
        "EVENT_TYPE_UNSPECIFIED",
        "INFO",
        "FLAG",
        "ERROR",
        "SUCCESS"
      ],
      "default": "EVENT_TYPE_UNSPECIFIED",
      "example": "INFO"
    },
    "EventTypeList": {
      "type": "object",
      "properties": {
        "values": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/EventType"
          }
        }
      }
    },
    "EventUpdate": {
      "type": "object",
      "properties": {
        "rid": {
          "type": "string"
        },
        "assetRids": {
          "$ref": "#/definitions/AssetRidSet",
          "description": "If provided, replaces the existing asset rids. If provided, must contain at least one asset rid."
        },
        "timestamp": {
          "$ref": "#/definitions/Timestamp"
        },
        "duration": {
          "$ref": "#/definitions/Duration"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "type": {
          "$ref": "#/definitions/EventType"
        },
        "labels": {
          "$ref": "#/definitions/LabelUpdateWrapper"
        },
        "properties": {
          "$ref": "#/definitions/PropertyUpdateWrapper",
          "x-deprecated": true
        },
        "typedProperties": {
          "$ref": "#/definitions/TypedPropertyUpdateWrapper"
        }
      }
    },
    "EventsHistogramBucket": {
      "type": "object",
      "properties": {
        "startInclusive": {
          "$ref": "#/definitions/Timestamp"
        },
        "endExclusive": {
          "$ref": "#/definitions/Timestamp"
        },
        "count": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "FindEventsQuery": {
      "type": "object",
      "properties": {
        "assetRids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "When non-empty, only events associated with at least one of these assets match. When empty, events match on the time window alone."
        },
        "startInclusive": {
          "$ref": "#/definitions/Timestamp",
          "description": "Half-open window [start_inclusive, end_exclusive) over event start times. An absent bound leaves that side of the window open."
        },
        "endExclusive": {
          "$ref": "#/definitions/Timestamp"
        },
        "index": {
          "type": "integer",
          "format": "int32",
          "description": "Zero-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": {
      "type": "object",
      "properties": {
        "event": {
          "$ref": "#/definitions/Event",
          "description": "Absent when no event matches the query at the requested index."
        }
      }
    },
    "GetEventsHistogramRequest": {
      "type": "object",
      "properties": {
        "startInclusive": {
          "$ref": "#/definitions/Timestamp"
        },
        "endExclusive": {
          "$ref": "#/definitions/Timestamp"
        },
        "filterQuery": {
          "$ref": "#/definitions/HistogramFilterQuery",
          "description": "The query to filter the events included in the histogram."
        },
        "archivedStatuses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ArchivedStatus"
          },
          "description": "If empty, defaults to NOT_ARCHIVED only."
        },
        "numBins": {
          "type": "integer",
          "format": "int32",
          "description": "Defaults to 100. Throws if larger than 1_000."
        },
        "eventLimit": {
          "type": "integer",
          "format": "int32",
          "description": "Limits the number of events included in the histogram. Defaults to 10_000. Throws if larger than 10_000."
        }
      },
      "example": {
        "startInclusive": {
          "seconds": "1",
          "nanos": "1"
        },
        "endExclusive": {
          "seconds": "1",
          "nanos": "1"
        },
        "filterQuery": {
          "searchText": "<search text>"
        },
        "archivedStatuses": [
          "NOT_ARCHIVED"
        ],
        "numBins": 1,
        "eventLimit": 1
      }
    },
    "GetEventsHistogramResponse": {
      "type": "object",
      "properties": {
        "buckets": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/EventsHistogramBucket"
          }
        }
      }
    },
    "GetEventsRequest": {
      "type": "object",
      "properties": {
        "uuids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "example": {
        "uuids": [
          "<uuids>"
        ]
      }
    },
    "GetEventsResponse": {
      "type": "object",
      "properties": {
        "events": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/Event"
          }
        }
      }
    },
    "HistogramFilterQuery": {
      "type": "object",
      "properties": {
        "searchText": {
          "type": "string"
        },
        "asset": {
          "type": "string"
        },
        "template": {
          "type": "string"
        },
        "workbook": {
          "type": "string"
        },
        "dataReview": {
          "type": "string"
        },
        "originType": {
          "$ref": "#/definitions/SearchEventOriginType"
        },
        "dataReviewCheck": {
          "type": "string"
        },
        "dispositionStatus": {
          "$ref": "#/definitions/EventDispositionStatus"
        },
        "priority": {
          "$ref": "#/definitions/Priority"
        },
        "assignee": {
          "type": "string"
        },
        "eventType": {
          "$ref": "#/definitions/EventType"
        },
        "createdBy": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "property": {
          "$ref": "#/definitions/Property"
        },
        "and": {
          "$ref": "#/definitions/HistogramFilterQueryList"
        },
        "or": {
          "$ref": "#/definitions/HistogramFilterQueryList"
        },
        "not": {
          "$ref": "#/definitions/HistogramFilterQuery"
        },
        "workspace": {
          "type": "string"
        },
        "procedure": {
          "type": "string"
        },
        "procedureExecution": {
          "type": "string"
        },
        "stepId": {
          "type": "string"
        }
      },
      "x-oneofs": [
        {
          "fields": [
            "searchText",
            "asset",
            "template",
            "workbook",
            "dataReview",
            "originType",
            "dataReviewCheck",
            "dispositionStatus",
            "priority",
            "assignee",
            "eventType",
            "createdBy",
            "label",
            "property",
            "and",
            "or",
            "not",
            "workspace",
            "procedure",
            "procedureExecution",
            "stepId"
          ],
          "required": false
        }
      ],
      "description": "Set at most one of the fields below.",
      "example": {
        "searchText": "string"
      }
    },
    "HistogramFilterQueryList": {
      "type": "object",
      "properties": {
        "queries": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/HistogramFilterQuery"
          }
        }
      }
    },
    "LabelsFilter": {
      "type": "object",
      "properties": {
        "operator": {
          "$ref": "#/definitions/SetOperator"
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "ListPropertiesAndLabelsRequest": {
      "type": "object",
      "properties": {
        "workspaceRids": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "If empty, results come from all workspaces the user belongs to."
        }
      },
      "example": {
        "workspaceRids": [
          "<workspace rids>"
        ]
      }
    },
    "OriginTypesFilter": {
      "type": "object",
      "properties": {
        "operator": {
          "$ref": "#/definitions/SetOperator"
        },
        "originTypes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SearchEventOriginType"
          }
        }
      }
    },
    "PendingReviewDispositionState": {
      "type": "object",
      "properties": {
        "openedBy": {
          "type": "string"
        }
      }
    },
    "Priority": {
      "type": "string",
      "enum": [
        "PRIORITY_UNSPECIFIED",
        "P0",
        "P1",
        "P2",
        "P3",
        "P4"
      ],
      "default": "PRIORITY_UNSPECIFIED",
      "example": "P0"
    },
    "PriorityList": {
      "type": "object",
      "properties": {
        "values": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Priority"
          }
        }
      }
    },
    "ProcedureEventOrigin": {
      "type": "object",
      "properties": {
        "procedureExecutionRid": {
          "type": "string"
        },
        "procedureRid": {
          "type": "string"
        },
        "stepId": {
          "type": "string"
        }
      }
    },
    "PropertiesFilter": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "values": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "SearchEventOriginType": {
      "type": "string",
      "enum": [
        "SEARCH_EVENT_ORIGIN_TYPE_UNSPECIFIED",
        "WORKBOOK",
        "TEMPLATE",
        "API",
        "DATA_REVIEW",
        "PROCEDURE",
        "STREAMING_CHECKLIST"
      ],
      "default": "SEARCH_EVENT_ORIGIN_TYPE_UNSPECIFIED",
      "example": "WORKBOOK"
    },
    "SearchEventsRequest": {
      "type": "object",
      "properties": {
        "sort": {
          "$ref": "#/definitions/SortOptions"
        },
        "pageSize": {
          "type": "integer",
          "format": "int32",
          "description": "Rejects page sizes greater than 10k."
        },
        "nextPageToken": {
          "type": "string"
        },
        "query": {
          "$ref": "#/definitions/SearchQuery"
        },
        "archivedStatuses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ArchivedStatus"
          },
          "description": "If empty, defaults to NOT_ARCHIVED only. Allows including archived events in search."
        }
      },
      "example": {
        "sort": {
          "isDescending": true,
          "field": "START_TIME"
        },
        "pageSize": 1,
        "nextPageToken": "<next page token>",
        "query": {
          "archived": true
        },
        "archivedStatuses": [
          "NOT_ARCHIVED"
        ]
      }
    },
    "SearchEventsResponse": {
      "type": "object",
      "properties": {
        "results": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/Event"
          }
        },
        "nextPageToken": {
          "type": "string"
        }
      }
    },
    "SearchQuery": {
      "type": "object",
      "properties": {
        "archived": {
          "type": "boolean"
        },
        "searchText": {
          "type": "string",
          "description": "Search text to perform fuzzy searching against."
        },
        "exactMatch": {
          "type": "string",
          "description": "Search text to perform exact matching against on the event name and description."
        },
        "after": {
          "$ref": "#/definitions/Timestamp",
          "description": "Filters to events after this timestamp, exclusive."
        },
        "before": {
          "$ref": "#/definitions/Timestamp",
          "description": "Filters to events before this timestamp, exclusive."
        },
        "advancedTimeFilter": {
          "$ref": "#/definitions/EventTimeFilter"
        },
        "asset": {
          "type": "string"
        },
        "assets": {
          "$ref": "#/definitions/AssetsFilter"
        },
        "template": {
          "type": "string"
        },
        "workbook": {
          "type": "string"
        },
        "dataReview": {
          "type": "string"
        },
        "dataReviews": {
          "$ref": "#/definitions/DataReviewsFilter"
        },
        "originType": {
          "$ref": "#/definitions/SearchEventOriginType"
        },
        "originTypes": {
          "$ref": "#/definitions/OriginTypesFilter"
        },
        "dataReviewCheck": {
          "type": "string"
        },
        "dataReviewChecks": {
          "$ref": "#/definitions/DataReviewChecksFilter"
        },
        "dispositionStatus": {
          "$ref": "#/definitions/EventDispositionStatus"
        },
        "dispositionStatuses": {
          "$ref": "#/definitions/EventDispositionStatusList"
        },
        "priority": {
          "$ref": "#/definitions/Priority"
        },
        "priorities": {
          "$ref": "#/definitions/PriorityList"
        },
        "assignee": {
          "type": "string"
        },
        "assignees": {
          "$ref": "#/definitions/AssigneesFilter"
        },
        "eventType": {
          "$ref": "#/definitions/EventType"
        },
        "eventTypes": {
          "$ref": "#/definitions/EventTypeList"
        },
        "createdBy": {
          "type": "string"
        },
        "createdByAnyOf": {
          "$ref": "#/definitions/UserRidList"
        },
        "label": {
          "type": "string"
        },
        "labels": {
          "$ref": "#/definitions/LabelsFilter"
        },
        "property": {
          "$ref": "#/definitions/Property"
        },
        "properties": {
          "$ref": "#/definitions/PropertiesFilter"
        },
        "and": {
          "$ref": "#/definitions/SearchQueryList"
        },
        "or": {
          "$ref": "#/definitions/SearchQueryList"
        },
        "not": {
          "$ref": "#/definitions/SearchQuery"
        },
        "workspace": {
          "type": "string"
        },
        "procedure": {
          "type": "string"
        },
        "procedureExecution": {
          "type": "string"
        },
        "stepId": {
          "type": "string"
        },
        "streamingChecklist": {
          "type": "string",
          "description": "Filters to events created from a checklist executing in streaming."
        },
        "streamingCheck": {
          "type": "string",
          "description": "Filters to events created from the check of a checklist executing in streaming."
        },
        "numericProperty": {
          "$ref": "#/definitions/NumericPropertyPredicate",
          "description": "Matches events using a numeric property comparison."
        },
        "numericPropertyRange": {
          "$ref": "#/definitions/NumericPropertyRangePredicate",
          "description": "Matches events using an inclusive numeric property range."
        }
      },
      "x-oneofs": [
        {
          "fields": [
            "archived",
            "searchText",
            "exactMatch",
            "after",
            "before",
            "advancedTimeFilter",
            "asset",
            "assets",
            "template",
            "workbook",
            "dataReview",
            "dataReviews",
            "originType",
            "originTypes",
            "dataReviewCheck",
            "dataReviewChecks",
            "dispositionStatus",
            "dispositionStatuses",
            "priority",
            "priorities",
            "assignee",
            "assignees",
            "eventType",
            "eventTypes",
            "createdBy",
            "createdByAnyOf",
            "label",
            "labels",
            "property",
            "properties",
            "and",
            "or",
            "not",
            "workspace",
            "procedure",
            "procedureExecution",
            "stepId",
            "streamingChecklist",
            "streamingCheck",
            "numericProperty",
            "numericPropertyRange"
          ],
          "required": false
        }
      ],
      "description": "Set at most one of the fields below.",
      "example": {
        "archived": true
      }
    },
    "SearchQueryList": {
      "type": "object",
      "properties": {
        "queries": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/SearchQuery"
          }
        }
      },
      "description": "Repeated-value arms of the SearchQuery / HistogramFilterQuery oneofs are message-wrapped: proto3 oneof arms cannot be repeated directly."
    },
    "SetOperator": {
      "type": "string",
      "enum": [
        "SET_OPERATOR_UNSPECIFIED",
        "AND",
        "OR"
      ],
      "default": "SET_OPERATOR_UNSPECIFIED",
      "example": "AND"
    },
    "SortField": {
      "type": "string",
      "enum": [
        "SORT_FIELD_UNSPECIFIED",
        "START_TIME",
        "END_TIME",
        "DURATION",
        "DISPOSITION_STATUS",
        "PRIORITY",
        "EVENT_NAME"
      ],
      "default": "SORT_FIELD_UNSPECIFIED",
      "example": "START_TIME"
    },
    "SortOptions": {
      "type": "object",
      "properties": {
        "isDescending": {
          "type": "boolean"
        },
        "field": {
          "$ref": "#/definitions/SortField"
        }
      }
    },
    "StreamingCheckOriginMetadata": {
      "type": "object",
      "properties": {
        "checkRid": {
          "type": "string"
        },
        "checkLineageRid": {
          "type": "string"
        },
        "implementationIndex": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "StreamingChecklistEventOrigin": {
      "type": "object",
      "properties": {
        "checklistRid": {
          "type": "string"
        },
        "checkMetadata": {
          "$ref": "#/definitions/StreamingCheckOriginMetadata",
          "description": "Metadata about the check that created this event."
        }
      }
    },
    "TemplateEventOrigin": {
      "type": "object",
      "properties": {
        "rid": {
          "type": "string"
        }
      }
    },
    "TimeSeriesChannelAssociation": {
      "type": "object",
      "properties": {
        "variableName": {
          "type": "string"
        },
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "If this variable is grouped, the tags within the groupings this event should associate with."
        }
      },
      "description": "A singular time series to associate the event with."
    },
    "UpdateDispositionRequest": {
      "type": "object",
      "properties": {
        "rid": {
          "type": "string"
        },
        "disposition": {
          "$ref": "#/definitions/EventDisposition",
          "description": "The new disposition for the event. If empty, removes the disposition from the event."
        }
      }
    },
    "UpdateEventRequest": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string"
        },
        "rid": {
          "type": "string",
          "description": "The unique identifier for the event. Required if the uuid field is not provided."
        },
        "assetRids": {
          "$ref": "#/definitions/AssetRidSet",
          "description": "If provided, replaces the existing asset rids. If provided, must contain at least one asset rid."
        },
        "timestamp": {
          "$ref": "#/definitions/Timestamp"
        },
        "duration": {
          "$ref": "#/definitions/Duration"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "type": {
          "$ref": "#/definitions/EventType"
        },
        "labels": {
          "$ref": "#/definitions/LabelUpdateWrapper"
        },
        "properties": {
          "$ref": "#/definitions/PropertyUpdateWrapper",
          "x-deprecated": true
        },
        "typedProperties": {
          "$ref": "#/definitions/TypedPropertyUpdateWrapper"
        }
      },
      "example": {
        "uuid": "<uuid>",
        "rid": "<rid>",
        "assetRids": {
          "assetRids": [
            "<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>"
          }
        },
        "typedProperties": {
          "typedProperties": {
            "<key>": {
              "stringValue": "<string value>"
            }
          }
        }
      }
    },
    "UpdateEventResponse": {
      "type": "object",
      "properties": {
        "event": {
          "$ref": "#/definitions/Event"
        }
      }
    },
    "UserRidList": {
      "type": "object",
      "properties": {
        "values": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "WorkbookDataAssociation": {
      "type": "object",
      "properties": {
        "timeSeriesChannel": {
          "$ref": "#/definitions/TimeSeriesChannelAssociation"
        }
      },
      "x-oneofs": [
        {
          "fields": [
            "timeSeriesChannel"
          ],
          "required": false
        }
      ],
      "example": {
        "timeSeriesChannel": {
          "variableName": "string",
          "tags": {
            "key": "string"
          }
        }
      }
    },
    "WorkbookEventOrigin": {
      "type": "object",
      "properties": {
        "rid": {
          "type": "string"
        },
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/WorkbookDataAssociation"
          },
          "description": "Data visualizations to associate this event with."
        }
      }
    },
    "ListPropertiesAndLabelsResponse": {
      "type": "object",
      "properties": {
        "properties": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/PropertyValues"
          },
          "description": "Deprecated: 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.",
          "x-deprecated": true
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "PropertyValues": {
      "type": "object",
      "properties": {
        "value": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "ArchivedStatus": {
      "type": "string",
      "enum": [
        "ARCHIVED_STATUS_UNSPECIFIED",
        "NOT_ARCHIVED",
        "ARCHIVED"
      ],
      "default": "ARCHIVED_STATUS_UNSPECIFIED",
      "example": "NOT_ARCHIVED"
    },
    "Duration": {
      "type": "object",
      "properties": {
        "seconds": {
          "type": "string",
          "format": "int64"
        },
        "nanos": {
          "type": "string",
          "format": "int64"
        }
      }
    },
    "LabelUpdateWrapper": {
      "type": "object",
      "properties": {
        "labels": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "title": "Wrapper classes to allow for optional fields on update requests"
    },
    "NumericPropertyPredicate": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "value": {
          "type": "number",
          "format": "double"
        },
        "operator": {
          "$ref": "#/definitions/PropertyComparisonOperator"
        }
      },
      "description": "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."
    },
    "NumericPropertyRangeOperator": {
      "type": "string",
      "enum": [
        "NUMERIC_PROPERTY_RANGE_OPERATOR_UNSPECIFIED",
        "BETWEEN",
        "NOT_BETWEEN"
      ],
      "default": "NUMERIC_PROPERTY_RANGE_OPERATOR_UNSPECIFIED",
      "example": "BETWEEN"
    },
    "NumericPropertyRangePredicate": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "min": {
          "type": "number",
          "format": "double"
        },
        "max": {
          "type": "number",
          "format": "double"
        },
        "operator": {
          "$ref": "#/definitions/NumericPropertyRangeOperator"
        }
      },
      "description": "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."
    },
    "Property": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "PropertyComparisonOperator": {
      "type": "string",
      "enum": [
        "PROPERTY_COMPARISON_OPERATOR_UNSPECIFIED",
        "EQ",
        "NEQ",
        "GT",
        "GTE",
        "LT",
        "LTE"
      ],
      "default": "PROPERTY_COMPARISON_OPERATOR_UNSPECIFIED",
      "example": "EQ"
    },
    "PropertyUpdateWrapper": {
      "type": "object",
      "properties": {
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "TypedPropertyUpdateWrapper": {
      "type": "object",
      "properties": {
        "typedProperties": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/TypedPropertyValue"
          }
        }
      }
    },
    "TypedPropertyValue": {
      "type": "object",
      "properties": {
        "stringValue": {
          "type": "string"
        },
        "numericValue": {
          "type": "number",
          "format": "double"
        }
      },
      "x-oneofs": [
        {
          "fields": [
            "stringValue",
            "numericValue"
          ],
          "required": true
        }
      ],
      "description": "Set exactly one of the fields below.",
      "example": {
        "stringValue": "string"
      }
    },
    "Timestamp": {
      "type": "object",
      "properties": {
        "seconds": {
          "type": "string",
          "format": "int64"
        },
        "nanos": {
          "type": "string",
          "format": "int64"
        }
      },
      "description": "Deprecated for new APIs. Use google.protobuf.Timestamp for absolute instants.\n\nThis 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.",
      "x-deprecated": true
    }
  },
  "securityDefinitions": {
    "ApiKey": {
      "type": "apiKey",
      "in": "header",
      "name": "Authorization",
      "description": "Your API key as a bearer token: `Authorization: Bearer <api key>`."
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}
