How to schedule Assets import using Automation for Assets

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Purpose

At the moment, it is not possible to schedule the execution of Assets Imports. We have plans to make this available in the future JSDCLOUD-9920 - Getting issue details... STATUS . Meanwhile, automation can be used to schedule imports. However, the Import should be executed at least once because we need the import configuration ID which is generated after the first execution of the import configuration.

Also using the feature import data from URL further reduces the need for manual interaction. Once the rule is created, it will automatically pick the data from the specified URL and import it within JSM Assets.

Solution

  1. Go to Project settings > Automation > Create rule.
  2. Select trigger as Scheduled and set the schedule as per your requirement. You can also utilize cron expressions to set a schedule. Click Save.
  3. Add a Send web request action to send the Start import REST API :    
       

    1. In the Authorization header make sure that you add the keyword Basic followed by the base64 of your emailaddress:APItoken. So if the base64 of the emailaddress:APItoken is AB12XY45 then to the Authorization header add the value Basic AB12XY45. Steps on how to generate the API Token can be found here.

    2. Add the following Web request URL:

      https://api.atlassian.com/jsm/assets/workspace/<YOUR WORKSPACE ID>/v1/import/start/<IMPORT CONFIGURATION ID>


      If you are not aware of the workspace id: Discover your workspaceId.
      To find the import configuration ID, go to import history and find the configuration id for the corresponding import configuration:
  4. Publish the rule by giving it a name.


Please feel free to reach out to support if you have any questions.

For more examples about how you can use Automation with Assets refer to the article: Update Assets object attribute values using automation

Last modified on Jan 29, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.