Skip to content

Commit

Permalink
Merge pull request #29 from JupiterOne/KNO-475
Browse files Browse the repository at this point in the history
add support for 'syncMode' and 'source' request params for Sync Jobs
  • Loading branch information
SeaBlooms authored Sep 27, 2024
2 parents 99bb995 + 1176e76 commit ad62b53
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions jupiterone/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,17 +500,20 @@ def fetch_all_entity_tags(self):

return return_list

def start_sync_job(self, instance_id: str = None):
def start_sync_job(self, instance_id: str = None, sync_mode: str = None, source: str = None,):
"""Start a synchronization job.
args:
instance_id (str): The "integrationInstanceId" request param for synchronization job
sync_mode (str): The "syncMode" request body property for synchronization job. "DIFF", "CREATE_OR_UPDATE", or "PATCH"
source (str): The "source" request body property for synchronization job. "api" or "integration-external"
"""
endpoint = "/persister/synchronization/jobs"

data = {
"source": "integration-managed",
"integrationInstanceId": instance_id
"source": source,
"integrationInstanceId": instance_id,
"syncMode": sync_mode
}

response = self._execute_syncapi_request(endpoint=endpoint, payload=data)
Expand Down

0 comments on commit ad62b53

Please sign in to comment.