Repository navigation
File Uploads and CSV Imports
GraphQL file uploads can't travel over the normal JSON transport, so the client handles them with the GraphQL multipart request spec under the hood. For the built-in methods below you just pass a file path — the client does the rest.
Example scripts:
test-upload-workspace-file-example.py,test-import-sheet-csv-example.py,test-update-bugs-fields-csv-example.py,test-add-report-attachment-example.py
Uploads a file into an AI agent workspace's storage.
result = client.upload_workspace_file(
workspace_id="6f1e...-uuid",
file_path="notes.txt",
path="notes/notes.txt", # optional destination path within the workspace
)
print(result["success"], result["file"]["name"])Returns success and a file object (name, path, is_folder, size,
last_modified, content_type).
Imports CSV rows into a Strobes sheet. Give a work_book_id (and optionally
a sheet_id) to target an existing sheet, or a name to create a new one.
result = client.import_csv(
"data.csv",
ORG,
work_book_id=2,
name="Imported Sheet", # creates a new sheet when no sheet_id is given
)
print(result["success"], result["message"])client.import_csv(file_path, organization_id, sheet_id=None,
work_book_id=None, import_override=None,
merge_with=None, name=None)| Argument | Description |
|---|---|
file_path |
Path to the CSV on disk |
organization_id |
Your org UUID |
sheet_id |
Target an existing sheet |
work_book_id |
Workbook to import into |
name |
Name for a newly created sheet |
import_override |
Replace existing rows |
merge_with |
Merge strategy |
Bulk-updates finding (bug) custom fields from a spreadsheet.
result = client.update_bugs_fields_with_csv("findings-fields.csv", ORG)Returns the updated findings (bug → list of {id}). Prepare the CSV with the
finding identifier column plus one column per custom-field slug you want to set.
Uploads a file as a report attachment.
result = client.add_report_attachment("appendix.pdf", ORG)
print(result["attachment"]["url"])See Reports → Report attachments for the return shape.
Vault uploads currently use a small inline requests snippet rather than a
built-in method — see
Vault Documents → Upload a document.
Each of the built-in methods builds a schema-validated GraphQL operation with an
Upload! variable, then serializes it into a multipart POST: the operation goes
in the operations part, the variable-to-file mapping in map, and the file as
its own part. You never have to assemble this by hand — see
_execute_multipart_operation in
client.py.
Getting started
Guides
- Search Query Language
- Assets
- Findings
- Engagements
- Comments
- Vault Documents
- Reports
- Exporting Data
- Connectors & Scan Logs
- File Uploads & CSV Imports
Reference