Skip to content
Snippets Groups Projects
Commit 7e9019f5 authored by Joscha Schmiedt's avatar Joscha Schmiedt
Browse files

Add auth_token to ExecuteScriptRequest and remove ideas for later releases

parent 56206910
No related branches found
No related tags found
1 merge request!13Add server-side scripting to gRPC API
......@@ -21,6 +21,8 @@ syntax = "proto3";
package caosdb.scripting.v1alpha1;
import "google/protobuf/timestamp.proto";
option java_multiple_files = true;
option java_package = "org.caosdb.api.scripting.v1alpha1";
......@@ -40,10 +42,12 @@ message ExecuteScriptRequest {
repeated string positional_arguments = 3;
// The named arguments for the script
repeated NamedArgument named_arguments = 4;
// The files to be used by the script (will be uploaded to the server)
// The files to be used by the script (will be uploaded to the server, not implemented yet)
repeated string script_files = 5;
// IDEA: Whether the script should be executed asynchronously
bool run_async = 6;
// The authentication token for the script execution. Will be generated by server if empty.
string auth_token = 6;
// Whether the script should be executed asynchronously (not implemented yet)
bool run_async = 7;
}
enum ScriptExecutionResult {
......@@ -90,27 +94,15 @@ message ExecuteScriptResponse {
string stdout = 5;
// The standard error of the script
string stderr = 6;
// IDEA: The user who executed the script
string executing_user = 7;
// IDEA: The date and time when the script was started
string execution_start_datetime = 8;
// IDEA: The date and time when the script was finished
string execution_end_datetime = 9;
// IDEA: The duration of the script execution
string execution_duration = 10;
// IDEA: Return a list of files created by the script. These files will be available for download.
// The files will be deleted after a certain time? How should the server know about
// about these?
repeated string created_files = 11;
// The start time of the script execution
google.protobuf.Timestamp start_time = 7;
// The end time of the script execution (empty if the script is still running)
google.protobuf.Timestamp end_time = 8;
// The duration of the script execution in milliseconds (zero if the script is still running)
int64 duration_ms = 9;
}
service ServerSideScriptingService {
// Executes a script on the server side
rpc ExecuteScript(ExecuteScriptRequest) returns (ExecuteScriptResponse) {}
// IDEA: Get the status of a script execution
rpc GetScriptExecutionStatus(ScriptExecutionId) returns (ExecuteScriptResponse) {}
// IDEA: Delete temp files (only for admins?)
// rpc DeleteTempFiles(DeleteTempFilesRequest) returns (DeleteTempFilesResponse) {}
// IDEA: Wait for a script execution to finish
// rpc WaitForScriptExecution(ScriptExecutionId, TimeoutDuration) returns (ExecuteScriptResponse) {}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment