I want to change some Object Attributes in an Object Schema.
I set up a test schema with the default object attributes, plus one text field, which I'd like to change.
Based on the documentation (https://documentation.mindville.com/display/ICV50/Objects+-+REST) I need to make a PUT request to /rest/insight/1.0/object/{id}, which I do with a body of
{
"objectTypeId": 689,
"attributes": [{
"objectTypeAttributeId": 2727,
"objectAttributeValues": [{
"value": "plshelp"
}]
}]}
The response status is 200 OK, but It does not affect any changes on the Insight field. The response is exactly the same, as the one I receive when I try to Get an item (/rest/insight/1.0/object/{id}, same exact address, with GET request type).
Also I noticed, that no matter what I write in the body, the response stays the same, seems like the API does not process it at all.
The response, if needed(https://pastebin.com/1zh5CCkj)
Any ideas what I am missing here?
@Koczka Bence, did you get the update working?
We are having the same problem at the moment, get 200 response but insight object isn't updated
We have the code working in automation, but when using scriptrunner the insight object isn\t updated.
HttpResponse<JsonNode> response = Unirest.put("https://api.atlassian.com/jsm/insight/workspace/%workplaceID%/v1/object/12701")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.basicAuth("%email%", "%usertoken%")
.body([
attributes: [
{
objectTypeAttributeID: "1601"
objectAttributeValues: [
value: "test2",
]
}
]
])
.asJson()
System.out.println(response.getBody());
Any suggestions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.