Hi All,
I need to get the details of the import using the API.
I discovered in the API documentation that the endpoint "Get importsource {importSourceUuid} executions {importExecutionUuid} status" might be applicable to my needs. However, I am uncertain about the required parameters.
Could you please let me know where I can obtain them?
Thanks in advance!
Hi @Samuel Gatica _ServiceRocket_
If I understand correctly, you have triggered an Asset Import and it is a long running import and would like to get the details of the import such as the status or progress. In this case, you can use the same API to start the import to get the status or progress in percent.
// To trigger an Assets import
curl --request POST --url https://api.atlassian.com/jsm/assets/workspace/<workspace-id>/v1/import/start/<import configuration id> --header 'Accept: application/json' --header 'Authorization: Basic <encoded api token>'
// To check the import status (only work if the import is still running. Otherwise, you will get 404 error.)
curl --request POST --url https://api.atlassian.com/jsm/assets/workspace/<workspace-id>/v1/import/start/<import configuration id>/properties/status --header 'Accept: application/json' --header 'Authorization: Basic <encoded api token>'
// To check the import progress in percent (only work if the import is still running. Otherwise, you will get 404 error.)
curl --request POST --url https://api.atlassian.com/jsm/assets/workspace/<workspace-id>/v1/import/start/<import configuration id>/properties/progressInPercent
--header 'Accept: application/json' --header 'Authorization: Basic <encoded api token>'
Take a look at the Response from the above start the import API and you will see importExecutionUuid. I guess you can only get the importExecutionUuid if you trigger the import from an API, not from the GUI.
While for the importSourceUuid, if I can guess, it is maybe referring to the Import Configuration ID as in this KB article.
I hope it helps.
-Marini
Thanks @Marini Marini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.