def list_workspace_files(client, workspace=None, filename=None):
    """Get a list of files in a workspace on the active server.

    Args:
        client (obj):
            creopyson Client
        workspace (str, optionnal):
            Workspace name. Default is current workspace.
        filename (str, optional):
            File name or search. Default is all files.
            ex: `*.asm`, `screw_*.prt`

    Returns:
        list: List of files in the workspace correspnding to the data.

    """
    active_workspace = client.windchill_get_workspace()
    data = {"workspace": active_workspace, "filename": "*"}
    if workspace:
        data["workspace"] = workspace
    if filename:
        data["filename"] = filename
    return client._creoson_post("windchill", "list_workspace_files", data, "filelist")