get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 136105,
    "url": "https://patches.dpdk.org/api/patches/136105/?format=api",
    "web_url": "https://patches.dpdk.org/project/ci/patch/20240124133804.73253-1-aconole@redhat.com/",
    "project": {
        "id": 5,
        "url": "https://patches.dpdk.org/api/projects/5/?format=api",
        "name": "CI",
        "link_name": "ci",
        "list_id": "ci.dpdk.org",
        "list_email": "ci@dpdk.org",
        "web_url": "",
        "scm_url": "git://dpdk.org/tools/dpdk-ci",
        "webscm_url": "https://git.dpdk.org/tools/dpdk-ci/",
        "list_archive_url": "https://inbox.dpdk.org/ci",
        "list_archive_url_format": "https://inbox.dpdk.org/ci/{}",
        "commit_url_format": ""
    },
    "msgid": "<20240124133804.73253-1-aconole@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/ci/20240124133804.73253-1-aconole@redhat.com",
    "date": "2024-01-24T13:38:04",
    "name": "post_pw: Correct the patch ID detection.",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "3fce7e423d66f94bb8a3e63f6689636ef29b91ea",
    "submitter": {
        "id": 332,
        "url": "https://patches.dpdk.org/api/people/332/?format=api",
        "name": "Aaron Conole",
        "email": "aconole@redhat.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/ci/patch/20240124133804.73253-1-aconole@redhat.com/mbox/",
    "series": [
        {
            "id": 30902,
            "url": "https://patches.dpdk.org/api/series/30902/?format=api",
            "web_url": "https://patches.dpdk.org/project/ci/list/?series=30902",
            "date": "2024-01-24T13:38:04",
            "name": "post_pw: Correct the patch ID detection.",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/30902/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/136105/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/136105/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<ci-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 C66C1439B6;\n\tWed, 24 Jan 2024 14:38:10 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C137E42830;\n\tWed, 24 Jan 2024 14:38:10 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by mails.dpdk.org (Postfix) with ESMTP id AEED840294\n for <ci@dpdk.org>; Wed, 24 Jan 2024 14:38:09 +0100 (CET)",
            "from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-497-RnSmhbDAPyOSQbpRWUiS9A-1; Wed, 24 Jan 2024 08:38:05 -0500",
            "from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com\n [10.11.54.7])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A84CE869EC6;\n Wed, 24 Jan 2024 13:38:05 +0000 (UTC)",
            "from RHTPC1VM0NT.redhat.com (unknown [10.22.33.141])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 6A50F1C060AF;\n Wed, 24 Jan 2024 13:38:05 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1706103489;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=PNAU3lM21T9aZPipPLLxqNl/B3TiXZfYV8dDx01QpDM=;\n b=jWOmZD7TKzGGxCbtDjBChDSU8/ezSskD5JfyMEfF8YcABKwODQ0mXW63qWplqYcPwCo5fi\n pCiH6JD0rCcKjc2Up2DbAlAhylG9Qt3ioQdhW/94ALBsQRBwgYaWXTfuevn5JDVXjOcf7e\n rD+2ZeG4c86Rjx4QhxL16T15AjHnsBQ=",
        "X-MC-Unique": "RnSmhbDAPyOSQbpRWUiS9A-1",
        "From": "Aaron Conole <aconole@redhat.com>",
        "To": "ci@dpdk.org",
        "Cc": "Michael Santana <msantana@redhat.com>, Ilya Maximets <i.maximets@ovn.org>",
        "Subject": "[PATCH] post_pw: Correct the patch ID detection.",
        "Date": "Wed, 24 Jan 2024 08:38:04 -0500",
        "Message-ID": "<20240124133804.73253-1-aconole@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.11.54.7",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "X-BeenThere": "ci@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK CI discussions <ci.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/ci>,\n <mailto:ci-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/ci/>",
        "List-Post": "<mailto:ci@dpdk.org>",
        "List-Help": "<mailto:ci-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/ci>,\n <mailto:ci-request@dpdk.org?subject=subscribe>",
        "Errors-To": "ci-bounces@dpdk.org"
    },
    "content": "The patch ID detection regex can match on multiple instances of the\nreported patch url.  That will cause us to send a bad API request\ninto the patchwork server.  Correct this by only trusting the first\nvalue to be sent.\n\nSigned-off-by: Aaron Conole <aconole@redhat.com>\n---\n post_pw.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)",
    "diff": "diff --git a/post_pw.sh b/post_pw.sh\nindex a8111ff..f11c444 100755\n--- a/post_pw.sh\n+++ b/post_pw.sh\n@@ -63,7 +63,7 @@ send_post() {\n     context=\"$(echo \"$report\" | sed -n 's/.*Test-Label: //p' | tr ' ' '_' | tr ':' '-')\"\n     state=\"$(echo \"$report\" | sed -n 's/.*Test-Status: //p' | xargs)\"\n     description=\"$(echo \"$report\" | sed -ne 's/^_\\(.*\\)_$/\\1/p')\"\n-    patch_id=\"$(echo \"$report\" | sed -ne 's@.*href.*/patch[es]*/\\(.*\\)/\\?\".*@\\1@ip' | sed 's@/@@')\"\n+    patch_id=\"$(echo \"$report\" | sed -ne 's@.*href.*/patch[es]*/\\(.*\\)/\\?\".*@\\1@ip' | sed 's@/@@' | head -n 1)\"\n     target_url=\"$link\"\n \n     api_url=\"${pw_instance}/api/patches/${patch_id}/checks/\"\n",
    "prefixes": []
}