diff --git a/Protos/V1/sessions_common.proto b/Protos/V1/sessions_common.proto index d84583dfb..15609538e 100644 --- a/Protos/V1/sessions_common.proto +++ b/Protos/V1/sessions_common.proto @@ -105,3 +105,20 @@ message CancelSessionRequest { message CancelSessionResponse { SessionRaw session = 1; /** The session. */ } + +/** + * Request for creating session. + */ +message CreateSessionRequest { + TaskOptions default_task_option = 1; /** Default tasks options for tasks in the session */ + repeated string partition_ids = 2; /** List of partitions allowed during the session */ +} + +/* + Reply after session creation. + We have this reply in case of success. + When the session creation is not successful, there is an rpc exception. +*/ +message CreateSessionReply { + string session_id = 1; /** Session id of the created session if successful */ +} diff --git a/Protos/V1/sessions_service.proto b/Protos/V1/sessions_service.proto index 3675cae12..e44433f3a 100644 --- a/Protos/V1/sessions_service.proto +++ b/Protos/V1/sessions_service.proto @@ -27,4 +27,9 @@ service Sessions { * Cancel a session by its id. */ rpc CancelSession(CancelSessionRequest) returns (CancelSessionResponse) {} + + /** + * Create a session + */ + rpc CreateSession(CreateSessionRequest) returns (CreateSessionReply); }