Upload a document to a Drata vendor
Automatically upload a document to a Drata vendor on drata.com. Uploads a file (a DPA, a SOC 2 report, a certificate) to a vendor's Reports and documents tab in Drata, through the Add files dialog. Takes the vendor number from its Drata page URL and keeps the file's own name. Returns the document as Drata stores it. Requires being signed in to Drata.
Input
file requiredThe document file.
vendorId requiredThe vendor number in its Drata page URL: .../vendors/current/<number>/overview.
workspacePath requiredThe part of the Drata app URL after app2.drata.com/main/, up to and including the workspace number, e.g. NA/acme/1.
Output
status requireduploaded requireddocument optionalFAQ
Drata whoami (signed-in account)
Report which Drata account this browser is signed in as: the user id, email, first and last name, roles, account type, and the workspace and region the app opened. Being signed out is reported as a normal answer (loggedIn false), not an error, so it can be used to check a session before running other Drata scripts.
Update a Drata vendor
Changes fields of an existing vendor in Drata (Vendors, Current): status (e.g. bring an offboarded vendor back to Active), sub-processor and PII flags, trust center, website, privacy and terms links, services, stored data and risk levels. Only the fields you pass are changed. Takes the vendor number from its Drata page URL. Returns the vendor before and after. Requires being signed in to Drata.
Retest a monitor (Drata)
Re-runs one Drata monitoring test right away (the "Test now" button) instead of waiting for the daily check, then waits for the new result and returns the status before and after, with the failing and excluded resource counts. Takes the test number shown in the Drata UI (e.g. 7 for "Only Authorized Employees Change Code"). Requires being signed in to Drata.
