// Copyright 2019 Make.TV Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. syntax = "proto3"; package tv.make.api; import "auditlog/auditlog.proto"; import "google/api/annotations.proto"; option go_package = "git.ltnglobal.com/make.tv/genproto/api;api"; service AuditLogService { // Searches Events in a team. rpc SearchEvents(SearchEventsRequest) returns (SearchEventsResponse) { option (google.api.http) = { post: "/v1/teams/{team_id}/auditlog/events:search" }; } // Gets an event. Returns NOT_FOUND if no such event exists. rpc GetEvent(GetEventRequest) returns (AuditLogEvent) { option (google.api.http) = { get: "/v1/teams/{team_id}/auditlog/events/{event_id}" }; } } // Request for [SearchEvents][tv.make.api.AuditLogService.SearchEvents]. message SearchEventsRequest { // The unique identifier of the team owning the events. string team_id = 1; // Query with a UUID will search over multiple fields and types. string query = 2; // Filter expression in CEL syntax. // // Supported fields are: // - event.create_time // - event.user_id // - event.team_id // - has(event.output_crud) // - has(event.output_target_crud) // - has(event.production_crud) // - has(event.production_status) // - has(event.transfertarget_transfer_status) // - has(event.input_crud) // - has(event.input_routed) string filter = 3; // The maximum number of items to return. int32 page_size = 4; // The page_token value returned from a previous List request, if any. string page_token = 5; } // Response for [SearchEvents][tv.make.api.AuditLogService.SearchEvents]. message SearchEventsResponse { // The list of events. repeated AuditLogEvent events = 1; // Token to retrieve the next page of results, or empty if there are no more results in the // list. string next_page_token = 2; } // Request for [GetEvent][tv.make.api.AuditLogService.GetEvent]. message GetEventRequest { // The unique identifier of the team owning the event. string team_id = 1; // The id for the event to retrieve. string event_id = 2; }