@@ -110,7 +110,7 @@ func workflowStatusToUTC(ws WorkflowStatus) map[string]any {
110110 result := map [string ]any {
111111 "WorkflowUUID" : ws .ID ,
112112 "Status" : ws .Status ,
113- "Name" : ws .Name ,
113+ "WorkflowName" : ws .Name ,
114114 "AuthenticatedUser" : ws .AuthenticatedUser ,
115115 "AssumedRole" : ws .AssumedRole ,
116116 "AuthenticatedRoles" : ws .AuthenticatedRoles ,
@@ -387,8 +387,20 @@ func newAdminServer(ctx *dbosContext, port int) *adminServer {
387387 return
388388 }
389389
390+ // Transform to snake_case format with function_id and function_name
391+ formattedSteps := make ([]map [string ]any , len (steps ))
392+ for i , step := range steps {
393+ formattedSteps [i ] = map [string ]any {
394+ "function_id" : step .StepID ,
395+ "function_name" : step .StepName ,
396+ "output" : step .Output ,
397+ "error" : step .Error ,
398+ "child_workflow_id" : step .ChildWorkflowID ,
399+ }
400+ }
401+
390402 w .Header ().Set ("Content-Type" , "application/json" )
391- if err := json .NewEncoder (w ).Encode (steps ); err != nil {
403+ if err := json .NewEncoder (w ).Encode (formattedSteps ); err != nil {
392404 ctx .logger .Error ("Error encoding steps response" , "error" , err )
393405 http .Error (w , fmt .Sprintf ("Failed to encode response: %v" , err ), http .StatusInternalServerError )
394406 }
0 commit comments