## Get logs and status from instance `client.workflows.instances.get(stringinstanceID, InstanceGetParamsparams, RequestOptionsoptions?): InstanceGetResponse` **get** `/accounts/{account_id}/workflows/{workflow_name}/instances/{instance_id}` Retrieves logs and execution status for a specific workflow instance. ### Parameters - `instanceID: string` Instance identifier. User-created instances match `^[a-zA-Z0-9_][a-zA-Z0-9-_]*$` (max 100 characters); cron-triggered instances can use a longer, system-generated id derived from the cron expression. - `params: InstanceGetParams` - `account_id: string` Path param - `workflow_name: string` Path param - `order?: "asc" | "desc"` Query param: Step ordering: "asc" (default, oldest first) or "desc" (newest first). - `"asc"` - `"desc"` - `simple?: "true" | "false"` Query param: When true, omits step details and returns only metadata with step_count. - `"true"` - `"false"` ### Returns - `InstanceGetResponse` - `end: string | null` - `error: Error | null` - `message: string` - `name: string` - `output: string | number` - `string` - `number` - `params: unknown` - `queued: string` - `rollback: Rollback | null` - `error: Error | null` - `message: string` - `name: string` - `outcome: "complete" | "failed"` - `"complete"` - `"failed"` - `start: string | null` - `status: "queued" | "running" | "paused" | 6 more` - `"queued"` - `"running"` - `"paused"` - `"errored"` - `"terminated"` - `"complete"` - `"waitingForPause"` - `"waiting"` - `"rollingBack"` - `step_count: number` - `steps: Array` - `UnionMember0` - `attempts: Array` - `end: string | null` - `error: Error | null` - `message: string` - `name: string` - `start: string` - `success: boolean | null` - `config: Config` - `retries: Retries` - `delay: string | number` Specifies the delay duration. '[dynamic]' indicates the delay is computed by a user-supplied function. - `string` - `number` - `limit: number` - `backoff?: "constant" | "linear" | "exponential"` - `"constant"` - `"linear"` - `"exponential"` - `timeout: string | number` Specifies the timeout duration. - `string` - `number` - `sensitive?: "output"` When set to 'output', step output is redacted from log and step output responses. - `"output"` - `end: string | null` - `name: string` - `output: string | null` - `start: string` - `success: boolean | null` - `type: "step" | "rollback"` - `"step"` - `"rollback"` - `UnionMember1` - `end: string` - `error: Error | null` - `message: string` - `name: string` - `finished: boolean` - `name: string` - `start: string` - `type: "sleep"` - `"sleep"` - `UnionMember2` - `trigger: Trigger` - `source: string` - `type: "termination"` - `"termination"` - `UnionMember3` - `end: string` - `error: Error | null` - `message: string` - `name: string` - `finished: boolean` - `name: string` - `start: string` - `type: "waitForEvent"` - `"waitForEvent"` - `event_type?: string` - `output?: string` - `success: boolean | null` - `trigger: Trigger` - `source: "unknown" | "api" | "binding" | 2 more` - `"unknown"` - `"api"` - `"binding"` - `"event"` - `"cron"` - `versionId: string` - `schedule?: Schedule` - `cron: string` - `scheduledTime: number` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const instance = await client.workflows.instances.get('x', { account_id: 'account_id', workflow_name: 'x', }); console.log(instance.end); ``` #### Response ```json { "errors": [ { "code": 0, "message": "message" } ], "messages": [ { "code": 0, "message": "message" } ], "result": { "end": "2019-12-27T18:11:19.117Z", "error": { "message": "message", "name": "name" }, "output": "string", "params": {}, "queued": "2019-12-27T18:11:19.117Z", "rollback": { "error": { "message": "message", "name": "name" }, "outcome": "complete" }, "start": "2019-12-27T18:11:19.117Z", "status": "queued", "step_count": 0, "steps": [ { "attempts": [ { "end": "2019-12-27T18:11:19.117Z", "error": { "message": "message", "name": "name" }, "start": "2019-12-27T18:11:19.117Z", "success": true } ], "config": { "retries": { "delay": "string", "limit": 0, "backoff": "constant" }, "timeout": "string", "sensitive": "output" }, "end": "2019-12-27T18:11:19.117Z", "name": "name", "output": "output", "start": "2019-12-27T18:11:19.117Z", "success": true, "type": "step" } ], "success": true, "trigger": { "source": "unknown" }, "versionId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "schedule": { "cron": "cron", "scheduledTime": 0 } }, "success": true, "result_info": { "count": 0, "per_page": 0, "total_count": 0, "cursor": "cursor", "page": 0, "total_pages": 0 } } ```