get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2224805/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2224805,
    "url": "http://patchwork.ozlabs.org/api/patches/2224805/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260418133927.43012-1-AlanoSong@163.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260418133927.43012-1-AlanoSong@163.com>",
    "list_archive_url": null,
    "date": "2026-04-18T13:39:27",
    "name": "monitor: Add `clear` command",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "cdc5eba33a1fc6208fe6495d36aa0580ba01e756",
    "submitter": {
        "id": 92155,
        "url": "http://patchwork.ozlabs.org/api/people/92155/?format=api",
        "name": "Alano Song",
        "email": "AlanoSong@163.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260418133927.43012-1-AlanoSong@163.com/mbox/",
    "series": [
        {
            "id": 500466,
            "url": "http://patchwork.ozlabs.org/api/series/500466/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=500466",
            "date": "2026-04-18T13:39:27",
            "name": "monitor: Add `clear` command",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/500466/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2224805/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2224805/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=163.com header.i=@163.com header.a=rsa-sha256\n header.s=s110527 header.b=ZngS70lR;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fyjsL1J1Bz1yHl\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 19 Apr 2026 06:24:36 +1000 (AEST)",
            "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wECCS-00018s-9I; Sat, 18 Apr 2026 16:23:32 -0400",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <alanosong@163.com>) id 1wE5tt-0008OU-Jn\n for qemu-devel@nongnu.org; Sat, 18 Apr 2026 09:39:58 -0400",
            "from m16.mail.163.com ([117.135.210.4])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <alanosong@163.com>) id 1wE5tl-00015p-Sj\n for qemu-devel@nongnu.org; Sat, 18 Apr 2026 09:39:57 -0400",
            "from alano.. (unknown [])\n by gzga-smtp-mtada-g1-1 (Coremail) with SMTP id\n _____wAnbwyRieNpZgJ8AQ--.38013S2;\n Sat, 18 Apr 2026 21:39:29 +0800 (CST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;\n s=s110527; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=S+\n 1HLW44bNI9f/DBkTRy2j11jyEQ6a4jbbdW2UT62Bc=; b=ZngS70lRconlWRP7vF\n 5J95qJi/YBVpXD3gjR207brwPRu5Yb527LrX8bhbM0/580Q1pWNDiyvs1Aaoa0ed\n UJKkf8jERbzQjS1kKzCD1dJRDYwNxbpSN2k5UsNsVUajrLHllxbqZkTGVLElaYFf\n UtYbL5h7YgaUnoGsFY3yCUWbo=",
        "From": "AlanoSong@163.com",
        "To": "qemu-devel@nongnu.org",
        "Cc": "dave@treblig.org,\n\tpbonzini@redhat.com,\n\tAlano Song <AlanoSong@163.com>",
        "Subject": "[PATCH] monitor: Add `clear` command",
        "Date": "Sat, 18 Apr 2026 21:39:27 +0800",
        "Message-ID": "<20260418133927.43012-1-AlanoSong@163.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-CM-TRANSID": "_____wAnbwyRieNpZgJ8AQ--.38013S2",
        "X-Coremail-Antispam": "1Uf129KBjvJXoW7CFy8KFyfKrWUuw4rWr4xtFb_yoW8uryDpr\n s3trWrK3y8J3W3ur18Jr9xXF15CrZ7uFZFkFn8Z3s8AF98Jw1Iva1DKr1jk3ZxZrWxKFyS\n vFy2qrWDGa9Fqr7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0pR_9NcUUUUU=",
        "X-Originating-IP": "[240e:36f:15d3:7310:8613:2c33:e4f6:6535]",
        "X-CM-SenderInfo": "xdod00pvrqwqqrwthudrp/xtbC9RLZ7WnjiZJ71QAA3s",
        "Received-SPF": "pass client-ip=117.135.210.4; envelope-from=alanosong@163.com;\n helo=m16.mail.163.com",
        "X-Spam_score_int": "-20",
        "X-Spam_score": "-2.1",
        "X-Spam_bar": "--",
        "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,\n SPF_HELO_NONE=0.001, SPF_PASS=-0.001,\n UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no",
        "X-Spam_action": "no action",
        "X-Mailman-Approved-At": "Sat, 18 Apr 2026 16:23:25 -0400",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "qemu development <qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"
    },
    "content": "The monitor screen can be cluttered after executing commands\nlike `info qtree`. It is useful to have a command to clear\ncurrent screen, just like linux `clear` command do.\n\nThis patch has been tested under monitors using stdio, vc,\ntcp socket, unix socket and serial interfaces.\n\nSigned-off-by: Alano Song <AlanoSong@163.com>\n---\n hmp-commands.hx       | 14 ++++++++++++++\n include/monitor/hmp.h |  1 +\n monitor/hmp-cmds.c    |  5 +++++\n 3 files changed, 20 insertions(+)",
    "diff": "diff --git a/hmp-commands.hx b/hmp-commands.hx\nindex 5cc4788f12..95f9166732 100644\n--- a/hmp-commands.hx\n+++ b/hmp-commands.hx\n@@ -20,6 +20,20 @@ SRST\n   Show the help for all commands or just for command *cmd*.\n ERST\n \n+    {\n+        .name       = \"clear\",\n+        .args_type  = \"\",\n+        .params     = \"\",\n+        .help       = \"clear the monitor screen\",\n+        .cmd        = hmp_clear,\n+        .flags      = \"p\",\n+    },\n+\n+SRST\n+``clear``\n+  Clear the monitor screen.\n+ERST\n+\n     {\n         .name       = \"commit\",\n         .args_type  = \"device:B\",\ndiff --git a/include/monitor/hmp.h b/include/monitor/hmp.h\nindex e222bea60c..9b66458d21 100644\n--- a/include/monitor/hmp.h\n+++ b/include/monitor/hmp.h\n@@ -165,6 +165,7 @@ void hmp_trace_event(Monitor *mon, const QDict *qdict);\n void hmp_trace_file(Monitor *mon, const QDict *qdict);\n void hmp_info_trace_events(Monitor *mon, const QDict *qdict);\n void hmp_help(Monitor *mon, const QDict *qdict);\n+void hmp_clear(Monitor *mon, const QDict *qdict);\n void hmp_info_help(Monitor *mon, const QDict *qdict);\n void hmp_info_sync_profile(Monitor *mon, const QDict *qdict);\n void hmp_info_history(Monitor *mon, const QDict *qdict);\ndiff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c\nindex bc26b39d70..3e9485478e 100644\n--- a/monitor/hmp-cmds.c\n+++ b/monitor/hmp-cmds.c\n@@ -218,6 +218,11 @@ void hmp_help(Monitor *mon, const QDict *qdict)\n     hmp_help_cmd(mon, qdict_get_try_str(qdict, \"name\"));\n }\n \n+void hmp_clear(Monitor *mon, const QDict *qdict)\n+{\n+    monitor_printf(mon, \"\\x1b[3J\\x1b[2J\\x1b[H\");\n+}\n+\n void hmp_info_help(Monitor *mon, const QDict *qdict)\n {\n     hmp_help_cmd(mon, \"info\");\n",
    "prefixes": []
}