Highlighted
Trusted Contributor.
Trusted Contributor.
538 views

Bad Request (JSONObject["status"] is not a JSONObject)

Jump to solution

Hi Guys,

I’m trying to update an interaction using restful web service.

I get the below error message:

org.json.JSONException: JSONObject["status"] is not a JSONObject.

                at org.json.JSONObj

here is my code:

Method:              PUT

Resource:            /SM/9/rest/interactions/{incident.id}

Endpoint:            http://localhost:13080

Media type:       Applicatio/json

{ "status" : "Open" }

What am I, doing wrong here guys.

I have attached a screen shot of my soap UI

 Thanks

Sivu

0 Likes
1 Solution

Accepted Solutions
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Bad Request (JSONObject["status"] is not a JSONObject)

Jump to solution

Hi,

the Request for PUT has the same structure as POST.

Example:

{
    "Interaction" : {
        "Impact" : "1"
    }
}

I assume that the {incident.id} in the URL (Resource) is just a placeholder and will be replaced later with a valid value.

View solution in original post

1 Reply
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Bad Request (JSONObject["status"] is not a JSONObject)

Jump to solution

Hi,

the Request for PUT has the same structure as POST.

Example:

{
    "Interaction" : {
        "Impact" : "1"
    }
}

I assume that the {incident.id} in the URL (Resource) is just a placeholder and will be replaced later with a valid value.

View solution in original post

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.