Issue Regex

Get

Get a single IssueRegex.

GET /api/1/issue/-/regex/$issue_regex_id

Name Type Required Description
issue_regex_id int Yes ID of the IssueRegex.

Example of response:

{
    "id": 886,
    "issue": {
        "id": 935,
        "kind": {
            "id": 4,
            "description": "Unidentified",
            "tag": "Unidentified"
        },
        "description": "Issue description",
        "ticket_url": "https://ticket_url",
        "resolved": false,
        "resolved_at": null,
        "policy": {
            "id": 1,
            "name": "public"
        },
        "first_seen": "2022-01-19T15:28:30.866568Z"
    },
    "text_match": "text match",
    "file_name_match": "file name match",
    "test_name_match": "test name match",
    "architecture_match": "architecture match",
    "tree_match": "tree match",
    "kpet_tree_name_match": "kpet tree name match",
    "package_name_match": "package name match"
}

List

Get a list of IssuesRegexes.

GET /api/1/issue/-/regex

Example of response:

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 886,
            "issue": {
                "id": 935,
                "kind": {
                    "id": 4,
                    "description": "Unidentified",
                    "tag": "Unidentified"
                },
                "description": "Issue description",
                "ticket_url": "https://ticket_url",
                "resolved": false,
                "resolved_at": null,
                "policy": {
                    "id": 1,
                    "name": "public"
                },
                "first_seen": "2022-01-19T15:28:30.866568Z"
            },
            "text_match": "text match",
            "file_name_match": "file name match",
            "test_name_match": "test name match",
            "architecture_match": "architecture match",
            "tree_match": "tree match",
            "kpet_tree_name_match": "kpet tree name match",
            "package_name_match": "package name match"
        }
    ]
}

Create

Create a new IssueRegex. (Auth Required)

POST /api/1/issue/-/regex

Request body should contain JSON with issue regex data:

{
    "issue": 1,
    "text_match": "text match",
    "file_name_match": "file name match",
    "test_name_match": "test name match",
    "testresult_name_match": "test result name match",
    "architecture_match": "architecture match",
    "tree_match": "tree match",
    "kpet_tree_name_match": "kpet tree name match",
    "package_name_match": "package name match"
}
Field Type Required Description
issue int Yes ID of the parent Issue.
text_match string Yes Regular expression matched against log text.
file_name_match string No Regular expression matched against file names.
test_name_match string No Regular expression matched against test names.
testresult_name_match string No Regular expression matched against test result names.
architecture_match string No Regular expression matched against architecture.
tree_match string No Regular expression matched against tree name.
kpet_tree_name_match string No Regular expression matched against KPET tree name.
package_name_match string No Regular expression matched against package name.

Example of response:

{
    "id": 887,
    "issue": {
        "id": 1,
        "kind": {
            "id": 1,
            "description": "Kernel bug",
            "tag": "Kernel Bug"
        },
        "description": "Bug description.",
        "ticket_url": "https://bugzilla.redhat.com/show_bug.cgi?id=123456",
        "resolved": false,
        "resolved_at": null,
        "policy": {
            "id": 1,
            "name": "public"
        },
        "first_seen": "2022-03-16T08:55:51.749000Z"
    },
    "text_match": "text match",
    "file_name_match": "file name match",
    "test_name_match": "test name match",
    "testresult_name_match": "test result name match",
    "architecture_match": "architecture match",
    "tree_match": "tree match",
    "kpet_tree_name_match": "kpet tree name match",
    "package_name_match": "package name match",
    "last_edited_at": "2022-04-16T10:23:45.123000Z"
}

Partial Update

Update only some fields of a single IssueRegex. (Auth Required)

PATCH /api/1/issue/-/regex/$issue_regex_id

Name Type Required Description
issue_regex_id int Yes ID of the IssueRegex.

Updatable fields: text_match, file_name_match, test_name_match, testresult_name_match, architecture_match, tree_match, kpet_tree_name_match, package_name_match.

Example request body:

{
    "text_match": "updated text match"
}

Example of response: same format as Get.

Delete

Delete a single IssueRegex. (Auth Required)

DELETE /api/1/issue/-/regex/$issue_regex_id

Name Type Required Description
issue_regex_id int Yes ID of the IssueRegex.

Responds with 204 and empty content.