
How to use transformations to format data during CSV upload
{
"csv_data": "abc123="
}CSV_PAYLOAD=$(cat my_app_data.csv | base64)
curl --location https://example.vezacloud.com/api/v1/providers/custom/40bdd318-d320-4574-be90-ca556d59889a/datasources/9bc29dc6-8cd0-4926-992e-7d720305ae2f:push_csv \
--request POST \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $VEZA_API_KEY" \
--data "{\"csv_data\": \"${CSV_PAYLOAD}\"}"#!/usr/bin/env python3
import base64
import json
import os
import sys
import oaaclient.utils as oaautils
from oaaclient.client import OAAClient, OAAClientError
veza_url = "https://example.vezacloud.com"
veza_api_key = os.getenv("VEZA_API_KEY")
provider_id = "UUID of Provider"
data_source_id = "UUID of Data Source"
source_csv = "path/to/my_file.csv"
print("Connecting to Veza")
try:
veza_con = OAAClient(veza_url, veza_api_key)
except OAAClientError as e:
print("Error connecting to Veza tenant")
print(e)
sys.exit(1)
print("Loading CSV file")
with open(source_csv, "rb") as f:
encoded_csv = base64.b64encode(f.read())
print("Pushing data to Veza")
try:
push_request = {"id": provider_id, "data_source_id": data_source_id, "csv_data": encoded_csv.decode()}
veza_con.api_post(f"/api/v1/providers/custom/{provider_id}/datasources/{data_source_id}:push_csv", push_request)
print("Push succeeded")
except OAAClientError as e:
log.error(f"{e.error}: {e.message} ({e.status_code})")
if hasattr(e, "details"):
for d in e.details:
log.error(d)
sys.exit(3){first_name} {last_name}{username}@example.com{employee_id | ZERO_PAD, 8}
NOW
Configure email, Slack, and Microsoft Teams notifications for CSV upload status and refreshed query results
Common patterns for importing identity and permissions metadata from CSV files
id or name (or both)Queries refreshed and risk scores updated for "employees.csv".
Note: Only queries with assigned risk levels are refreshed. Queries that did
not complete successfully were not factored into the latest risk score update.
Queries succeeded: 12 of 14.
Queries failed or incomplete: 2.
Succeeded queries
- Privileged group membership
- Dormant service accounts
- ...
Failed queries
- Inactive admin accounts
* For failed queries, please rerun them manually. If a query still cannot
rerun, please contact Veza Support.
Incomplete queries
- Cross-account role assumptions
* For incomplete queries, please contact Veza Support.{
"notification_preferences": {
"enabled": true,
"subscribed_events": ["EXTRACTION_COMPLETED", "QUERY_RESULTS_REFRESHED", "FAILURE"],
"notify_integration_owner": true,
"additional_recipients": ["data-ops@example.com"],
"delivery_methods": [
{ "type": "EMAIL" }
]
}
}employee_id,display_name,email_address,account_status,join_date,last_access,password_updated,termination_date,groups,roles
EMP001,Alex Johnson,alex.j@example.com,active,2023-04-15,2025-02-15T09:30:45Z,2024-11-10T08:15:30Z,,"Engineering, DevOps","Developer, System Administrator"
EMP002,Taylor Smith,taylor.s@example.com,true,2022-09-20,2025-03-01T11:45:20Z,2024-10-05T14:30:15Z,,"Product, UX Research","Product Manager, UX Designer"
EMP003,Jordan Lee,jordan.l@example.com,inactive,2021-11-05,2024-10-10T16:20:30Z,2024-06-15T09:45:10Z,2025-01-15,"Marketing, Content","Content Creator, Social Media Manager"
EMP004,Casey Morgan,casey.m@example.com,1,2023-08-22,2025-02-28T15:10:25Z,2024-12-20T10:30:45Z,,"Finance, Accounting","Financial Analyst, Auditor"
EMP005,Riley Brown,riley.b@example.com,0,2022-03-10,2024-11-15T08:45:30Z,2024-08-05T11:20:15Z,2024-12-31,"HR, Recruiting","HR Specialist, Talent Acquisition"user_id,groups,roles
user1,"Engineering, QA Team, Product Team","Software Engineer, Technical Lead"
user2,Marketing,"Content Writer, Editor"
user3,Finance,"Accountant, Auditor"
user4,HR,HR Specialist
user5,"Support, Training",Customer Support Representativeuser_id,name,email,active,group,role,role_description
user1,Alice Smith,alice@example.com,true,Engineering,Software Engineer,Core development role
user1,Alice Smith,alice@example.com,true,QA Team,Technical Lead,Testing oversight role
user1,Alice Smith,alice@example.com,true,Product Team,Technical Lead,Product development leadership
user2,Bob Johnson,bob@example.com,false,Marketing,Content Writer,Content creation role
user2,Bob Johnson,bob@example.com,false,Marketing,Editor,Content review roleuser_id,name,email,is_active,groups,role,permissions
USR001,Alex Johnson,alex.j@example.com,true,"Dev Team",Developer,"view_code, edit_code"
USR001,Alex Johnson,alex.j@example.com,true,"Backend Group",Code Reviewer,"approve_pull_requests"
USR002,Taylor Smith,taylor.s@example.com,yes,"Ops Team",System Administrator,"manage_infrastructure"
USR002,Taylor Smith,taylor.s@example.com,yes,"Cloud Admin",Release Manager,"deploy_production"
USR003,Jordan Lee,jordan.l@example.com,1,"Product Team",Product Owner,"create_requirements"
USR003,Jordan Lee,jordan.l@example.com,1,"Analytics Users",Data Analyst,"view_analytics"user_id,display_name,email,active,department,team,job_title,role,role_permissions
emp101,John Smith,john.smith@example.com,true,Engineering,Backend,"Senior Developer","Developer Lead","read_all,write_backend,deploy_backend"
emp101,John Smith,john.smith@example.com,true,Engineering,Architecture,"Senior Developer","Architecture Committee","approve_designs,modify_architecture"
emp102,Jane Doe,jane.doe@example.com,true,Engineering,Frontend,"UI Developer","Frontend Developer","read_all,write_frontend,deploy_frontend"
emp103,Robert Johnson,robert.j@example.com,true,Product,"Product Management","Product Owner","Product Manager","read_all,create_requirements,approve_features"
emp103,Robert Johnson,robert.j@example.com,true,Product,"UX Research","Product Owner","User Researcher","conduct_research,analyze_results"
emp104,Maria Garcia,maria.g@example.com,true,Marketing,Content,"Marketing Specialist","Content Creator","read_marketing,write_content"
emp104,Maria Garcia,maria.g@example.com,true,Marketing,Social,"Marketing Specialist","Social Media Manager","post_social,analyze_metrics"
emp105,David Lee,david.l@example.com,true,Finance,Accounting,"Finance Manager","Financial Controller","approve_expenses,manage_budgets,generate_reports"
emp106,Sarah Wilson,sarah.w@example.com,true,HR,Recruiting,"HR Specialist","Recruiter","post_jobs,review_applications,conduct_interviews"
emp107,Michael Brown,michael.b@example.com,true,Sales,"Enterprise Sales","Sales Executive","Account Manager","manage_clients,create_proposals,close_deals"user_id,name,email,active,created_at,last_login_at,password_last_changed_at,deactivated_at
TS001,Timestamp Example 1,ts1@example.com,true,2023-04-12T15:34:56.123456789Z,2006-01-02T15:04:05Z07:00,20060102150405,
TS002,Timestamp Example 2,ts2@example.com,true,2006-01-30 15:04:05Z07:00,2006-01-30 15:04:05,2006-01-30,2006-01-30T
TS003,Timestamp Example 3,ts3@example.com,true,2006-01-30T15:04:05,2006-01-30T15:04:05Z,never,null
TS004,Timestamp Example 4,ts4@example.com,false,2024-03-15,none,false,0
TS005,Timestamp Example 5,ts5@example.com,true,1/2/2006,1/15/2023,11/22/2024,user_id,name,email,active
B001,Boolean Example 1,b1@example.com,true
B002,Boolean Example 2,b2@example.com,t
B003,Boolean Example 3,b3@example.com,yes
B004,Boolean Example 4,b4@example.com,y
B005,Boolean Example 5,b5@example.com,1
B006,Boolean Example 6,b6@example.com,active
B007,Boolean Example 7,b7@example.com,enabled
B008,Boolean Example 8,b8@example.com,false
B009,Boolean Example 9,b9@example.com,f
B010,Boolean Example 10,b10@example.com,no
B011,Boolean Example 11,b11@example.com,n
B012,Boolean Example 12,b12@example.com,0
B013,Boolean Example 13,b13@example.com,inactive
B014,Boolean Example 14,b14@example.com,disableduser_id,name,email,active,department,title,office_location,hire_date,employee_type,salary_band,performance_rating,certification,languages,project_ids,manager_id,emergency_contact
CP001,Custom Property Example 1,cp1@example.com,true,Engineering,Senior Developer,New York,2023-01-15,Full-time,B4,Exceeds Expectations,"AWS Certified, Azure Expert","Java, Python, Go","PROJ-001, PROJ-002",MGR-101,John Smith (555-123-4567)
CP002,Custom Property Example 2,cp2@example.com,true,Marketing,Marketing Manager,San Francisco,2022-05-10,Full-time,C2,Meets Expectations,Google Analytics,"English, Spanish",PROJ-003,MGR-102,Mary Johnson (555-987-6543)
CP003,Custom Property Example 3,cp3@example.com,false,Finance,Financial Analyst,Chicago,2023-08-22,Contract,A3,Needs Improvement,CPA,"English, French","PROJ-004, PROJ-005, PROJ-006",MGR-103,Robert Davis (555-456-7890)user_id,user_name,role_name,role_owner,role_owner_type
10001,bob,admin,owner_1@example.com,,oktauser
10002,sue,admin,owner_1@example.com,oktauser
10003,marry,user,owner_2@example.com,oktauser
10004,jane,user,owner_2@example.com,oktauser
10005,sam,viewer,owner_3@example.com,oktauser
10006,adam,viewer,owner_3@example.com,oktauser
10007,brett,ops,owner_4@example.com,oktauser
10008,robert,ops,owner_4@example.com,oktauser
10009,chris,manager,,
10010,nick,manager,,