From e3c692a0d230a83476cc96f51bbb53e2a30503ea Mon Sep 17 00:00:00 2001 From: Craig Bryan Date: Fri, 14 Mar 2025 14:31:18 -0400 Subject: [PATCH] Allowed 'start_sync_job' to use an 'api' source The sync API doesn't need an integration id when using an 'api' source. --- jupiterone/client.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jupiterone/client.py b/jupiterone/client.py index 5977e46..e1030ec 100644 --- a/jupiterone/client.py +++ b/jupiterone/client.py @@ -542,9 +542,11 @@ def start_sync_job(self, instance_id: str = None, sync_mode: str = None, source: data = { "source": source, - "integrationInstanceId": instance_id, "syncMode": sync_mode - } + } + + if instance_id is not None: + data["integrationInstanceId"] = instance_id response = self._execute_syncapi_request(endpoint=endpoint, payload=data) @@ -1262,4 +1264,4 @@ def create_update_parameter(self, name: str = None, value: Union[str, int, bool, } response = self._execute_query(UPSERT_PARAMETER, variables=variables) - return response \ No newline at end of file + return response