You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I have an object type with a field of the status type . It has 3 available states:
Running, Stopped, Closed
I want to change this value through the API.
This is how I tried:
{
"objectTypeId":698,
"attributes":
[
{
"objectTypeAttributeId": 2999,
"objectAttributeValues":
[
{
"value": "Running"
}
]
}
]
}
This returns error. Sadly the documentation for the API is no longer available ( at least not currently), so I don't know where to look up the exact method for doing this.
Hi,
A bit late to the party, but for anybody who is running into this issue.
You need to use the status id instead of the status name in your JSON .
You can find the status id via a 'Get https://api.atlassian.com/jsm/insight/workspace/{workspaceId}/v1/config/statustype' which is explained here.
If you status id for 'Running' is '5', your JSON will look something like this:
{
"objectTypeId":"698",
"attributes":[
{
"objectTypeAttributeId":"2999",
"objectAttributeValues":[
{
"value":"5"
}
]
}
]
}
Hi @Koczka Bence So, I'll start by saying that I'm not personally familiar with the Insight API, therefore, I do not know if updating that particular objectTypeAttribute is possible; however, I believe the docs for that method are located here:
Hopefully that helps. Otherwise, share the exact call you're making (as many details without sensitive info), and the error responses you're getting, and we'll try to get the right folks on here to help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
Thank you for your answer, sadly I have not mangaed to solve my problem.
I have an ObjectType called 'Server', and it has several ObjectTypeAttributes, one of them's value is what I want to change, it is called 'State'. It is a 'Status' type attribute. It has 3 available states:
Running, Stopped, Closed
The following is the content of a PUT request I've sent to:
https://ourjiraserver.com/rest/insight/1.0/object/255207
{
"objectTypeId":698,
"attributes": [
{
"objectTypeAttributeId": 3015,
"objectAttributeValues": [
{
"value": "Closed"
}
]
}
]
}
The response is 500 internal server error:
{
"errorMessages": [
"Something went wrong. Contact administrator"
],
"errors": {}
}
I can change any other (Text type) attributes with requests like this.
"Value": "Closed" is just a guess from my part (about how should I change an attribute which has the type 'Status'), since the old Insight documentation is sadly no longer available online.
I think it is the line which contains the error.
Please let me know if you need further information regarding my problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Koczka
You could try the same call but using the status id instead of the name of the status, you can check the status id in the schema configuration view.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.