Skip to content

Commit fba0f97

Browse files
committed
Insight: Add progress api methods
1 parent 6965cc0 commit fba0f97

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

atlassian/insight.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,28 @@ def get_object_type_attributes(
567567
# Insight Progress API
568568
# TODO: Get progress category imports {id}:
569569
# https://developer.atlassian.com/cloud/insight/rest/api-group-progress/#api-progress-category-imports-id-get
570+
def get_progress_of_reindex(self):
571+
"""
572+
Show ongoing insight processes
573+
:return:
574+
"""
575+
if self.cloud:
576+
raise NotImplementedError
577+
url = self.url_joiner(self.api_root, "progress/category/insight-reindex/reindex")
578+
return self.get(url)
579+
580+
def get_progress_of_import(self, import_id):
581+
"""
582+
Show ongoing insight processes
583+
:type import_id: int: The id of the import source configuration
584+
that the progress should be fetched for
585+
:return:
586+
"""
587+
if self.cloud:
588+
raise NotImplementedError
589+
url = self.url_joiner(self.api_root, "progress/category/imports/{id}".format(id=import_id))
590+
return self.get(url)
591+
570592

571593
# Insight Config API
572594
# TODO: Get config statustype:

0 commit comments

Comments
 (0)