Skip to content

Commit e3c692a

Browse files
committed
Allowed 'start_sync_job' to use an 'api' source
The sync API doesn't need an integration id when using an 'api' source.
1 parent 95760d5 commit e3c692a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

jupiterone/client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,9 +542,11 @@ def start_sync_job(self, instance_id: str = None, sync_mode: str = None, source:
542542

543543
data = {
544544
"source": source,
545-
"integrationInstanceId": instance_id,
546545
"syncMode": sync_mode
547-
}
546+
}
547+
548+
if instance_id is not None:
549+
data["integrationInstanceId"] = instance_id
548550

549551
response = self._execute_syncapi_request(endpoint=endpoint, payload=data)
550552

@@ -1262,4 +1264,4 @@ def create_update_parameter(self, name: str = None, value: Union[str, int, bool,
12621264
}
12631265

12641266
response = self._execute_query(UPSERT_PARAMETER, variables=variables)
1265-
return response
1267+
return response

0 commit comments

Comments
 (0)