Edits history of script submission #865 for ' list all available completed jobs (windmill)'

  • nativets
    One script reply has been approved by the moderators
    Ap­pro­ved
    /**
     * list all available completed jobs
     *
     */
    export async function main(
      workspace: string,
      order_desc: string | undefined,
      created_by: string | undefined,
      parent_job: string | undefined,
      script_path_exact: string | undefined,
      script_path_start: string | undefined,
      schedule_path: string | undefined,
      script_hash: string | undefined,
      started_before: string | undefined,
      started_after: string | undefined,
      success: string | undefined,
      job_kinds: string | undefined,
      args: string | undefined,
      result: string | undefined,
      tag: string | undefined,
      is_skipped: string | undefined,
      is_flow_step: string | undefined
    ) {
      const url = new URL(`${BASE_URL}/api/w/${workspace}/jobs/completed/list`);
      for (const [k, v] of [
        ["order_desc", order_desc],
        ["created_by", created_by],
        ["parent_job", parent_job],
        ["script_path_exact", script_path_exact],
        ["script_path_start", script_path_start],
        ["schedule_path", schedule_path],
        ["script_hash", script_hash],
        ["started_before", started_before],
        ["started_after", started_after],
        ["success", success],
        ["job_kinds", job_kinds],
        ["args", args],
        ["result", result],
        ["tag", tag],
        ["is_skipped", is_skipped],
        ["is_flow_step", is_flow_step],
      ]) {
        if (v !== undefined) {
          url.searchParams.append(k, v);
        }
      }
      const response = await fetch(url, {
        method: "GET",
        headers: {
          Authorization: "Bearer " + WM_TOKEN,
        },
        body: undefined,
      });
      return await response.json();
    }
    

    Submitted by hugo697 370 days ago

  • nativets
    /**
     * list all available completed jobs
     *
     */
    export async function main(
      workspace: string,
      order_desc: string | undefined,
      created_by: string | undefined,
      parent_job: string | undefined,
      script_path_exact: string | undefined,
      script_path_start: string | undefined,
      schedule_path: string | undefined,
      script_hash: string | undefined,
      started_before: string | undefined,
      started_after: string | undefined,
      success: string | undefined,
      job_kinds: string | undefined,
      args: string | undefined,
      result: string | undefined,
      tag: string | undefined,
      is_skipped: string | undefined,
      is_flow_step: string | undefined
    ) {
      const url = new URL(`${BASE_URL}/api/w/${workspace}/jobs/completed/list`);
      for (const [k, v] of [
        ["order_desc", order_desc],
        ["created_by", created_by],
        ["parent_job", parent_job],
        ["script_path_exact", script_path_exact],
        ["script_path_start", script_path_start],
        ["schedule_path", schedule_path],
        ["script_hash", script_hash],
        ["started_before", started_before],
        ["started_after", started_after],
        ["success", success],
        ["job_kinds", job_kinds],
        ["args", args],
        ["result", result],
        ["tag", tag],
        ["is_skipped", is_skipped],
        ["is_flow_step", is_flow_step],
      ]) {
        if (v !== undefined) {
          url.searchParams.append(k, v);
        }
      }
      const response = await fetch(url, {
        method: "GET",
        headers: {
          Authorization: "Bearer " + WM_TOKEN,
        },
        body: undefined,
      });
      return await response.json();
    }
    

    Submitted by rubenfiszel 933 days ago

  • nativets
    /**
     * list all available completed jobs
     *
     */
    export async function main(
      workspace: string,
      order_desc: string | undefined,
      created_by: string | undefined,
      parent_job: string | undefined,
      script_path_exact: string | undefined,
      script_path_start: string | undefined,
      schedule_path: string | undefined,
      script_hash: string | undefined,
      started_before: string | undefined,
      started_after: string | undefined,
      success: string | undefined,
      job_kinds: string | undefined,
      args: string | undefined,
      result: string | undefined,
      tag: string | undefined,
      is_skipped: string | undefined,
      is_flow_step: string | undefined,
    ) {
      const url = new URL(`${BASE_URL}/api/w/${workspace}/jobs/completed/list`);
      for (const [k, v] of [
        ["order_desc", order_desc],
        ["created_by", created_by],
        ["parent_job", parent_job],
        ["script_path_exact", script_path_exact],
        ["script_path_start", script_path_start],
        ["schedule_path", schedule_path],
        ["script_hash", script_hash],
        ["started_before", started_before],
        ["started_after", started_after],
        ["success", success],
        ["job_kinds", job_kinds],
        ["args", args],
        ["result", result],
        ["tag", tag],
        ["is_skipped", is_skipped],
        ["is_flow_step", is_flow_step],
      ]) {
        if (v !== undefined) {
          url.searchParams.append(k, v);
        }
      }
      const response = await fetch(url, {
        method: "GET",
        headers: {
          Authorization: "Bearer " + WM_TOKEN,
        },
        body: undefined,
      });
      return await response.json();
    }
    

    Submitted by admin 1003 days ago