2021-01-14 14:24:14 +08:00
syntax = "proto3" ;
package milvus . proto.milvus ;
2021-04-22 14:45:57 +08:00
option go_package = "github.com/milvus-io/milvus/internal/proto/milvuspb" ;
2021-01-14 14:24:14 +08:00
2022-03-22 15:11:24 +08:00
option java_multiple_files = true ;
option java_package = "io.milvus.grpc" ;
option java_outer_classname = "MilvusProto" ;
option java_generate_equals_and_hash = true ;
2021-01-14 14:24:14 +08:00
import "common.proto" ;
2021-01-15 20:12:26 +08:00
import "schema.proto" ;
2022-05-28 00:04:01 +08:00
import "google/protobuf/descriptor.proto" ;
2021-01-14 14:24:14 +08:00
2021-03-12 14:22:09 +08:00
service MilvusService {
rpc CreateCollection ( CreateCollectionRequest ) returns ( common.Status ) { }
rpc DropCollection ( DropCollectionRequest ) returns ( common.Status ) { }
rpc HasCollection ( HasCollectionRequest ) returns ( BoolResponse ) { }
rpc LoadCollection ( LoadCollectionRequest ) returns ( common.Status ) { }
rpc ReleaseCollection ( ReleaseCollectionRequest ) returns ( common.Status ) { }
rpc DescribeCollection ( DescribeCollectionRequest ) returns ( DescribeCollectionResponse ) { }
rpc GetCollectionStatistics ( GetCollectionStatisticsRequest ) returns ( GetCollectionStatisticsResponse ) { }
rpc ShowCollections ( ShowCollectionsRequest ) returns ( ShowCollectionsResponse ) { }
rpc CreatePartition ( CreatePartitionRequest ) returns ( common.Status ) { }
rpc DropPartition ( DropPartitionRequest ) returns ( common.Status ) { }
rpc HasPartition ( HasPartitionRequest ) returns ( BoolResponse ) { }
rpc LoadPartitions ( LoadPartitionsRequest ) returns ( common.Status ) { }
rpc ReleasePartitions ( ReleasePartitionsRequest ) returns ( common.Status ) { }
rpc GetPartitionStatistics ( GetPartitionStatisticsRequest ) returns ( GetPartitionStatisticsResponse ) { }
rpc ShowPartitions ( ShowPartitionsRequest ) returns ( ShowPartitionsResponse ) { }
2021-09-18 11:13:51 +08:00
rpc CreateAlias ( CreateAliasRequest ) returns ( common.Status ) { }
rpc DropAlias ( DropAliasRequest ) returns ( common.Status ) { }
rpc AlterAlias ( AlterAliasRequest ) returns ( common.Status ) { }
2021-03-12 14:22:09 +08:00
rpc CreateIndex ( CreateIndexRequest ) returns ( common.Status ) { }
rpc DescribeIndex ( DescribeIndexRequest ) returns ( DescribeIndexResponse ) { }
rpc GetIndexState ( GetIndexStateRequest ) returns ( GetIndexStateResponse ) { }
2021-04-27 15:46:45 +08:00
rpc GetIndexBuildProgress ( GetIndexBuildProgressRequest ) returns ( GetIndexBuildProgressResponse ) { }
2021-03-12 14:22:09 +08:00
rpc DropIndex ( DropIndexRequest ) returns ( common.Status ) { }
2021-06-21 11:42:18 +08:00
rpc Insert ( InsertRequest ) returns ( MutationResult ) { }
2021-08-26 12:15:52 +08:00
rpc Delete ( DeleteRequest ) returns ( MutationResult ) { }
2021-03-12 14:22:09 +08:00
rpc Search ( SearchRequest ) returns ( SearchResults ) { }
2021-06-23 16:56:11 +08:00
rpc Flush ( FlushRequest ) returns ( FlushResponse ) { }
2021-06-04 12:02:34 +08:00
rpc Query ( QueryRequest ) returns ( QueryResults ) { }
2021-07-01 18:56:17 +08:00
rpc CalcDistance ( CalcDistanceRequest ) returns ( CalcDistanceResults ) { }
2021-03-12 14:22:09 +08:00
2021-11-23 22:57:17 +08:00
rpc GetFlushState ( GetFlushStateRequest ) returns ( GetFlushStateResponse ) { }
2021-03-12 14:22:09 +08:00
rpc GetPersistentSegmentInfo ( GetPersistentSegmentInfoRequest ) returns ( GetPersistentSegmentInfoResponse ) { }
rpc GetQuerySegmentInfo ( GetQuerySegmentInfoRequest ) returns ( GetQuerySegmentInfoResponse ) { }
2022-04-06 14:57:31 +08:00
rpc GetReplicas ( GetReplicasRequest ) returns ( GetReplicasResponse ) { }
2021-03-12 14:22:09 +08:00
2021-05-25 14:44:43 +08:00
rpc Dummy ( DummyRequest ) returns ( DummyResponse ) { }
2021-03-12 14:22:09 +08:00
// TODO: remove
rpc RegisterLink ( RegisterLinkRequest ) returns ( RegisterLinkResponse ) { }
2021-08-18 10:12:10 +08:00
// https://wiki.lfaidata.foundation/display/MIL/MEP+8+--+Add+metrics+for+proxy
rpc GetMetrics ( GetMetricsRequest ) returns ( GetMetricsResponse ) { }
2021-11-06 16:54:59 +08:00
rpc LoadBalance ( LoadBalanceRequest ) returns ( common.Status ) { }
2021-11-09 14:47:02 +08:00
rpc GetCompactionState ( GetCompactionStateRequest ) returns ( GetCompactionStateResponse ) { }
rpc ManualCompaction ( ManualCompactionRequest ) returns ( ManualCompactionResponse ) { }
2021-11-09 15:47:00 +08:00
rpc GetCompactionStateWithPlans ( GetCompactionPlansRequest ) returns ( GetCompactionPlansResponse ) { }
2022-03-09 18:33:59 +08:00
// https://wiki.lfaidata.foundation/display/MIL/MEP+24+--+Support+bulk+load
rpc Import ( ImportRequest ) returns ( ImportResponse ) { }
rpc GetImportState ( GetImportStateRequest ) returns ( GetImportStateResponse ) { }
2022-04-25 17:37:46 +08:00
rpc ListImportTasks ( ListImportTasksRequest ) returns ( ListImportTasksResponse ) { }
2022-04-11 19:49:34 +08:00
// https://wiki.lfaidata.foundation/display/MIL/MEP+27+--+Support+Basic+Authentication
rpc CreateCredential ( CreateCredentialRequest ) returns ( common.Status ) { }
2022-04-19 16:35:39 +08:00
rpc UpdateCredential ( UpdateCredentialRequest ) returns ( common.Status ) { }
2022-04-11 19:49:34 +08:00
rpc DeleteCredential ( DeleteCredentialRequest ) returns ( common.Status ) { }
rpc ListCredUsers ( ListCredUsersRequest ) returns ( ListCredUsersResponse ) { }
2022-05-28 00:04:01 +08:00
// https://wiki.lfaidata.foundation/display/MIL/MEP+29+--+Support+Role-Based+Access+Control
rpc CreateRole ( CreateRoleRequest ) returns ( common.Status ) { }
rpc DropRole ( DropRoleRequest ) returns ( common.Status ) { }
rpc OperateUserRole ( OperateUserRoleRequest ) returns ( common.Status ) { }
rpc SelectRole ( SelectRoleRequest ) returns ( SelectRoleResponse ) { }
rpc SelectUser ( SelectUserRequest ) returns ( SelectUserResponse ) { }
rpc OperatePrivilege ( OperatePrivilegeRequest ) returns ( common.Status ) { }
rpc SelectGrant ( SelectGrantRequest ) returns ( SelectGrantResponse ) { }
2021-03-12 14:22:09 +08:00
}
2021-09-18 11:13:51 +08:00
message CreateAliasRequest {
common.MsgBase base = 1 ;
2021-10-01 21:40:21 +08:00
string db_name = 2 ;
string collection_name = 3 ;
string alias = 4 ;
2021-09-18 11:13:51 +08:00
}
message DropAliasRequest {
common.MsgBase base = 1 ;
2021-10-01 21:40:21 +08:00
string db_name = 2 ;
string alias = 3 ;
2021-09-18 11:13:51 +08:00
}
message AlterAliasRequest {
common.MsgBase base = 1 ;
2021-10-01 21:40:21 +08:00
string db_name = 2 ;
string collection_name = 3 ;
string alias = 4 ;
2021-09-18 11:13:51 +08:00
}
2021-09-10 10:06:00 +08:00
/ * *
2021-09-18 11:13:51 +08:00
* Create collection in milvus
2021-09-10 10:06:00 +08:00
* /
2021-01-14 14:24:14 +08:00
message CreateCollectionRequest {
2022-05-28 00:04:01 +08:00
option ( common.privilege_ext_obj ) = {
2022-08-04 11:04:34 +08:00
object_type : Global
object_privilege : PrivilegeCreateCollection
object_name_index : - 1
2022-05-28 00:04:01 +08:00
} ;
2021-09-10 10:06:00 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// Not useful for now
2021-01-14 20:30:27 +08:00
string db_name = 2 ;
2021-09-10 10:06:00 +08:00
// The unique collection name in milvus.(Required)
2022-05-28 00:04:01 +08:00
string collection_name = 3 ;
2021-09-10 10:06:00 +08:00
// The serialized `schema.CollectionSchema`(Required)
2022-05-28 00:04:01 +08:00
bytes schema = 4 ;
2021-09-10 10:06:00 +08:00
// Once set, no modification is allowed (Optional)
2021-09-16 10:21:53 +08:00
// https://github.com/milvus-io/milvus/issues/6690
2021-09-10 10:06:00 +08:00
int32 shards_num = 5 ;
2021-12-21 19:49:02 +08:00
// The consistency level that the collection used, modification is not supported now.
common.ConsistencyLevel consistency_level = 6 ;
2021-01-14 14:24:14 +08:00
}
2021-09-14 09:53:21 +08:00
/ * *
2022-05-28 00:04:01 +08:00
* Drop collection in milvus , also will drop data in collection.
2021-09-14 09:53:21 +08:00
* /
2021-01-14 14:24:14 +08:00
message DropCollectionRequest {
2022-05-28 00:04:01 +08:00
option ( common.privilege_ext_obj ) = {
2022-08-04 11:04:34 +08:00
object_type : Global
object_privilege : PrivilegeDropCollection
object_name_index : - 1
2022-05-28 00:04:01 +08:00
} ;
2021-09-14 09:53:21 +08:00
// Not useful for now
2022-05-28 00:04:01 +08:00
common.MsgBase base = 1 ;
2021-09-14 09:53:21 +08:00
// Not useful for now
2021-01-14 20:30:27 +08:00
string db_name = 2 ;
2021-09-14 09:53:21 +08:00
// The unique collection name in milvus.(Required)
string collection_name = 3 ;
2021-01-14 14:24:14 +08:00
}
2021-09-14 09:53:21 +08:00
/ * *
* Check collection exist in milvus or not.
* /
2021-01-14 14:24:14 +08:00
message HasCollectionRequest {
2021-09-14 09:53:21 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// Not useful for now
2021-01-14 20:30:27 +08:00
string db_name = 2 ;
2021-09-14 09:53:21 +08:00
// The collection name you want to check.
2022-05-28 00:04:01 +08:00
string collection_name = 3 ;
2021-10-11 21:23:50 +08:00
// If time_stamp is not zero, will return true when time_stamp >= created collection timestamp, otherwise will return false.
2021-05-18 17:12:17 +08:00
uint64 time_stamp = 4 ;
2021-01-14 14:24:14 +08:00
}
2021-09-16 10:21:53 +08:00
2021-01-15 20:12:26 +08:00
message BoolResponse {
common.Status status = 1 ;
bool value = 2 ;
}
2021-01-18 21:39:56 +08:00
message StringResponse {
common.Status status = 1 ;
string value = 2 ;
}
2021-09-16 10:21:53 +08:00
/ * *
* Get collection meta datas like : schema , collectionID , shards number . . .
* /
2021-01-14 14:24:14 +08:00
message DescribeCollectionRequest {
2022-05-28 00:04:01 +08:00
option ( common.privilege_ext_obj ) = {
2022-08-04 11:04:34 +08:00
object_type : Global
object_privilege : PrivilegeDescribeCollection
object_name_index : - 1
2022-05-28 00:04:01 +08:00
} ;
2021-09-16 10:21:53 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// Not useful for now
2021-01-14 20:30:27 +08:00
string db_name = 2 ;
2021-10-11 21:23:50 +08:00
// The collection name you want to describe, you can pass collection_name or collectionID
2021-09-16 10:21:53 +08:00
string collection_name = 3 ;
2021-10-11 21:23:50 +08:00
// The collection ID you want to describe
2021-02-25 16:08:56 +08:00
int64 collectionID = 4 ;
2021-10-11 21:23:50 +08:00
// If time_stamp is not zero, will describe collection success when time_stamp >= created collection timestamp, otherwise will throw error.
2021-05-18 17:12:17 +08:00
uint64 time_stamp = 5 ;
2021-01-14 14:24:14 +08:00
}
2021-09-16 10:21:53 +08:00
/ * *
* DescribeCollection Response
* /
2021-01-14 14:24:14 +08:00
message DescribeCollectionResponse {
2021-09-16 10:21:53 +08:00
// Contain error_code and reason
2021-01-15 20:12:26 +08:00
common.Status status = 1 ;
2021-09-16 10:21:53 +08:00
// The schema param when you created collection.
2021-01-15 20:12:26 +08:00
schema.CollectionSchema schema = 2 ;
2021-09-16 10:21:53 +08:00
// The collection id
2021-01-22 15:41:54 +08:00
int64 collectionID = 3 ;
2021-09-16 10:21:53 +08:00
// System design related, users should not perceive
2021-05-17 19:15:01 +08:00
repeated string virtual_channel_names = 4 ;
2021-09-16 10:21:53 +08:00
// System design related, users should not perceive
2021-05-17 19:15:01 +08:00
repeated string physical_channel_names = 5 ;
2021-09-16 10:21:53 +08:00
// Hybrid timestamp in milvus
uint64 created_timestamp = 6 ;
// The utc timestamp calculated by created_timestamp
uint64 created_utc_timestamp = 7 ;
// The shards number you set.
2021-09-18 11:13:51 +08:00
int32 shards_num = 8 ;
// The aliases of this collection
repeated string aliases = 9 ;
2021-09-27 14:13:58 +08:00
// The message ID/posititon when collection is created
repeated common.KeyDataPair start_positions = 10 ;
2021-12-21 19:49:02 +08:00
// The consistency level that the collection used, modification is not supported now.
common.ConsistencyLevel consistency_level = 11 ;
2022-01-27 22:55:41 +08:00
// The collection name
string collection_name = 12 ;
2021-01-14 14:24:14 +08:00
}
2021-09-18 09:33:51 +08:00
/ * *
* Load collection data into query nodes , then you can do vector search on this collection.
* /
2021-01-14 14:24:14 +08:00
message LoadCollectionRequest {
2022-05-28 00:04:01 +08:00
option ( common.privilege_ext_obj ) = {
2022-08-04 11:04:34 +08:00
object_type : Collection
object_privilege : PrivilegeLoad
object_name_index : 3
2022-05-28 00:04:01 +08:00
} ;
2021-09-18 09:33:51 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// Not useful for now
2021-01-14 20:30:27 +08:00
string db_name = 2 ;
2021-09-18 09:33:51 +08:00
// The collection name you want to load
string collection_name = 3 ;
2022-03-25 11:13:25 +08:00
// The replica number to load, default by 1
int32 replica_number = 4 ;
2021-01-14 14:24:14 +08:00
}
2021-09-18 09:33:51 +08:00
/ * *
* Release collection data from query nodes , then you can ' t do vector search on this collection.
* /
2021-01-14 14:24:14 +08:00
message ReleaseCollectionRequest {
2022-05-28 00:04:01 +08:00
option ( common.privilege_ext_obj ) = {
2022-08-04 11:04:34 +08:00
object_type : Collection
object_privilege : PrivilegeRelease
object_name_index : 3
2022-05-28 00:04:01 +08:00
} ;
2021-09-18 09:33:51 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// Not useful for now
2021-01-14 20:30:27 +08:00
string db_name = 2 ;
2021-09-18 09:33:51 +08:00
// The collection name you want to release
string collection_name = 3 ;
2021-01-14 14:24:14 +08:00
}
2022-07-18 09:58:28 +08:00
/ * *
* Get statistics like row_count.
* WARNING : This API is experimental and not useful for now.
* /
message GetStatisticsRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Collection
object_privilege : PrivilegeGetStatistics
object_name_index : 3
} ;
2022-07-18 09:58:28 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// Not useful for now
string db_name = 2 ;
// The collection name you want get statistics
string collection_name = 3 ;
// The partition names you want get statistics, empty for all partitions
repeated string partition_names = 4 ;
// Not useful for now, reserved for future
uint64 guarantee_timestamp = 5 ;
}
/ * *
* Will return statistics in stats field like [ { key : "row_count" , value : "1" } ]
* WARNING : This API is experimental and not useful for now.
* /
message GetStatisticsResponse {
// Contain error_code and reason
common.Status status = 1 ;
// Collection statistics data
repeated common.KeyValuePair stats = 2 ;
}
2021-09-18 09:33:51 +08:00
/ * *
* Get collection statistics like row_count.
* /
2021-03-12 14:22:09 +08:00
message GetCollectionStatisticsRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Collection
object_privilege : PrivilegeGetStatistics
object_name_index : 3
} ;
2021-09-18 09:33:51 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// Not useful for now
2021-01-14 20:30:27 +08:00
string db_name = 2 ;
2021-09-18 09:33:51 +08:00
// The collection name you want get statistics
string collection_name = 3 ;
2021-01-14 14:24:14 +08:00
}
2021-09-18 09:33:51 +08:00
/ * *
* Will return collection statistics in stats field like [ { key : "row_count" , value : "1" } ]
* /
2021-03-12 14:22:09 +08:00
message GetCollectionStatisticsResponse {
2021-09-18 09:33:51 +08:00
// Contain error_code and reason
2021-01-18 21:39:56 +08:00
common.Status status = 1 ;
2021-09-18 09:33:51 +08:00
// Collection statistics data
2021-01-18 21:39:56 +08:00
repeated common.KeyValuePair stats = 2 ;
2021-01-14 14:24:14 +08:00
}
2021-09-22 20:14:08 +08:00
/ *
* This is for ShowCollectionsRequest type field.
* /
2021-08-02 22:39:25 +08:00
enum ShowType {
2022-07-18 09:58:28 +08:00
// Will return all collections
2021-06-03 19:09:33 +08:00
All = 0 ;
2021-09-22 20:14:08 +08:00
// Will return loaded collections with their inMemory_percentages
2021-06-03 19:09:33 +08:00
InMemory = 1 ;
}
2021-09-22 20:14:08 +08:00
/ *
2022-05-28 00:04:01 +08:00
* List collections
2021-09-22 20:14:08 +08:00
* /
2021-03-12 14:22:09 +08:00
message ShowCollectionsRequest {
2022-05-28 00:04:01 +08:00
option ( common.privilege_ext_obj ) = {
2022-08-04 11:04:34 +08:00
object_type : Global
object_privilege : PrivilegeShowCollections
object_name_index : - 1
2022-05-28 00:04:01 +08:00
} ;
2021-09-22 20:14:08 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// Not useful for now
2021-01-14 20:30:27 +08:00
string db_name = 2 ;
2021-09-22 20:14:08 +08:00
// Not useful for now
2021-05-18 17:12:17 +08:00
uint64 time_stamp = 3 ;
2021-09-22 20:14:08 +08:00
// Decide return Loaded collections or All collections(Optional)
2021-08-02 22:39:25 +08:00
ShowType type = 4 ;
2021-09-22 20:14:08 +08:00
// When type is InMemory, will return these collection's inMemory_percentages.(Optional)
2022-05-28 00:04:01 +08:00
repeated string collection_names = 5 ;
2021-01-14 14:24:14 +08:00
}
2021-09-22 20:14:08 +08:00
/ *
* Return basic collection infos.
* /
2021-03-12 14:22:09 +08:00
message ShowCollectionsResponse {
2021-09-22 20:14:08 +08:00
// Contain error_code and reason
2021-01-18 21:39:56 +08:00
common.Status status = 1 ;
2021-09-22 20:14:08 +08:00
// Collection name array
2021-01-18 21:39:56 +08:00
repeated string collection_names = 2 ;
2021-09-22 20:14:08 +08:00
// Collection Id array
2021-06-03 19:09:33 +08:00
repeated int64 collection_ids = 3 ;
2021-09-22 20:14:08 +08:00
// Hybrid timestamps in milvus
repeated uint64 created_timestamps = 4 ;
// The utc timestamp calculated by created_timestamp
repeated uint64 created_utc_timestamps = 5 ;
// Load percentage on querynode when type is InMemory
2022-05-28 00:04:01 +08:00
repeated int64 inMemory_percentages = 6 ;
2022-06-09 18:20:07 +08:00
// Indicate whether query service is available
repeated bool query_service_available = 7 ;
2021-01-14 14:24:14 +08:00
}
2021-09-22 20:14:08 +08:00
/ *
* Create partition in created collection.
* /
2021-01-14 14:24:14 +08:00
message CreatePartitionRequest {
2021-09-22 20:14:08 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// Not useful for now
2021-01-14 20:30:27 +08:00
string db_name = 2 ;
2021-09-22 20:14:08 +08:00
// The collection name in milvus
string collection_name = 3 ;
// The partition name you want to create.
string partition_name = 4 ;
2021-01-14 14:24:14 +08:00
}
2021-09-28 22:32:13 +08:00
/ *
* Drop partition in created collection.
* /
2021-01-14 14:24:14 +08:00
message DropPartitionRequest {
2021-09-28 22:32:13 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// Not useful for now
2021-01-14 20:30:27 +08:00
string db_name = 2 ;
2021-09-28 22:32:13 +08:00
// The collection name in milvus
string collection_name = 3 ;
// The partition name you want to drop
2022-05-28 00:04:01 +08:00
string partition_name = 4 ;
2021-01-14 14:24:14 +08:00
}
2021-09-28 22:32:13 +08:00
/ *
* Check if partition exist in collection or not.
* /
2021-01-14 14:24:14 +08:00
message HasPartitionRequest {
2021-09-28 22:32:13 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// Not useful for now
2021-01-14 20:30:27 +08:00
string db_name = 2 ;
2021-09-28 22:32:13 +08:00
// The collection name in milvus
string collection_name = 3 ;
// The partition name you want to check
string partition_name = 4 ;
2021-01-14 14:24:14 +08:00
}
2021-09-28 22:32:13 +08:00
/ *
* Load specific partitions data of one collection into query nodes
* Then you can get these data as result when you do vector search on this collection.
* /
2021-03-12 14:22:09 +08:00
message LoadPartitionsRequest {
2021-09-28 22:32:13 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// Not useful for now
2021-01-14 14:24:14 +08:00
string db_name = 2 ;
2021-09-28 22:32:13 +08:00
// The collection name in milvus
string collection_name = 3 ;
// The partition names you want to load
repeated string partition_names = 4 ;
2022-04-20 16:15:41 +08:00
// The replicas number you would load, 1 by default
int32 replica_number = 5 ;
2021-01-14 14:24:14 +08:00
}
2021-09-28 22:32:13 +08:00
/ *
* Release specific partitions data of one collection from query nodes.
* Then you can not get these data as result when you do vector search on this collection.
* /
2021-03-12 14:22:09 +08:00
message ReleasePartitionsRequest {
2021-09-28 22:32:13 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// Not useful for now
2021-01-14 20:30:27 +08:00
string db_name = 2 ;
2021-09-28 22:32:13 +08:00
// The collection name in milvus
string collection_name = 3 ;
// The partition names you want to release
repeated string partition_names = 4 ;
2021-01-14 14:24:14 +08:00
}
2021-10-11 21:23:50 +08:00
/ *
* Get partition statistics like row_count.
* /
2021-03-12 14:22:09 +08:00
message GetPartitionStatisticsRequest {
2021-10-11 21:23:50 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// Not useful for now
2021-01-14 20:30:27 +08:00
string db_name = 2 ;
2021-10-11 21:23:50 +08:00
// The collection name in milvus
string collection_name = 3 ;
// The partition name you want to collect statistics
2022-05-28 00:04:01 +08:00
string partition_name = 4 ;
2021-01-14 14:24:14 +08:00
}
2021-03-12 14:22:09 +08:00
message GetPartitionStatisticsResponse {
2021-01-18 21:39:56 +08:00
common.Status status = 1 ;
repeated common.KeyValuePair stats = 2 ;
2021-01-14 14:24:14 +08:00
}
2021-10-13 19:05:12 +08:00
2021-10-11 21:23:50 +08:00
/ *
* List all partitions for particular collection
* /
2021-03-12 14:22:09 +08:00
message ShowPartitionsRequest {
2021-10-11 21:23:50 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// Not useful for now
2021-01-14 20:30:27 +08:00
string db_name = 2 ;
2021-10-11 21:23:50 +08:00
// The collection name you want to describe, you can pass collection_name or collectionID
string collection_name = 3 ;
// The collection id in milvus
2021-01-18 19:32:08 +08:00
int64 collectionID = 4 ;
2021-10-11 21:23:50 +08:00
// When type is InMemory, will return these patitions's inMemory_percentages.(Optional)
repeated string partition_names = 5 ;
// Decide return Loaded partitions or All partitions(Optional)
2021-08-02 22:39:25 +08:00
ShowType type = 6 ;
2021-01-14 14:24:14 +08:00
}
2021-10-13 19:05:12 +08:00
/ *
* List all partitions for particular collection response.
* The returned datas are all rows , we can format to columns by therir index.
* /
2021-03-12 14:22:09 +08:00
message ShowPartitionsResponse {
2021-10-13 19:05:12 +08:00
// Contain error_code and reason
2021-01-18 21:39:56 +08:00
common.Status status = 1 ;
2021-10-13 19:05:12 +08:00
// All partition names for this collection
2021-01-18 21:39:56 +08:00
repeated string partition_names = 2 ;
2021-10-13 19:05:12 +08:00
// All partition ids for this collection
2021-01-18 21:39:56 +08:00
repeated int64 partitionIDs = 3 ;
2021-10-13 19:05:12 +08:00
// All hybrid timestamps
repeated uint64 created_timestamps = 4 ;
// All utc timestamps calculated by created_timestamps
repeated uint64 created_utc_timestamps = 5 ;
// Load percentage on querynode
repeated int64 inMemory_percentages = 6 ;
2021-01-18 19:32:08 +08:00
}
message DescribeSegmentRequest {
common.MsgBase base = 1 ;
int64 collectionID = 2 ;
int64 segmentID = 3 ;
}
message DescribeSegmentResponse {
common.Status status = 1 ;
int64 indexID = 2 ;
2021-01-28 17:25:43 +08:00
int64 buildID = 3 ;
2021-03-08 15:46:51 +08:00
bool enable_index = 4 ;
2021-12-03 11:29:33 +08:00
int64 fieldID = 5 ;
2021-01-14 14:24:14 +08:00
}
2021-03-12 14:22:09 +08:00
message ShowSegmentsRequest {
2021-01-18 19:32:08 +08:00
common.MsgBase base = 1 ;
int64 collectionID = 2 ;
int64 partitionID = 3 ;
}
2021-03-12 14:22:09 +08:00
message ShowSegmentsResponse {
2021-01-18 19:32:08 +08:00
common.Status status = 1 ;
repeated int64 segmentIDs = 2 ;
}
2021-01-14 14:24:14 +08:00
2021-10-14 18:46:59 +08:00
/ *
* Create index for vector datas
* /
2021-01-14 14:24:14 +08:00
message CreateIndexRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Collection
object_privilege : PrivilegeCreateIndex
object_name_index : 3
} ;
2021-10-14 18:46:59 +08:00
// Not useful for now
2022-05-28 00:04:01 +08:00
common.MsgBase base = 1 ;
2021-10-14 18:46:59 +08:00
// Not useful for now
2021-01-14 20:30:27 +08:00
string db_name = 2 ;
2021-10-14 18:46:59 +08:00
// The particular collection name you want to create index.
string collection_name = 3 ;
// The vector field name in this particular collection
string field_name = 4 ;
// Support keys: index_type,metric_type, params. Different index_type may has different params.
2022-03-21 14:23:24 +08:00
repeated common.KeyValuePair extra_params = 5 ;
// Version before 2.0.2 doesn't contain index_name, we use default index name.
string index_name = 6 ;
2021-01-14 14:24:14 +08:00
}
2021-10-19 11:16:34 +08:00
/ *
2022-05-28 00:04:01 +08:00
* Get created index information.
2021-10-19 11:16:34 +08:00
* Current release of Milvus only supports showing latest built index.
* /
2021-01-14 14:24:14 +08:00
message DescribeIndexRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Collection
object_privilege : PrivilegeIndexDetail
object_name_index : 3
} ;
2021-10-19 11:16:34 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// Not useful for now
2021-01-14 20:30:27 +08:00
string db_name = 2 ;
2021-10-19 11:16:34 +08:00
// The particular collection name in Milvus
string collection_name = 3 ;
// The vector field name in this particular collection
2021-01-14 14:24:14 +08:00
string field_name = 4 ;
2021-10-19 11:16:34 +08:00
// No need to set up for now @2021.06.30
2022-05-28 00:04:01 +08:00
string index_name = 5 ;
2021-01-14 14:24:14 +08:00
}
2021-10-25 19:58:18 +08:00
/ *
* Index informations
* /
2021-01-14 14:24:14 +08:00
message IndexDescription {
2021-10-25 19:58:18 +08:00
// Index name
2021-01-14 14:24:14 +08:00
string index_name = 1 ;
2021-10-25 19:58:18 +08:00
// Index id
2021-03-12 14:22:09 +08:00
int64 indexID = 2 ;
2021-10-25 19:58:18 +08:00
// Will return index_type, metric_type, params(like nlist).
2021-02-08 14:20:29 +08:00
repeated common.KeyValuePair params = 3 ;
2021-10-25 19:58:18 +08:00
// The vector field name
2021-04-27 10:30:55 +08:00
string field_name = 4 ;
2021-01-14 14:24:14 +08:00
}
2021-10-25 19:58:18 +08:00
/ *
* Describe index response
* /
2021-01-14 14:24:14 +08:00
message DescribeIndexResponse {
2021-10-25 19:58:18 +08:00
// Response status
2021-01-18 19:32:08 +08:00
common.Status status = 1 ;
2021-10-25 19:58:18 +08:00
// All index informations, for now only return tha latest index you created for the collection.
2021-01-18 19:32:08 +08:00
repeated IndexDescription index_descriptions = 2 ;
}
2021-11-15 11:25:09 +08:00
/ *
2022-05-28 00:04:01 +08:00
* Get index building progress
2021-11-15 11:25:09 +08:00
* /
2021-04-27 15:46:45 +08:00
message GetIndexBuildProgressRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Collection
object_privilege : PrivilegeIndexDetail
object_name_index : 3
} ;
2021-11-15 11:25:09 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// Not useful for now
2021-04-27 15:46:45 +08:00
string db_name = 2 ;
2021-11-15 11:25:09 +08:00
// The collection name in milvus
string collection_name = 3 ;
// The vector field name in this collection
2021-04-27 15:46:45 +08:00
string field_name = 4 ;
2021-11-15 11:25:09 +08:00
// Not useful for now
string index_name = 5 ;
2021-04-27 15:46:45 +08:00
}
message GetIndexBuildProgressResponse {
common.Status status = 1 ;
int64 indexed_rows = 2 ;
int64 total_rows = 3 ;
}
2021-03-12 14:22:09 +08:00
message GetIndexStateRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Collection
object_privilege : PrivilegeIndexDetail
object_name_index : 3
} ;
2021-05-27 16:34:31 +08:00
common.MsgBase base = 1 ; // must
2021-01-18 19:32:08 +08:00
string db_name = 2 ;
2021-05-27 16:34:31 +08:00
string collection_name = 3 ; // must
2021-01-18 19:32:08 +08:00
string field_name = 4 ;
2021-05-27 16:34:31 +08:00
string index_name = 5 ; // No need to set up for now @2021.06.30
2021-01-18 19:32:08 +08:00
}
2021-03-12 14:22:09 +08:00
message GetIndexStateResponse {
2021-01-18 19:32:08 +08:00
common.Status status = 1 ;
common.IndexState state = 2 ;
2021-07-29 14:47:22 +08:00
string fail_reason = 3 ;
2021-01-14 14:24:14 +08:00
}
2021-02-20 10:14:03 +08:00
message DropIndexRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Collection
object_privilege : PrivilegeDropIndex
object_name_index : 3
} ;
2021-05-27 16:34:31 +08:00
common.MsgBase base = 1 ; // must
2021-02-20 10:14:03 +08:00
string db_name = 2 ;
2021-05-27 16:34:31 +08:00
string collection_name = 3 ; // must
2021-02-20 10:14:03 +08:00
string field_name = 4 ;
2021-05-27 16:34:31 +08:00
string index_name = 5 ; // No need to set up for now @2021.06.30
2021-02-20 10:14:03 +08:00
}
2021-01-14 14:24:14 +08:00
message InsertRequest {
2022-08-04 11:04:34 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Collection
object_privilege : PrivilegeInsert
object_name_index : 3
} ;
2021-06-03 15:03:34 +08:00
common.MsgBase base = 1 ;
2021-01-14 20:30:27 +08:00
string db_name = 2 ;
2021-06-03 15:03:34 +08:00
string collection_name = 3 ;
string partition_name = 4 ;
repeated schema.FieldData fields_data = 5 ;
repeated uint32 hash_keys = 6 ;
2021-06-21 11:42:18 +08:00
uint32 num_rows = 7 ;
2021-01-14 14:24:14 +08:00
}
2021-06-21 11:42:18 +08:00
message MutationResult {
2021-01-18 21:39:56 +08:00
common.Status status = 1 ;
2021-06-21 11:42:18 +08:00
schema.IDs IDs = 2 ; // required for insert, delete
repeated uint32 succ_index = 3 ; // error indexes indicate
repeated uint32 err_index = 4 ; // error indexes indicate
bool acknowledged = 5 ;
int64 insert_cnt = 6 ;
int64 delete_cnt = 7 ;
int64 upsert_cnt = 8 ;
uint64 timestamp = 9 ;
2021-01-15 20:12:26 +08:00
}
2021-08-26 12:15:52 +08:00
message DeleteRequest {
2022-08-04 11:04:34 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Collection
object_privilege : PrivilegeDelete
object_name_index : 3
} ;
2021-08-26 12:15:52 +08:00
common.MsgBase base = 1 ;
string db_name = 2 ;
string collection_name = 3 ;
string partition_name = 4 ;
string expr = 5 ;
2021-10-25 21:20:44 +08:00
repeated uint32 hash_keys = 6 ;
2021-08-26 12:15:52 +08:00
}
2021-01-14 14:24:14 +08:00
message SearchRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Collection
object_privilege : PrivilegeSearch
object_name_index : 3
} ;
2021-05-27 16:34:31 +08:00
common.MsgBase base = 1 ; // must
2021-01-14 20:30:27 +08:00
string db_name = 2 ;
2021-05-27 16:34:31 +08:00
string collection_name = 3 ; // must
repeated string partition_names = 4 ; // must
string dsl = 5 ; // must
2021-01-15 20:12:26 +08:00
// serialized `PlaceholderGroup`
2021-05-27 16:34:31 +08:00
bytes placeholder_group = 6 ; // must
common.DslType dsl_type = 7 ; // must
2021-06-21 20:18:13 +08:00
repeated string output_fields = 8 ;
repeated common.KeyValuePair search_params = 9 ; // must
uint64 travel_timestamp = 10 ;
2021-06-30 21:02:13 +08:00
uint64 guarantee_timestamp = 11 ; // guarantee_timestamp
2022-05-23 16:41:58 +08:00
int64 nq = 12 ;
2021-01-15 20:12:26 +08:00
}
message Hits {
repeated int64 IDs = 1 ;
repeated bytes row_data = 2 ;
repeated float scores = 3 ;
}
2021-01-18 19:32:08 +08:00
message SearchResults {
2021-01-15 20:12:26 +08:00
common.Status status = 1 ;
2021-06-21 20:18:13 +08:00
schema.SearchResultData results = 2 ;
2022-01-27 22:55:41 +08:00
string collection_name = 3 ;
2021-01-14 14:24:14 +08:00
}
message FlushRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Collection
object_privilege : PrivilegeFlush
object_name_indexs : 3
} ;
2021-01-16 15:06:19 +08:00
common.MsgBase base = 1 ;
2021-01-14 14:24:14 +08:00
string db_name = 2 ;
2021-02-03 17:30:10 +08:00
repeated string collection_names = 3 ;
2021-01-15 20:12:26 +08:00
}
2021-06-23 16:56:11 +08:00
message FlushResponse {
common.Status status = 1 ;
string db_name = 2 ;
map < string , schema.LongArray > coll_segIDs = 3 ;
}
2021-06-04 12:02:34 +08:00
message QueryRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Collection
object_privilege : PrivilegeQuery
object_name_index : 3
} ;
2021-06-04 12:02:34 +08:00
common.MsgBase base = 1 ;
string db_name = 2 ;
string collection_name = 3 ;
string expr = 4 ;
repeated string output_fields = 5 ;
repeated string partition_names = 6 ;
2021-08-16 17:06:10 +08:00
uint64 travel_timestamp = 7 ;
uint64 guarantee_timestamp = 8 ; // guarantee_timestamp
2021-06-04 12:02:34 +08:00
}
message QueryResults {
common.Status status = 1 ;
repeated schema.FieldData fields_data = 2 ;
2022-01-27 22:55:41 +08:00
string collection_name = 3 ;
2021-06-04 12:02:34 +08:00
}
2021-07-01 18:56:17 +08:00
message VectorIDs {
string collection_name = 1 ;
string field_name = 2 ;
schema.IDs id_array = 3 ;
repeated string partition_names = 4 ;
}
message VectorsArray {
oneof array {
VectorIDs id_array = 1 ; // vector ids
schema.VectorField data_array = 2 ; // vectors data
2022-05-28 00:04:01 +08:00
}
2021-07-01 18:56:17 +08:00
}
message CalcDistanceRequest {
common.MsgBase base = 1 ;
VectorsArray op_left = 2 ; // vectors on the left of operator
VectorsArray op_right = 3 ; // vectors on the right of operator
repeated common.KeyValuePair params = 4 ; // "metric":"L2"/"IP"/"HAMMIN"/"TANIMOTO"
}
message CalcDistanceResults {
common.Status status = 1 ;
// num(op_left)*num(op_right) distance values, "HAMMIN" return integer distance
oneof array {
schema.IntArray int_dist = 2 ;
schema.FloatArray float_dist = 3 ;
}
}
2021-02-03 18:55:00 +08:00
message PersistentSegmentInfo {
int64 segmentID = 1 ;
int64 collectionID = 2 ;
int64 partitionID = 3 ;
2021-05-21 14:51:25 +08:00
int64 num_rows = 4 ;
common.SegmentState state = 5 ;
2021-02-03 18:55:00 +08:00
}
2021-03-12 14:22:09 +08:00
message GetPersistentSegmentInfoRequest {
2021-05-27 16:34:31 +08:00
common.MsgBase base = 1 ; // must
2021-02-03 18:55:00 +08:00
string dbName = 2 ;
2021-05-27 16:34:31 +08:00
string collectionName = 3 ; // must
2021-02-03 18:55:00 +08:00
}
2021-03-12 14:22:09 +08:00
message GetPersistentSegmentInfoResponse {
2021-02-03 18:55:00 +08:00
common.Status status = 1 ;
repeated PersistentSegmentInfo infos = 2 ;
}
2021-02-04 14:37:12 +08:00
message QuerySegmentInfo {
int64 segmentID = 1 ;
int64 collectionID = 2 ;
int64 partitionID = 3 ;
int64 mem_size = 4 ;
int64 num_rows = 5 ;
string index_name = 6 ;
int64 indexID = 7 ;
2022-05-20 18:03:58 +08:00
// deprecated, check node_ids(NodeIds) field
2021-10-27 19:28:21 +08:00
int64 nodeID = 8 ;
common.SegmentState state = 9 ;
2022-05-20 18:03:58 +08:00
repeated int64 nodeIds = 10 ;
2021-02-04 14:37:12 +08:00
}
2021-03-12 14:22:09 +08:00
message GetQuerySegmentInfoRequest {
2021-05-27 16:34:31 +08:00
common.MsgBase base = 1 ; // must
2021-02-04 14:37:12 +08:00
string dbName = 2 ;
2021-05-27 16:34:31 +08:00
string collectionName = 3 ; // must
2021-02-04 14:37:12 +08:00
}
2021-03-12 14:22:09 +08:00
message GetQuerySegmentInfoResponse {
2021-02-04 14:37:12 +08:00
common.Status status = 1 ;
repeated QuerySegmentInfo infos = 2 ;
}
2021-05-25 14:44:43 +08:00
message DummyRequest {
string request_type = 1 ;
}
message DummyResponse {
string response = 1 ;
}
2021-02-03 18:55:00 +08:00
2021-03-12 14:22:09 +08:00
message RegisterLinkRequest {
2021-01-15 20:12:26 +08:00
}
2021-01-22 12:57:23 +08:00
message RegisterLinkResponse {
common.Address address = 1 ;
common.Status status = 2 ;
}
2021-08-17 10:06:11 +08:00
message GetMetricsRequest {
common.MsgBase base = 1 ;
string request = 2 ; // request is of jsonic format
}
message GetMetricsResponse {
common.Status status = 1 ;
string response = 2 ; // response is of jsonic format
string component_name = 3 ; // metrics from which component
}
2021-11-06 16:54:59 +08:00
/ *
* Do load balancing operation from src_nodeID to dst_nodeID.
* /
message LoadBalanceRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Collection
object_privilege : PrivilegeLoadBalance
object_name_index : 5
} ;
2021-11-06 16:54:59 +08:00
common.MsgBase base = 1 ;
int64 src_nodeID = 2 ;
repeated int64 dst_nodeIDs = 3 ;
repeated int64 sealed_segmentIDs = 4 ;
2022-04-20 16:15:41 +08:00
string collectionName = 5 ;
2021-11-06 16:54:59 +08:00
}
2021-11-09 14:47:02 +08:00
message ManualCompactionRequest {
2022-08-04 11:04:34 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Collection
object_privilege : PrivilegeCompaction
object_name_index : 1
} ;
2021-11-09 14:47:02 +08:00
int64 collectionID = 1 ;
uint64 timetravel = 2 ;
}
message ManualCompactionResponse {
common.Status status = 1 ;
int64 compactionID = 2 ;
}
message GetCompactionStateRequest {
int64 compactionID = 1 ;
}
message GetCompactionStateResponse {
common.Status status = 1 ;
common.CompactionState state = 2 ;
int64 executingPlanNo = 3 ;
int64 timeoutPlanNo = 4 ;
int64 completedPlanNo = 5 ;
}
message GetCompactionPlansRequest {
int64 compactionID = 1 ;
}
message GetCompactionPlansResponse {
common.Status status = 1 ;
common.CompactionState state = 2 ;
repeated CompactionMergeInfo mergeInfos = 3 ;
}
message CompactionMergeInfo {
repeated int64 sources = 1 ;
int64 target = 2 ;
}
2021-11-23 10:55:14 +08:00
message GetFlushStateRequest {
repeated int64 segmentIDs = 1 ;
}
message GetFlushStateResponse {
common.Status status = 1 ;
bool flushed = 2 ;
}
2022-03-09 18:33:59 +08:00
message ImportRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Collection
object_privilege : PrivilegeImport
object_name_index : 1
} ;
2022-04-12 13:25:34 +08:00
string collection_name = 1 ; // target collection
string partition_name = 2 ; // target partition
repeated string channel_names = 3 ; // channel names for the collection
bool row_based = 4 ; // the file is row-based or column-based
repeated string files = 5 ; // file paths to be imported
repeated common.KeyValuePair options = 6 ; // import options, bucket, etc.
2022-03-09 18:33:59 +08:00
}
2022-05-28 00:04:01 +08:00
2022-03-09 18:33:59 +08:00
message ImportResponse {
common.Status status = 1 ;
repeated int64 tasks = 2 ; // id array of import tasks
}
2022-05-28 00:04:01 +08:00
2022-03-09 18:33:59 +08:00
message GetImportStateRequest {
int64 task = 1 ; // id of an import task
}
2022-05-28 00:04:01 +08:00
2022-03-09 18:33:59 +08:00
message GetImportStateResponse {
common.Status status = 1 ;
2022-05-12 19:23:53 +08:00
common.ImportState state = 2 ; // is this import task finished or not
int64 row_count = 3 ; // if the task is finished, this value is how many rows are imported. if the task is not finished, this value is how many rows are parsed. return 0 if failed.
repeated int64 id_list = 4 ; // auto generated ids if the primary key is autoid
repeated common.KeyValuePair infos = 5 ; // more information about the task, progress percent, file path, failed reason, etc.
int64 id = 6 ; // id of an import task
2022-06-15 12:20:10 +08:00
bool data_queryable = 7 ; // A flag indicating whether import data are queryable (i.e. loaded in query nodes)
bool data_indexed = 8 ; // A flag indicating whether import data are indexed.
2022-03-09 18:33:59 +08:00
}
2022-04-25 17:37:46 +08:00
message ListImportTasksRequest {
}
message ListImportTasksResponse {
common.Status status = 1 ;
2022-04-28 17:21:47 +08:00
repeated GetImportStateResponse tasks = 2 ; // list of all import tasks
2022-04-25 17:37:46 +08:00
}
2022-04-06 14:57:31 +08:00
message GetReplicasRequest {
common.MsgBase base = 1 ;
int64 collectionID = 2 ;
bool with_shard_nodes = 3 ;
}
message GetReplicasResponse {
common.Status status = 1 ;
repeated ReplicaInfo replicas = 2 ;
}
message ReplicaInfo { // ReplicaGroup
int64 replicaID = 1 ;
int64 collectionID = 2 ;
repeated int64 partition_ids = 3 ; // empty indicates to load collection
repeated ShardReplica shard_replicas = 4 ;
repeated int64 node_ids = 5 ; // include leaders
}
message ShardReplica {
int64 leaderID = 1 ;
string leader_addr = 2 ; // IP:port
string dm_channel_name = 3 ;
// optional, DO NOT save it in meta, set it only for GetReplicas()
// if with_shard_nodes is true
2022-04-11 19:49:34 +08:00
repeated int64 node_ids = 4 ;
2022-04-06 14:57:31 +08:00
}
2021-01-22 12:57:23 +08:00
service ProxyService {
2021-03-12 14:22:09 +08:00
rpc RegisterLink ( RegisterLinkRequest ) returns ( RegisterLinkResponse ) { }
2021-09-18 11:13:51 +08:00
}
2022-04-06 14:57:31 +08:00
2022-04-11 19:49:34 +08:00
// https://wiki.lfaidata.foundation/display/MIL/MEP+27+--+Support+Basic+Authentication
message CreateCredentialRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Global
object_privilege : PrivilegeCreateOwnership
object_name_index : - 1
} ;
2022-04-11 19:49:34 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// username
string username = 2 ;
// ciphertext password
string password = 3 ;
// create time
uint64 created_utc_timestamps = 4 ;
// modify time
uint64 modified_utc_timestamps = 5 ;
}
2022-04-19 16:35:39 +08:00
message UpdateCredentialRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : User
object_privilege : PrivilegeUpdateUser
object_name_index : 2
} ;
2022-04-19 16:35:39 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// username
string username = 2 ;
// old password
string oldPassword = 3 ;
// new password
string newPassword = 4 ;
// create time
uint64 created_utc_timestamps = 5 ;
// modify time
uint64 modified_utc_timestamps = 6 ;
}
2022-04-11 19:49:34 +08:00
message DeleteCredentialRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Global
object_privilege : PrivilegeDropOwnership
object_name_index : - 1
} ;
2022-04-11 19:49:34 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// Not useful for now
string username = 2 ;
}
message ListCredUsersResponse {
// Contain error_code and reason
common.Status status = 1 ;
// username array
repeated string usernames = 2 ;
}
message ListCredUsersRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Global
object_privilege : PrivilegeSelectOwnership
object_name_index : - 1
} ;
2022-04-11 19:49:34 +08:00
// Not useful for now
common.MsgBase base = 1 ;
}
2022-04-20 16:15:41 +08:00
2022-05-28 00:04:01 +08:00
// https://wiki.lfaidata.foundation/display/MIL/MEP+29+--+Support+Role-Based+Access+Control
message RoleEntity {
string name = 1 ;
}
message UserEntity {
string name = 1 ;
}
message CreateRoleRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Global
object_privilege : PrivilegeCreateOwnership
object_name_index : - 1
} ;
2022-05-28 00:04:01 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// role
RoleEntity entity = 2 ;
}
message DropRoleRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Global
object_privilege : PrivilegeDropOwnership
object_name_index : - 1
} ;
2022-05-28 00:04:01 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// role name
string role_name = 2 ;
}
enum OperateUserRoleType {
AddUserToRole = 0 ;
RemoveUserFromRole = 1 ;
}
message OperateUserRoleRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Global
object_privilege : PrivilegeManageOwnership
object_name_index : - 1
} ;
2022-05-28 00:04:01 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// username
string username = 2 ;
// role name
string role_name = 3 ;
// operation type
OperateUserRoleType type = 4 ;
}
message SelectRoleRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Global
object_privilege : PrivilegeSelectOwnership
object_name_index : - 1
} ;
2022-05-28 00:04:01 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// role
RoleEntity role = 2 ;
// include user info
bool include_user_info = 3 ;
}
message RoleResult {
RoleEntity role = 1 ;
repeated UserEntity users = 2 ;
}
message SelectRoleResponse {
// Not useful for now
common.Status status = 1 ;
// role result array
repeated RoleResult results = 2 ;
}
message SelectUserRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : User
object_privilege : PrivilegeSelectUser
object_name_index : 2
} ;
2022-05-28 00:04:01 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// user
UserEntity user = 2 ;
// include user info
bool include_role_info = 3 ;
}
message UserResult {
UserEntity user = 1 ;
repeated RoleEntity roles = 2 ;
}
message SelectUserResponse {
// Not useful for now
common.Status status = 1 ;
// user result array
2022-08-04 11:04:34 +08:00
repeated UserResult results = 2 ;
2022-05-28 00:04:01 +08:00
}
2022-08-04 11:04:34 +08:00
message ObjectEntity {
string name = 1 ;
2022-05-28 00:04:01 +08:00
}
message PrivilegeEntity {
string name = 1 ;
}
message GrantorEntity {
UserEntity user = 1 ;
PrivilegeEntity privilege = 2 ;
}
2022-08-04 11:04:34 +08:00
message GrantPrivilegeEntity {
repeated GrantorEntity entities = 1 ;
}
2022-05-28 00:04:01 +08:00
message GrantEntity {
2022-08-04 11:04:34 +08:00
// role
RoleEntity role = 1 ;
// object
ObjectEntity object = 2 ;
// object name
string object_name = 3 ;
2022-05-28 00:04:01 +08:00
// privilege
GrantorEntity grantor = 4 ;
}
message SelectGrantRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Global
object_privilege : PrivilegeSelectOwnership
object_name_index : - 1
} ;
2022-05-28 00:04:01 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// grant
GrantEntity entity = 2 ;
}
message SelectGrantResponse {
// Not useful for now
common.Status status = 1 ;
// grant info array
repeated GrantEntity entities = 2 ;
}
enum OperatePrivilegeType {
Grant = 0 ;
Revoke = 1 ;
}
message OperatePrivilegeRequest {
2022-08-05 16:28:35 +08:00
option ( common.privilege_ext_obj ) = {
object_type : Global
object_privilege : PrivilegeManageOwnership
object_name_index : - 1
} ;
2022-05-28 00:04:01 +08:00
// Not useful for now
common.MsgBase base = 1 ;
// grant
GrantEntity entity = 2 ;
// operation type
OperatePrivilegeType type = 3 ;
}
message MilvusExt {
string version = 1 ;
}
extend google . protobuf.FileOptions {
MilvusExt milvus_ext_obj = 1001 ;
}
option ( milvus_ext_obj ) = {
version : "2.1.0"
} ;