Forums

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

Jira Data Center Assets - API to bulk load objects

Girish Reddy
Contributor
January 18, 2025

Are there REST API's to bulk load objects to Data Center Assets? I am looking at this API Ref and there's a create object api that appears to work for one object at a time. Are there other ways to load in bulk? How have other customers loaded data from systems not in the list of supported integrations?

2 answers

0 votes
Rodney Estrada
Contributor
January 22, 2025

@Girish Reddy , I'm running into the same situation. I'm waiting for Atlassian to add automatic bidirectional sync'ing between Jamf/Intune and Assets.

 

The "csv" and API import options are not feasible for scaling and automating.

Girish Reddy
Contributor
January 22, 2025
Rodney Estrada
Contributor
January 23, 2025

I did but that integration is for Server. I forgot to mention I'm using Cloud.

 

Automatic bidirectional syncing isn't available per the documentation, community posts and direct communication with the Support Team.

Girish Reddy
Contributor
January 24, 2025

Ahh, ok. My question was more for Data Center. For Cloud, we already host an app that provides bi-directional integration to JAMF and many other sources. https://marketplace.atlassian.com/apps/1231655/onlink-hr-worklog-assets-integration-for-jira?hosting=cloud&tab=overview

Happy to chat more and give you a demo.

Rodney Estrada
Contributor
January 24, 2025

Interesting. Pardon my skepticism, can you send me a link to documentation stating the details on automatic bidirectional syncing between Jamf/Intune and Assets.

Thanks,

Girish Reddy
Contributor
February 2, 2025

Here's the docs for Assets Import - https://onwardb.atlassian.net/wiki/spaces/ONLINK/pages/289308673/JAMF+to+JSM+Assets

For outbound (Assets to JAMF), we use post function approach to push data back to Jamf whenever a field changes. Here's an example: https://onwardb.atlassian.net/wiki/spaces/ONLINK/pages/15368217/Configuring+Post+Functions

0 votes
Kai Krause
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.
January 19, 2025

Hi,

there are a few strategies you can consider:

Custom Scripts: If the API does not support bulk operations, you can write a script (in Python, JavaScript, etc.) that reads data from your source system and makes multiple API calls to create each object. This can be done using libraries like requests in Python or axios in JavaScript. Can be a Long way.

CSV or JSON Uploads: I think data upload via CSV https://confluence.atlassian.com/servicemanagementserver/csv-import-1044784472.html is a good way to do mass Import

Database Direct Access: If you have direct access to the database of the Data Center Assets, you might be able to perform bulk inserts directly into the database. However, this approach requires a good understanding of the database schema and potential risks.


Here’s a simple example in Python using the requests library to create multiple objects:

import requests

# Define the API endpoint and headers
api_url = "https://api.example.com/data-center-assets"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
}

# Sample data to be loaded
data_to_load = [
{"name": "Asset 1", "type": "Server"},
{"name": "Asset 2", "type": "Router"},
# Add more assets as needed
]

# Loop through the data and make API calls
for asset in data_to_load:
response = requests.post(api_url, json=asset, headers=headers)
if response.status_code == 201:
print(f"Successfully created: {asset['name']}")
else:
print(f"Failed to create: {asset['name']} - {response.text}")

 

BR
Kai

Girish Reddy
Contributor
January 21, 2025

Thanks for this. I guess I was wondering if there was an API that supported bulk loads so that we minimize the number of API calls.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events