Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Update an asset via rest api quickly

Rudy Holtkamp
Community Champion
September 13, 2024

Hi,

I've an asset which has an attribute which can hold multiple reference objects.

To be clear the Application object has an attribute Users, which refers to Employee object. It can be that there are 100+ users in the attribute.

To update the object with a new user, I get the Application object, get all ids of the Users, add the new User and update the Application object. The call is taking more and more time, because of the growing number of values in the attribute.

So basically I'm updating e.g. 100 Employee objects for 101 Employee objects in the attribute.

Is there a quicker way to add just 1 Employee to the User attribute via the REST API?

 

 

2 answers

1 accepted

0 votes
Answer accepted
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 13, 2024

Hi @Rudy Holtkamp 

I don't think its currently possible. as I' ve been searching for this as well.

The only thing I could find, that there is an open issue at Atlassian that relates to this; JSDCLOUD-11392 

Rudy Holtkamp
Community Champion
September 13, 2024

Thanks @Marc - Devoteam , it's so painfully slow. I think I have to endure the waiting. 
48 updates down, still 3602 to go 😴💤

 

Like Marc - Devoteam likes this
0 votes
Xijie Yi September 23, 2024

Hi @Rudy Holtkamp 

I implemented a similar solution in our system, where we manage application/system License object with attributes for Users and Roles. Each Role is a reference to another object, and when a user requests a new role (or new access with some roles) and it's approved, I use a REST API call to append the new roles to the License object. Here is my method: Atlassian Article. But I think we might using the same method to add object to attribute.Screenshot 2024-09-23 143953.png

 

In our case, haven't encountered any performance issues yet, but that's only because I don't have a large number of roles in the attribute at the moment. 

 

Rudy Holtkamp
Community Champion
September 24, 2024

Thanks @Xijie Yi , did a similar thing as you referenced in the article. It just the sheer amount of references that is bothering me.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events