get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 122587,
    "url": "http://patches.dpdk.org/api/patches/122587/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230126182344.90635-3-stephen@networkplumber.org/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20230126182344.90635-3-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230126182344.90635-3-stephen@networkplumber.org",
    "date": "2023-01-26T18:23:43",
    "name": "[2/3] dumpcap: support temp-dir option",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "c580a8ebb937e0e5e5576f740bb58a93c68276ce",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230126182344.90635-3-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 26663,
            "url": "http://patches.dpdk.org/api/series/26663/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=26663",
            "date": "2023-01-26T18:23:41",
            "name": "dumpcap: small enhancements",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/26663/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/122587/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/122587/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 3F16B42495;\n\tThu, 26 Jan 2023 19:24:00 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 980B242D68;\n\tThu, 26 Jan 2023 19:23:52 +0100 (CET)",
            "from mail-pg1-f182.google.com (mail-pg1-f182.google.com\n [209.85.215.182])\n by mails.dpdk.org (Postfix) with ESMTP id 8B5B9400D7\n for <dev@dpdk.org>; Thu, 26 Jan 2023 19:23:48 +0100 (CET)",
            "by mail-pg1-f182.google.com with SMTP id 36so1620175pgp.10\n for <dev@dpdk.org>; Thu, 26 Jan 2023 10:23:48 -0800 (PST)",
            "from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218])\n by smtp.gmail.com with ESMTPSA id\n r30-20020aa79ede000000b00582388bd80csm1139852pfq.83.2023.01.26.10.23.46\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 26 Jan 2023 10:23:47 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20210112.gappssmtp.com; s=20210112;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=7TbAFoTJtQwAUYoiyidfziT7q+e4TWVvfpffJMQjyuM=;\n b=pZbhvUc5OCxGrL7adCXjXyzn7P3iDdTH5I5lqlYnCl2mIRZ5rAcXiyA7qcuUgXO9J6\n /FdW85yhswbOi1hVgP3OgE7jiCdJsb7/EFG30R98e3prsd2CrI/xyxI2lfA4ReoyFtD8\n zG8UVN+YWO4Y4H/AgZHnuaIrFYNpjlNv3fz2va0xGsw8QsG3qlzKPaSr0jWOLbY8u5NR\n iRVRlq2h7UAdzv0CR4hf1tQqPcLNDaaAe+WEZP+8mdoZn9CSpPlr9OM0u1JJdajBr4X6\n +irIc2eZVO9rvZMhs9VYQ5KLy6pU5bX+ReOptgIK+zYBEoHCeyGj+gutM9Ij+nNpJCYw\n nmCg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=7TbAFoTJtQwAUYoiyidfziT7q+e4TWVvfpffJMQjyuM=;\n b=yT2hdRYrEXxWWTUTok/v9tyqq0DXoAKRXXOwilAMhJ7jkB6h3qTNXEQq3DxkMRZZ9g\n QxVSuvsLwKU7xhsuLxe2tUaIVJmPUeMGwhTIvYWm5bin9TyIM8kW55CsQTGnsfTwD71/\n ny24xj0BLLJeney6KF8Km1qiuK5GKkO+YrJ8PZTw7vCG27J9GsQswydsIQ7VkAloWWE7\n /O4JU1T2XZEPWBcFj4oAC/PUf7L5F75wEyw3wxk3ZEUSU3abuXFoa9+2guchbydTrDVh\n r5H12QQOGuyT1VRNwgKtNUNqzy5Xr+X/PuV+Kr0KmghOjH41Y2qJydRdRmtNFhPmLf9Z\n AU+g==",
        "X-Gm-Message-State": "AO0yUKVSLg5zEAzzXU04gzx5MDNOTs+eLPHLkQo/L6Vg9Hl0D6HuZ9t0\n dUAk8YoJtHE2zpJoDj15i2qQpbkuJURYE+9Y3gw=",
        "X-Google-Smtp-Source": "\n AK7set8A6MAUms1FOSfsgbkzuP5MWW01JsuUdHZ5KxGJq4Wh3U6fVftZg8geESWDLW/s/0Iok89W7A==",
        "X-Received": "by 2002:a62:1692:0:b0:592:40cd:ce83 with SMTP id\n 140-20020a621692000000b0059240cdce83mr2146679pfw.4.1674757427449;\n Thu, 26 Jan 2023 10:23:47 -0800 (PST)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>",
        "Subject": "[PATCH 2/3] dumpcap: support temp-dir option",
        "Date": "Thu, 26 Jan 2023 10:23:43 -0800",
        "Message-Id": "<20230126182344.90635-3-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.39.0",
        "In-Reply-To": "<20230126182344.90635-1-stephen@networkplumber.org>",
        "References": "<20230126182344.90635-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Option for putting output files in different directory.\nSame syntax as wireshark.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n app/dumpcap/main.c | 9 ++++++++-\n 1 file changed, 8 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c\nindex 297b6378aaf2..02bb8b2b2b4f 100644\n--- a/app/dumpcap/main.c\n+++ b/app/dumpcap/main.c\n@@ -58,6 +58,7 @@ static bool quiet;\n static bool promiscuous_mode = true;\n static bool use_pcapng = true;\n static char *output_name;\n+static const char *tmp_dir = \"/tmp\";\n static const char *filter_str;\n static unsigned int ring_size = 2048;\n static const char *capture_comment;\n@@ -126,6 +127,8 @@ static void usage(void)\n \t       \"  -P                       use libpcap format instead of pcapng\\n\"\n \t       \"  --capture-comment <comment>\\n\"\n \t       \"                           add a capture comment to the output file\\n\"\n+\t       \"  --temp-dir <directory>   write temporary files to this directory\\n\"\n+\t       \"                           (default: /tmp)\\n\"\n \t       \"\\n\"\n \t       \"Miscellaneous:\\n\"\n \t       \"  --file-prefix=<prefix>   prefix to use for multi-process\\n\"\n@@ -327,6 +330,7 @@ static void parse_opts(int argc, char **argv)\n \t\t{ \"output-file\",     required_argument, NULL, 'w' },\n \t\t{ \"ring-buffer\",     required_argument, NULL, 'b' },\n \t\t{ \"snapshot-length\", required_argument, NULL, 's' },\n+\t\t{ \"temp-dir\",        required_argument, NULL, 0 },\n \t\t{ \"version\",         no_argument,       NULL, 'v' },\n \t\t{ NULL },\n \t};\n@@ -346,6 +350,9 @@ static void parse_opts(int argc, char **argv)\n \t\t\t} else if (!strcmp(long_options[option_index].name,\n \t\t\t\t\t   \"file-prefix\")) {\n \t\t\t\tfile_prefix = optarg;\n+\t\t\t} else if (!strcmp(long_options[option_index].name,\n+\t\t\t\t\t   \"temp-dir\")) {\n+\t\t\t\ttmp_dir = optarg;\n \t\t\t} else {\n \t\t\t\tusage();\n \t\t\t\texit(1);\n@@ -642,7 +649,7 @@ static dumpcap_out_t create_output(void)\n \t\tstrftime(ts, sizeof(ts), \"%Y%m%d%H%M%S\", tm);\n \n \t\tsnprintf(tmp_path, sizeof(tmp_path),\n-\t\t\t \"/tmp/%s_%u_%s_%s.%s\",\n+\t\t\t \"%s/%s_%u_%s_%s.%s\", tmp_dir,\n \t\t\t progname, intf->port, intf->name, ts,\n \t\t\t use_pcapng ? \"pcapng\" : \"pcap\");\n \t\toutput_name = tmp_path;\n",
    "prefixes": [
        "2/3"
    ]
}