Software Secure Workload
Activity Configure

User Filehash Upload

This endpoint is used to upload a CSV file with filehash for a root scope on the Secure Workload appliance. The column headers HashType and FileHash must appear in the CSV file. HashType should be SHA-1 or SHA-256, FileHash must not be empty and must be in the format of 40-hex SHA1 or 64-hex SHA256.

FileName and Notes headers are optional. Given file name should not exceed maximum length of 150 characters and given notes should not exceed maximum length of 1024 characters.

POST /openapi/v1/assets/user_filehash/upload/{rootAppScopeNameOrID}/{benignOrflagged}

Parameters: The request URL contains the following parameters

Name

Type

Description

rootAppScopeNameOrID

string

Root scope name or ID.

benignOrflagged

string

Can be one of benign or flagged.

Response object: None

Sample python code


  # Sample CSV File
  # HashType,FileHash,FileName,Notes
  # SHA-1,1AF17E73721DBE0C40011B82ED4BB1A7DBE3CE29,application_1.exe,Sample Notes
  # SHA-256,8F434346648F6B96DF89DDA901C5176B10A6D83961DD3C1AC88B59B2DC327AA4,application_2.exe,Sample Notes

  file_path = '/<path_to_file>/user_filehash.csv'
  root_app_scope_name = 'Tetration'
  restclient.upload(file_path, '/assets/user_filehash/upload/%s/benign' % root_app_scope_name)