IBM QRadar SOAR

IBM QRadar SOAR

Join this online user group to communicate across Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Patch REST API fails on nested properties.

    Posted Thu July 13, 2023 09:29 AM

    Hi, 

    I am trying to do a PATCH to an incident on the Swagger documentation provided on Resilient. But I am getting this error for the attached body

    {
        "changes": [
          {
            "field": {
              "id": {},
              "name":"properties.domain"
            },
            "old_value": {
              "object": {
                "text": "MYORG"
              }
            },
            "new_value": {
              "object": {
                "text": "MYNEWORG"
              }
            }
          }
        ],
        "version": 12345
      }

    The response is 

    That is weird as the same properties.domain works when I fetch incidents but not when I PATCH them when clearly the domain is part of properties of incident, 

    What field should I use so that I can patch the incident or Is the nomenclature different to get this domain field?



    ------------------------------
    Deepansh Saini
    ------------------------------



  • 2.  RE: Patch REST API fails on nested properties.

    Posted Fri July 14, 2023 11:43 AM

    Hey Deepansh,

    I just did some testing on this and here is what I found. You don't keep object in there, you actually replace that with your text. Also you don't need the version in there. That is for if you want version checking. So you would do something like this:

    {
      "changes": [
        {
          "field": {
            "name": "severity_code"
          },
          "old_value": {
            "text": "Low"
          },
          "new_value": {
            "text": "High"
          }
        }
      ]
    }

    Next comes with the custom fields. I found that it appears that it doesn't matter if something is in the properties section of the incident or not, we are just going to provide the incidents api name and nothing else. See Below:

    {
      "changes": [
        {
          "field": {
            "name": "snow_ticket_open"
          },
          "old_value": {
            "boolean": null
          },
          "new_value": {
            "boolean": true
          }
        }
      ]
    }

    Hope that information helps whatever you are building!



    ------------------------------
    Nick Mumaw, GPEN, GPYC
    Cyber Security Specialist - SOAR
    IBM - Security
    ------------------------------



  • 3.  RE: Patch REST API fails on nested properties.

    Posted Mon July 24, 2023 06:05 AM

    Thanks Nick,

    It works! :)



    ------------------------------
    Deepansh Saini
    ------------------------------