upload#

argus_api.files.sampledb.upload.add_submission(sha256: str, data: Union[bytes, pathlib.Path], fileName: str, user_agent_name: str, user_agent_version: str, customer: Optional[Union[str, int]] = None, observedTimestamp: Optional[int] = None, mimeType: Optional[str] = None, metaData: Optional[dict] = None, acl: Optional[List[Union[str, int]]] = None, tlp: Optional[str] = None, retention: Optional[str] = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, api_session: Optional[ArgusAPISession] = None) dict#

Add a new sample submission. The required challenge token will be generated automatically. (INTERNAL)

Parameters
  • sha256 – sha256 hash of the sample to add the submission for

  • data – sample data. Can be provided raw bytes or a pathlib.Path object pointing to the sample’s location.

  • fileName – The filename of the sample

  • user_agent_name – name of the user agent

  • user_agent_version – version of the user agent

  • customer – The shortname or ID of customer the submission belongs to. Default value is the currernt user’s customer.

  • observedTimestamp – The timestamp of when the sample was observed. Defaults to the current time

  • mimeType – The sample mime type (default application/octet-stream)

  • metaData – Meta data about the sample

  • acl – List of user IDs or shortnames that are given explicit access to the submission

  • tlp – TLP color of the submission. Defaults to amber.

  • retention – Only retain the submission until the specified time. The submission will be deleted after this time, unless the sample is malicious. Allows unix timestamp (milliseconds), ISO timestamp, or a relative time specification.

  • json – return the response’s body as a dict parsed from json. True by default. If set to false, the raw requests.Response object will be returned.

  • verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.

  • proxies – proxies dictionary as expected by the proxies argument of requests.request()

  • apiKey – Argus API key.

  • authentication – authentication override

  • server_url – API base URL override

  • api_session – session to use for this request. If not set, the global session will be used.

Raises
Returns

API response as a dict or response object if the json parameter was set to False.

argus_api.files.sampledb.upload.upload_sample(data: Union[bytes, pathlib.Path], json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, api_session: Optional[ArgusAPISession] = None) dict#

Upload a new sample file. (INTERNAL)

Parameters
  • data – sample data. Can be provided raw bytes or a pathlib.Path object pointing to the sample’s location.

  • json – return the response’s body as a dict parsed from json. True by default. If set to false, the raw requests.Response object will be returned.

  • verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.

  • proxies – proxies dictionary as expected by the proxies argument of requests.request()

  • apiKey – Argus API key.

  • authentication – authentication override

  • server_url – API base URL override

  • api_session – session to use for this request. If not set, the global session will be used.

Raises
Returns

API response as a dict or response object if the json parameter was set to False.