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?
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 headersapi_url = "https://api.example.com/data-center-assets"headers = {"Authorization": "Bearer YOUR_API_TOKEN","Content-Type": "application/json"}# Sample data to be loadeddata_to_load = [{"name": "Asset 1", "type": "Server"},{"name": "Asset 2", "type": "Router"},# Add more assets as needed]# Loop through the data and make API callsfor 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
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.
@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.
Got it. Have you looked at this integration though? https://marketplace.atlassian.com/apps/1219908/insight-jamf-integration?hosting=datacenter&tab=overview
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.
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.
It looks like you're new here. Sign in or register to get started.