The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Powershell API automation with AQL

Tobias Toft
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 6, 2023

Hi, 

I'm trying to setup some automation to add / update users in assets.

 

The problem im running into is when trying to add "Department"

I have another scheme tree called department as well so i want this to be linked with the employee object "department"

I achieved this using AQL when doing a manual json / csv import with this: 

Name = ${Department}

This is what im using right now:

$myObject = [PSCustomObject]@{
objectTypeId = 9
attributes = @(
@{objectTypeAttributeId = 10
objectAttributeValues = @(@{value = $Name})
}
,
@{objectTypeAttributeId = 11
objectAttributeValues = @(@{value = $Department})
}
)
}

return $myObject | ConvertTo-Json -Depth 5
}

 

 

However i want to automate this process so it's automatically linked and updates every day / week or so. 

What am i missing here?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Tobias Toft
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 19, 2024

BUMP

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events