get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 813319,
    "url": "http://patchwork.ozlabs.org/api/patches/813319/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/150529835846.10902.5108194050713694092.stgit@frigg.lan/",
    "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": "<150529835846.10902.5108194050713694092.stgit@frigg.lan>",
    "list_archive_url": null,
    "date": "2017-09-13T10:25:58",
    "name": "[v6,08/22] instrument: [hmp] Add library loader",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "aa243b17f907b8a1609beaf13aed221238d7a608",
    "submitter": {
        "id": 9099,
        "url": "http://patchwork.ozlabs.org/api/people/9099/?format=api",
        "name": "Lluís Vilanova",
        "email": "vilanova@ac.upc.edu"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/150529835846.10902.5108194050713694092.stgit@frigg.lan/mbox/",
    "series": [
        {
            "id": 2857,
            "url": "http://patchwork.ozlabs.org/api/series/2857/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2857",
            "date": "2017-09-13T09:53:43",
            "name": "instrument: Add basic event instrumentation",
            "version": 6,
            "mbox": "http://patchwork.ozlabs.org/series/2857/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/813319/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/813319/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@bilbo.ozlabs.org",
        "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xsdBF3lmMz9s7M\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 20:26:45 +1000 (AEST)",
            "from localhost ([::1]:41382 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1ds4sV-0004ZM-JO\n\tfor incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 06:26:43 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:49633)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1ds4s2-0004X9-6u\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 06:26:15 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1ds4rw-000786-UQ\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 06:26:14 -0400",
            "from roura.ac.upc.es ([147.83.33.10]:39954)\n\tby eggs.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <vilanova@ac.upc.edu>) id 1ds4rw-00077S-Iu\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 06:26:08 -0400",
            "from correu-1.ac.upc.es (correu-1.ac.upc.es [147.83.30.91])\n\tby roura.ac.upc.es (8.13.8/8.13.8) with ESMTP id v8DAQ5hI008607;\n\tWed, 13 Sep 2017 12:26:05 +0200",
            "from localhost (unknown [132.68.137.204])\n\tby correu-1.ac.upc.es (Postfix) with ESMTPSA id C522296A;\n\tWed, 13 Sep 2017 12:25:59 +0200 (CEST)"
        ],
        "From": "=?utf-8?b?TGx1w61z?= Vilanova <vilanova@ac.upc.edu>",
        "To": "qemu-devel@nongnu.org",
        "Date": "Wed, 13 Sep 2017 13:25:58 +0300",
        "Message-Id": "<150529835846.10902.5108194050713694092.stgit@frigg.lan>",
        "X-Mailer": "git-send-email 2.14.1",
        "In-Reply-To": "<150529642278.10902.18234057937634437857.stgit@frigg.lan>",
        "References": "<150529642278.10902.18234057937634437857.stgit@frigg.lan>",
        "User-Agent": "StGit/0.18",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "quoted-printable",
        "X-MIME-Autoconverted": "from 8bit to quoted-printable by roura.ac.upc.es id\n\tv8DAQ5hI008607",
        "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy]",
        "X-Received-From": "147.83.33.10",
        "Subject": "[Qemu-devel] [PATCH v6 08/22] instrument: [hmp] Add library loader",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.21",
        "Precedence": "list",
        "List-Id": "<qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<http://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\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Cc": "\"Emilio G. Cota\" <cota@braap.org>, Markus Armbruster <armbru@redhat.com>,\n\tStefan Hajnoczi <stefanha@redhat.com>,\n\t\"Dr. David Alan Gilbert\" <dgilbert@redhat.com>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"
    },
    "content": "Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>\n---\n hmp-commands.hx |   32 ++++++++++++++++++++++++++++++++\n monitor.c       |   39 +++++++++++++++++++++++++++++++++++++++\n 2 files changed, 71 insertions(+)",
    "diff": "diff --git a/hmp-commands.hx b/hmp-commands.hx\nindex 1941e19932..2e8ebe8422 100644\n--- a/hmp-commands.hx\n+++ b/hmp-commands.hx\n@@ -1858,6 +1858,38 @@ ETEXI\n         .sub_table  = info_cmds,\n     },\n \n+#ifdef CONFIG_INSTRUMENT\n+    {\n+        .name       = \"instr-load\",\n+        .args_type  = \"path:F,id:s?,arg:s?\",\n+        .params     = \"path [id] [arg]\",\n+        .help       = \"load an instrumentation library\",\n+        .cmd        = hmp_instr_load,\n+    },\n+#endif\n+\n+STEXI\n+@item instr-load @var{path} [@var{id}] [@var{arg}]\n+@findex instr-load\n+Load an instrumentation library.\n+ETEXI\n+\n+#ifdef CONFIG_INSTRUMENT\n+    {\n+        .name       = \"instr-unload\",\n+        .args_type  = \"id:s\",\n+        .params     = \"id\",\n+        .help       = \"unload an instrumentation library\",\n+        .cmd        = hmp_instr_unload,\n+    },\n+#endif\n+\n+STEXI\n+@item instr-unload\n+@findex instr-unload\n+Unload an instrumentation library.\n+ETEXI\n+\n STEXI\n @end table\n ETEXI\ndiff --git a/monitor.c b/monitor.c\nindex e031aa2687..7b80d5351f 100644\n--- a/monitor.c\n+++ b/monitor.c\n@@ -2323,6 +2323,45 @@ int monitor_fd_param(Monitor *mon, const char *fdname, Error **errp)\n     return fd;\n }\n \n+#ifdef CONFIG_INSTRUMENT\n+static void hmp_instr_load(Monitor *mon, const QDict *qdict)\n+{\n+    Error *err = NULL;\n+    const char *path = qdict_get_str(qdict, \"path\");\n+    const char *id = qdict_get_try_str(qdict, \"id\");\n+    const char *str = qdict_get_try_str(qdict, \"arg\");\n+    strList args;\n+\n+    args.value = (char *)str;\n+    args.next = NULL;\n+\n+    InstrLoadResult *res = qmp_instr_load(path,\n+                                          id != NULL, id,\n+                                          args.value != NULL, &args,\n+                                          &err);\n+    if (err) {\n+        error_report_err(err);\n+    } else {\n+        monitor_printf(mon, \"Handle: %s\\n\", res->id);\n+        monitor_printf(mon, \"OK\\n\");\n+    }\n+    qapi_free_InstrLoadResult(res);\n+}\n+\n+static void hmp_instr_unload(Monitor *mon, const QDict *qdict)\n+{\n+    Error *err = NULL;\n+    const char *id = qdict_get_str(qdict, \"id\");\n+\n+    qmp_instr_unload(id, &err);\n+    if (err) {\n+        error_report_err(err);\n+    } else {\n+        monitor_printf(mon, \"OK\\n\");\n+    }\n+}\n+#endif\n+\n /* Please update hmp-commands.hx when adding or changing commands */\n static mon_cmd_t info_cmds[] = {\n #include \"hmp-commands-info.h\"\n",
    "prefixes": [
        "v6",
        "08/22"
    ]
}