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

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

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