Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sasikumar
Partner - Creator
Partner - Creator

Convert QRS API output to table

hi Qlikers,

when i call get /user qrs api in powershell 

Output is like this

id : 1414b35d-b51d-4f12-868f-7cb91c723h32
userId : sa_repository
userDirectory : INTERNAL
name : sa_repository
privileges :

id : cdf5f21f-d0b3-47ca-8894-4e1057423d32
userId : sa_proxy
userDirectory : INTERNAL
name : sa_proxy
privileges :

and so on

 

but i want output like this or in excel

id,userid,userDirectory,name,privileges

1414b35d-b51d-4f12-868f-7cb91c723h32,sa_proxy,INTERNAL,sa_repository,

and so on

 

how can i convert this ...

 

thanks,

Sasikumar

Labels (2)
1 Solution

Accepted Solutions
sasikumar
Partner - Creator
Partner - Creator
Author

apps variable holds all output from QRS API

#export the app to csv with selected columns - way 1
$apps | Select-Object id, name | export-csv -Path C:\sense\log.csv

#export the app to csv - way 2
$apps | Select-Object * | export-csv -Path C:\sense\log.csv


#export the app to csv - way 3
$apps | Tee-Object -Variable ExportMe | Format-Table
$exportMe | export-Csv C:\sense\Export.csv

View solution in original post

1 Reply
sasikumar
Partner - Creator
Partner - Creator
Author

apps variable holds all output from QRS API

#export the app to csv with selected columns - way 1
$apps | Select-Object id, name | export-csv -Path C:\sense\log.csv

#export the app to csv - way 2
$apps | Select-Object * | export-csv -Path C:\sense\log.csv


#export the app to csv - way 3
$apps | Tee-Object -Variable ExportMe | Format-Table
$exportMe | export-Csv C:\sense\Export.csv