diff --git a/packages/dbos-cloud/applications/manage-workflows.ts b/packages/dbos-cloud/applications/manage-workflows.ts index d82ce7f4b..c47647c44 100644 --- a/packages/dbos-cloud/applications/manage-workflows.ts +++ b/packages/dbos-cloud/applications/manage-workflows.ts @@ -2,6 +2,7 @@ import axios, { AxiosError } from "axios"; import { handleAPIErrors, getCloudCredentials, getLogger, isCloudAPIErrorResponse, retrieveApplicationName } from "../cloudutils.js"; export interface ListWorkflowsInput { + workflow_uuids?: string[] // Specific workflow UUIDs to retrieve. workflow_name?: string; // The name of the workflow function authenticated_user?: string; // The user who ran the workflow. start_time?: string; // Timestamp in ISO 8601 format diff --git a/packages/dbos-cloud/cli.ts b/packages/dbos-cloud/cli.ts index f476c32ac..3ff8c991d 100755 --- a/packages/dbos-cloud/cli.ts +++ b/packages/dbos-cloud/cli.ts @@ -395,14 +395,16 @@ workflowCommands .description('List workflows from your application') .argument("[string]", "application name (Default: name from package.json)") .option('-l, --limit ', 'Limit the results returned', "10") - .option('-u, --user ', 'Retrieve workflows run by this user') + .option('-u, --workflowUUIDs ', 'Retrieve specific UUIDs') + .option('-U, --user ', 'Retrieve workflows run by this user') .option('-s, --start-time ', 'Retrieve workflows starting after this timestamp (ISO 8601 format)') .option('-e, --end-time ', 'Retrieve workflows starting before this timestamp (ISO 8601 format)') .option('-S, --status ', 'Retrieve workflows with this status (PENDING, SUCCESS, ERROR, RETRIES_EXCEEDED, or CANCELLED)') .option('-v, --application-version ', 'Retrieve workflows with this application version') - .action(async (appName: string | undefined, options: { limit?: string, appDir?: string, user?: string, startTime?: string, endTime?: string, status?: string, applicationVersion?: string }) => { + .action(async (appName: string | undefined, options: { limit?: string, appDir?: string, user?: string, startTime?: string, endTime?: string, status?: string, applicationVersion?: string, workflow_uuids?: string[] }) => { const input: ListWorkflowsInput = { limit: Number(options.limit), + workflow_uuids: options.workflow_uuids, authenticated_user: options.user, start_time: options.startTime, end_time: options.endTime,