Export REST API results to a .csv file

book

Article ID: 171986

calendar_today

Updated On:

Products

Endpoint Protection

Issue/Introduction

Endpoint Protection (SEP) 14.x

Cause

Unable to export REST API results to a .csv file

Resolution

  1. Create a powershell script
  2. Within your script, add the following line 
    • Invoke-RestMethod -Uri https://<SEPM_IP>:8446/sepm/api/v1/admin-users -Headers $header Export-Csv -c:\temp "data.csv"

NOTE Powershell scripts have the ability to save their results to a .csv file by adding these parameters: Export-Csv -Path "data.csv" 

For more information see Microsoft documentation.