Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Having an issue with REST API Explorer using PATCH method on CMDB Instance API

Jay Jav
Tera Contributor

Hi,

I am trying to test and use the CMDB Instance API, but I faced an issue with PATH Method.

In REST API Explorer,when I want to change the value of "ram" for any class and specific CI using the SYS ID, I receive the 500 Internal Error message. I tested with PDI and other instances and the issue persists.

it says the attributes is null, how can I address the issue in the REST API explorer?

 

 

{
"error": {
"message": "Exception while executing request: Cannot invoke \"java.util.Map.put(Object, Object)\" because \"attributes\" is null",
"detail": "Cannot invoke \"java.util.Map.put(Object, Object)\" because \"attributes\" is null Check logs for error trace or enable glide.rest.debug property to verify REST request processing"
},
"status": "failure"
}

 

 

 

14 REPLIES 14

Thank you, @palanikumar.

but how I can add attributes via REST API explorer? I noticed that the \"attributes\":  is missed in the input but how can I add it?Screenshot 2025-09-18 152918.png

 

 

I don't this this is supported in builder, Use Raw tab instead and pass the data like below:

palanikumar_0-1758289632624.png

Payload:

{
    "attributes": {
        "ram": "2024"
    },
    "source": "ServiceNow"
}

 

Thank you,
Palani

Hello @Jay Jav ,

if my response resolved your issue then mark my response as accepted solution and close the thread 

 

Thank you,
Palani

Thank you, @palanikumar.

but how I can add attributes via REST API explorer? I noticed that the \"attributes\":  is missed in the input but how I can add it?

 

 

I mentioned how to add it in previous post. Did you check?

palanikumar_0-1758548362535.png

You can't use Builder. Use the Raw section and send the details as JSON:

{
    "attributes": {
        "ram""2024"
    },
    "source""ServiceNow"
}
Thank you,
Palani