Skip to content

Commit

Permalink
Merge pull request #139 from whdalsrnt/master
Browse files Browse the repository at this point in the history
Export API
  • Loading branch information
whdalsrnt authored Oct 20, 2023
2 parents e0ea923 + 58f60b2 commit 0685739
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 2 deletions.
39 changes: 38 additions & 1 deletion proto/spaceone/api/core/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,41 @@ message AnalyzeQuery {
google.protobuf.Struct fields = 7;
google.protobuf.Struct select = 8;
string keyword = 9;
}
}

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;
}
14 changes: 13 additions & 1 deletion proto/spaceone/api/inventory/v1/cloud_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0685739

Please sign in to comment.