diff --git a/assemblyline_client/v4_client/module/ingest.py b/assemblyline_client/v4_client/module/ingest.py index b056744..4b6cb72 100644 --- a/assemblyline_client/v4_client/module/ingest.py +++ b/assemblyline_client/v4_client/module/ingest.py @@ -11,7 +11,7 @@ def __init__(self, connection): self._connection = connection def __call__(self, fh=None, path=None, content=None, url=None, sha256=None, fname=None, params=None, metadata=None, - alert=False, nq=None, nt=None, ingest_type='AL_CLIENT'): + alert=False, nq=None, nt=None, ingest_type='AL_CLIENT', submission_profile=None): """\ Submit a file to the ingestion queue. @@ -30,6 +30,7 @@ def __call__(self, fh=None, path=None, content=None, url=None, sha256=None, fnam nt : Notification threshold. (int) params : Additional submission parameters. (dict) ingest_type: Ingestion type, one word to describe how the data is ingested. Default: AL_CLIENT (string) +submission_profile : Submission profile name If content is provided, the path is used as metadata only. """ @@ -87,7 +88,8 @@ def __call__(self, fh=None, path=None, content=None, url=None, sha256=None, fnam request['notification_threshold'] = int(nt) if params: request['params'] = params - + if submission_profile: + request['submission_profile'] = submission_profile if files: data = {'json': dumps(request)} headers = {'content-type': None} diff --git a/assemblyline_client/v4_client/module/submit.py b/assemblyline_client/v4_client/module/submit.py index a86037d..412b26d 100644 --- a/assemblyline_client/v4_client/module/submit.py +++ b/assemblyline_client/v4_client/module/submit.py @@ -10,7 +10,7 @@ class Submit(object): def __init__(self, connection): self._connection = connection - def __call__(self, fh=None, path=None, content=None, url=None, sha256=None, fname=None, params=None, metadata=None): + def __call__(self, fh=None, path=None, content=None, url=None, sha256=None, fname=None, params=None, metadata=None, submission_profile=None): """\ Submit a file to be dispatched. @@ -22,9 +22,10 @@ def __call__(self, fh=None, path=None, content=None, url=None, sha256=None, fnam url : Url to scan (string) Optional -fname : Name of the file to scan -metadata : Metadata to include with submission. (dict) -params : Additional submission parameters. (dict) +fname : Name of the file to scan +metadata : Metadata to include with submission. (dict) +params : Additional submission parameters. (dict) +submission_profile : Submission profile name If content is provided, the path is used as metadata only. """ @@ -73,6 +74,9 @@ def __call__(self, fh=None, path=None, content=None, url=None, sha256=None, fnam if metadata: request['metadata'] = metadata + if submission_profile: + request['submission_profile'] = submission_profile + if files: data = {'json': dumps(request)} headers = {'content-type': None}