finalized workflow list command

This commit is contained in:
luke-hagar-sp
2023-08-18 09:30:16 -05:00
parent 57b20eb303
commit 55d5652a4f
2 changed files with 8 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ import (
_ "embed" _ "embed"
"github.com/sailpoint-oss/sailpoint-cli/internal/config" "github.com/sailpoint-oss/sailpoint-cli/internal/config"
"github.com/sailpoint-oss/sailpoint-cli/internal/output"
"github.com/sailpoint-oss/sailpoint-cli/internal/sdk" "github.com/sailpoint-oss/sailpoint-cli/internal/sdk"
"github.com/sailpoint-oss/sailpoint-cli/internal/util" "github.com/sailpoint-oss/sailpoint-cli/internal/util"
"github.com/spf13/cobra" "github.com/spf13/cobra"
@@ -38,7 +39,12 @@ func newListCommand() *cobra.Command {
} }
} }
cmd.Println(util.PrettyPrint(workflows)) var tableList [][]string
for _, entry := range workflows {
tableList = append(tableList, []string{*entry.Name, *entry.Id})
}
output.WriteTable(cmd.OutOrStdout(), []string{"Name", "ID"}, tableList)
return nil return nil
}, },

View File

@@ -2,7 +2,7 @@
# List # List
List all of the workflows from IdentityNow. List workflows from IdentityNow.
## API References ## API References
- https://developer.sailpoint.com/idn/api/beta/list-workflows - https://developer.sailpoint.com/idn/api/beta/list-workflows