diff --git a/proto/spaceone/api/core/v1/query.proto b/proto/spaceone/api/core/v1/query.proto index 43f5fca8..5ae1bebe 100644 --- a/proto/spaceone/api/core/v1/query.proto +++ b/proto/spaceone/api/core/v1/query.proto @@ -207,4 +207,41 @@ message AnalyzeQuery { google.protobuf.Struct fields = 7; google.protobuf.Struct select = 8; string keyword = 9; -} \ No newline at end of file +} + +message ExportSearchQuery { + repeated Filter filter = 1; + repeated Filter filter_or = 2; + string keyword = 3; + repeated SortKey sort = 4; + google.protobuf.ListValue fields = 5; +} + +message ExportAnalyzeQuery { + repeated Filter filter = 1; + repeated Filter filter_or = 2; + string keyword = 3; + repeated SortKey sort = 4; + repeated string group_by = 5; + google.protobuf.Struct fields = 6; + google.protobuf.Struct select = 7; +} + +message ExportOptions { + enum QueryType{ + QUERY_TYPE_NONE = 0; + SEARCH = 1; + ANALYZE = 2; + } + + string name = 1; + QueryType query_type = 2; + oneof export_query { + ExportSearchQuery search_query = 3; + ExportAnalyzeQuery analyze_query = 4; + } +} + +message ExportInfo { + string download_url = 1; +} diff --git a/proto/spaceone/api/inventory/v1/cloud_service.proto b/proto/spaceone/api/inventory/v1/cloud_service.proto index 09707264..f71dd575 100644 --- a/proto/spaceone/api/inventory/v1/cloud_service.proto +++ b/proto/spaceone/api/inventory/v1/cloud_service.proto @@ -52,7 +52,14 @@ service CloudService { body: "*" }; } - + + rpc export (CloudServiceExportRequest) returns (spaceone.api.core.v1.ExportInfo) { + option (google.api.http) = { + post: "/inventory/v1/cloud-service/export" + body: "*" + }; + } + rpc analyze (CloudServiceAnalyzeQuery) returns (google.protobuf.Struct) { option (google.api.http) = { post: "/inventory/v1/cloud-service/analyze" @@ -422,6 +429,11 @@ message CloudServicesInfo { int32 total_count = 2; } +message CloudServiceExportRequest { + repeated spaceone.api.core.v1.ExportOptions options = 1; + string domain_id = 2; +} + message CloudServiceAnalyzeQuery { spaceone.api.core.v1.AnalyzeQuery query = 1; string domain_id = 2;