`. Supports searching by `channelType` (for example, `channelType|telephony`, `channelType|workItem`, `channelType|customMessaging`, `channelType|genericAction`).")
cmd.Flags().StringVar(&size, "size", "", "Defines the number of items to be displayed on a page. If the number specified is more than allowed max page size, the API will automatically adjust the page size to the max page size.")
- cmd.Flags().StringVar(&includePagination, "include-pagination", "", "If set to to true then a different paginated response object containing the page metadata (currentPage, totalRecords, pageSize, totalPages) will be returned. The flow objects will be in an array named \"data\".")
+ cmd.Flags().StringVar(&includePagination, "include-pagination", "", "If set to true then a different paginated response object containing the page metadata (currentPage, totalRecords, pageSize, totalPages) will be returned. The flow objects will be in an array named \"data\".")
+ cmd.Flags().StringVar(&isValidation, "is-validation", "", "If true, validates the existence of flows by ID regardless of the caller's RBAC access. Intended for internal Task Management use cases.")
flowCmd.AddCommand(cmd)
}
- { // export
+ { // publish
var orgid string
var flowId string
- var version string
+ var skipValidation string
+ var flowType string
+ var trackingId string
+ var comment string
+ var tagIds []string
+ var bodyRaw string
+ var bodyFile string
cmd := &cobra.Command{
- Use: "export",
- Short: "Export a Flow or Subflow",
- Long: "Returns the exported flow/subflow in response.\n\nScope: `cjp:config_read`. Roles: [`Organizational Full Admin`, `Supervisor`, `Contact Center Service Admin`, `User Admin`]",
+ Use: "publish",
+ Short: "Publish a Flow or Subflow",
+ Long: "Returns the published flow in response.\n\nThe Publish API validates the basic structure of the flows. We recommend manually verifying the published flows before proceeding with live traffic.\n\nScope: `cjp:config_write`. Roles: [`Organizational Full Admin`, `Supervisor`, `Contact Center Service Admin`, `User Admin`]",
RunE: func(cmd *cobra.Command, args []string) error {
- req := client.NewRequest(config.CcBaseURL, "GET", "/flow-store/{orgid}/project/{projectId}/flows/{flowId}:export")
+ req := client.NewRequest(config.CcBaseURL, "POST", "/{orgid}/project/{projectId}/flows/{flowId}:publish")
req.PathParam("orgid", orgid)
req.PathParam("projectId", "5e5c9ad6d61f870d6d778c1b")
req.PathParam("flowId", flowId)
- req.QueryParam("version", version)
- if config.Paginate() {
- resp, statusCode, err := req.DoPaginated(false)
- if err != nil {
+ req.QueryParam("skipValidation", skipValidation)
+ req.QueryParam("flowType", flowType)
+ req.Header("TrackingId", trackingId)
+ if bodyFile != "" {
+ if err := req.SetBodyFile(bodyFile); err != nil {
return err
}
- return output.Print(resp, statusCode)
+ } else if bodyRaw != "" {
+ req.SetBodyRaw(bodyRaw)
+ } else {
+ req.BodyString("comment", comment)
+ req.BodyStringSlice("tagIds", tagIds)
}
resp, statusCode, err := req.Do()
if err != nil {
@@ -107,37 +194,92 @@ func init() {
cmd.MarkFlagRequired("orgid")
cmd.Flags().StringVar(&flowId, "flow-id", "", "")
cmd.MarkFlagRequired("flow-id")
- cmd.Flags().StringVar(&version, "version", "", "Version ID. Possible values are 'draft', 'latest' or version ID like '64b92c004ccd9f3d1c680709'. Defaulted to 'latest'.")
+ cmd.Flags().StringVar(&skipValidation, "skip-validation", "", "If true, the flow's pre-publish validation is skipped. Use with care.")
+ cmd.Flags().StringVar(&flowType, "flow-type", "", "Either of 'FLOW' or 'SUBFLOW'.")
+ cmd.Flags().StringVar(&trackingId, "tracking-id", "", "ID for tracking.")
+ cmd.Flags().StringVar(&comment, "comment", "", "")
+ cmd.Flags().StringSliceVar(&tagIds, "tag-ids", nil, "")
+ cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
+ cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
flowCmd.AddCommand(cmd)
}
- { // publish
+ { // lock
var orgid string
var flowId string
- var trackingId string
- var comment string
- var tagIds []string
+ var flowType string
+ cmd := &cobra.Command{
+ Use: "lock",
+ Short: "Lock a Flow or Subflow",
+ Long: "Lock a flow to prevent concurrent edits by other users. Locks expire after 15 minutes of inactivity.\n\nScope: `cjp:config_write`. Roles: [`Organizational Full Admin`, `Contact Center Service Admin`]",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "POST", "/{orgid}/project/{projectId}/flows/{flowId}:lock")
+ req.PathParam("orgid", orgid)
+ req.PathParam("projectId", "5e5c9ad6d61f870d6d778c1b")
+ req.PathParam("flowId", flowId)
+ req.QueryParam("flowType", flowType)
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&flowId, "flow-id", "", "")
+ cmd.MarkFlagRequired("flow-id")
+ cmd.Flags().StringVar(&flowType, "flow-type", "", "Either of 'FLOW' or 'SUBFLOW'.")
+ flowCmd.AddCommand(cmd)
+ }
+
+ { // unlock
+ var orgid string
+ var flowId string
+ var flowType string
+ cmd := &cobra.Command{
+ Use: "unlock",
+ Short: "Unlock a Flow or Subflow",
+ Long: "Release the lock on a flow to allow other users to edit it.\n\nScope: `cjp:config_write`. Roles: [`Organizational Full Admin`, `Contact Center Service Admin`]",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "POST", "/{orgid}/project/{projectId}/flows/{flowId}:unlock")
+ req.PathParam("orgid", orgid)
+ req.PathParam("projectId", "5e5c9ad6d61f870d6d778c1b")
+ req.PathParam("flowId", flowId)
+ req.QueryParam("flowType", flowType)
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&flowId, "flow-id", "", "")
+ cmd.MarkFlagRequired("flow-id")
+ cmd.Flags().StringVar(&flowType, "flow-type", "", "Either of 'FLOW' or 'SUBFLOW'.")
+ flowCmd.AddCommand(cmd)
+ }
+
+ { // validate
+ var orgid string
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "publish",
- Short: "Publish a Flow or Subflow",
- Long: "Returns the published flow in response.\n\nThe Publish API validates the basic structure of the flows. We recommend manually verifying the published flows before proceeding with live traffic.\n\nScope: `cjp:config_read`. Roles: [`Organizational Full Admin`, `Supervisor`, `Contact Center Service Admin`, `User Admin`]",
+ Use: "validate",
+ Short: "Validate a Flow or Subflow",
+ Long: "Dry-run validate a flow/subflow definition without persisting it. Use this to check correctness before importing. Include `associatedChannels` to preserve the channel metadata that import and export payloads round-trip. Validation requests where `associatedChannels` is missing or empty are treated as telephony flows, and dry-run validation does not derive the effective channel from `associatedChannels`.\n\nNote: validation is more lenient than import. A flow that passes `:validate` can still be rejected by `:import` (for example, a missing start activity), so a successful validation does not guarantee a successful import.\n\nScope: `cjp:config_write`",
RunE: func(cmd *cobra.Command, args []string) error {
- req := client.NewRequest(config.CcBaseURL, "POST", "/flow-store/{orgid}/project/{projectId}/flows/{flowId}:publish")
+ req := client.NewRequest(config.CcBaseURL, "POST", "/{orgid}/project/{projectId}/v2/flows:validate")
req.PathParam("orgid", orgid)
req.PathParam("projectId", "5e5c9ad6d61f870d6d778c1b")
- req.PathParam("flowId", flowId)
- req.Header("TrackingId", trackingId)
if bodyFile != "" {
if err := req.SetBodyFile(bodyFile); err != nil {
return err
}
} else if bodyRaw != "" {
req.SetBodyRaw(bodyRaw)
- } else {
- req.BodyString("comment", comment)
- req.BodyStringSlice("tagIds", tagIds)
}
resp, statusCode, err := req.Do()
if err != nil {
@@ -148,11 +290,6 @@ func init() {
}
cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
cmd.MarkFlagRequired("orgid")
- cmd.Flags().StringVar(&flowId, "flow-id", "", "")
- cmd.MarkFlagRequired("flow-id")
- cmd.Flags().StringVar(&trackingId, "tracking-id", "", "ID for tracking.")
- cmd.Flags().StringVar(&comment, "comment", "", "")
- cmd.Flags().StringSliceVar(&tagIds, "tag-ids", nil, "")
cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
flowCmd.AddCommand(cmd)
@@ -162,18 +299,25 @@ func init() {
var orgid string
var overwrite string
var flowType string
- var contentLength string
+ var bodyRaw string
+ var bodyFile string
cmd := &cobra.Command{
Use: "import",
Short: "Import a Flow or Subflow",
- Long: "Returns the imported flow/subflow in response.\n\nScope: `cjp:config_write`. Roles: [`Organizational Full Admin`, `Supervisor`, `Contact Center Service Admin`, `User Admin`]",
+ Long: "Import a new flow/subflow from a flow definition. Creates the flow/subflow in draft state and returns the assigned flow metadata, including `flowId`. Include `associatedChannels` in the payload when the flow contains channel-specific activities (for example, `customMessaging`) so channel references can be resolved correctly during import. If `associatedChannels` is missing or empty, the import is treated as a telephony flow. For `FLOW` imports, blank or whitespace-only `associatedChannels[].channelType` values are rejected.\n\nScope: `cjp:config_write`",
RunE: func(cmd *cobra.Command, args []string) error {
- req := client.NewRequest(config.CcBaseURL, "POST", "/flow-store/{orgid}/project/{projectId}/flows:import")
+ req := client.NewRequest(config.CcBaseURL, "POST", "/{orgid}/project/{projectId}/v2/flows:import")
req.PathParam("orgid", orgid)
req.PathParam("projectId", "5e5c9ad6d61f870d6d778c1b")
req.QueryParam("overwrite", overwrite)
req.QueryParam("flowType", flowType)
- req.Header("Content-Length", contentLength)
+ if bodyFile != "" {
+ if err := req.SetBodyFile(bodyFile); err != nil {
+ return err
+ }
+ } else if bodyRaw != "" {
+ req.SetBodyRaw(bodyRaw)
+ }
resp, statusCode, err := req.Do()
if err != nil {
return err
@@ -183,9 +327,289 @@ func init() {
}
cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
cmd.MarkFlagRequired("orgid")
- cmd.Flags().StringVar(&overwrite, "overwrite", "", "Determines whether to overwrite the existing flow or not. Possible values: yes/no.")
+ cmd.Flags().StringVar(&overwrite, "overwrite", "", "If true, replaces an existing flow with the same name. Defaults to false.")
+ cmd.Flags().StringVar(&flowType, "flow-type", "", "Either of 'FLOW' or 'SUBFLOW'.")
+ cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
+ cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
+ flowCmd.AddCommand(cmd)
+ }
+
+ { // get
+ var orgid string
+ var flowId string
+ var flowType string
+ cmd := &cobra.Command{
+ Use: "get",
+ Short: "Get a Flow or Subflow",
+ Long: "Retrieve the current draft of a flow/subflow as a flow document. To fetch a specific published version, use the `:export` endpoint. The response includes channel metadata (for example, `associatedChannels`) used by channel-specific activities such as `customMessaging`. If `associatedChannels` is missing or empty, the flow is treated as telephony.\n\nScope: `cjp:config_read`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "GET", "/{orgid}/project/{projectId}/v2/flows/{flowId}")
+ req.PathParam("orgid", orgid)
+ req.PathParam("projectId", "5e5c9ad6d61f870d6d778c1b")
+ req.PathParam("flowId", flowId)
+ req.QueryParam("flowType", flowType)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(false)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&flowId, "flow-id", "", "Flow ID.")
+ cmd.MarkFlagRequired("flow-id")
+ cmd.Flags().StringVar(&flowType, "flow-type", "", "Either of 'FLOW' or 'SUBFLOW'.")
+ flowCmd.AddCommand(cmd)
+ }
+
+ { // save-draft
+ var orgid string
+ var flowId string
+ var expectedVersion string
+ var flowType string
+ var bodyRaw string
+ var bodyFile string
+ cmd := &cobra.Command{
+ Use: "save-draft",
+ Short: "Save a Flow or Subflow Draft",
+ Long: "Save a complete flow/subflow document as the current draft, replacing the existing draft. Submitted `associatedChannels` values are not persisted on save; the draft preserves the existing stored channel metadata. Omitting `associatedChannels` does not default an existing flow to telephony. Pass `expectedVersion` as a query parameter to enable optimistic locking; the request fails with `409 Conflict` if the server-side version does not match. Omit `expectedVersion` to skip the check.\n\nScope: `cjp:config_write`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "POST", "/{orgid}/project/{projectId}/v2/flows/{flowId}")
+ req.PathParam("orgid", orgid)
+ req.PathParam("projectId", "5e5c9ad6d61f870d6d778c1b")
+ req.PathParam("flowId", flowId)
+ req.QueryParam("expectedVersion", expectedVersion)
+ req.QueryParam("flowType", flowType)
+ if bodyFile != "" {
+ if err := req.SetBodyFile(bodyFile); err != nil {
+ return err
+ }
+ } else if bodyRaw != "" {
+ req.SetBodyRaw(bodyRaw)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&flowId, "flow-id", "", "Flow ID.")
+ cmd.MarkFlagRequired("flow-id")
+ cmd.Flags().StringVar(&expectedVersion, "expected-version", "", "Expected current draft version for optimistic locking. The request fails with 409 Conflict if the server-side version does not match. Omit to skip the check.")
+ cmd.Flags().StringVar(&flowType, "flow-type", "", "Either of 'FLOW' or 'SUBFLOW'.")
+ cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
+ cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
+ flowCmd.AddCommand(cmd)
+ }
+
+ { // patch-draft
+ var orgid string
+ var flowId string
+ var expectedVersion string
+ var flowType string
+ var bodyRaw string
+ var bodyFile string
+ cmd := &cobra.Command{
+ Use: "patch-draft",
+ Short: "Patch a Flow or Subflow Draft",
+ Long: "Apply partial updates to an existing flow/subflow draft without replacing the entire document. The patch body is a Patch Draft Contract \u2014 server-side merge, idempotent, and re-validated after the merge. The patch is rejected if the merged document fails validation, so the draft is never left in a broken state. The body may also include top-level overrides such as `name` and `description`. Submitted `associatedChannels` values are not persisted on patch; the draft preserves the existing stored channel metadata.\n\nPass `expectedVersion` as a query parameter to enable optimistic locking; the request fails with `409 Conflict` if the server-side version does not match. Omit `expectedVersion` to skip the check.\n\nScope: `cjp:config_write`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "PATCH", "/{orgid}/project/{projectId}/v2/flows/{flowId}")
+ req.PathParam("orgid", orgid)
+ req.PathParam("projectId", "5e5c9ad6d61f870d6d778c1b")
+ req.PathParam("flowId", flowId)
+ req.QueryParam("expectedVersion", expectedVersion)
+ req.QueryParam("flowType", flowType)
+ if bodyFile != "" {
+ if err := req.SetBodyFile(bodyFile); err != nil {
+ return err
+ }
+ } else if bodyRaw != "" {
+ req.SetBodyRaw(bodyRaw)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&flowId, "flow-id", "", "Flow ID.")
+ cmd.MarkFlagRequired("flow-id")
+ cmd.Flags().StringVar(&expectedVersion, "expected-version", "", "Expected current draft version for optimistic locking. The request fails with 409 Conflict if the server-side version does not match. Omit to skip the check.")
+ cmd.Flags().StringVar(&flowType, "flow-type", "", "Either of 'FLOW' or 'SUBFLOW'.")
+ cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
+ cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
+ flowCmd.AddCommand(cmd)
+ }
+
+ { // validate-draft
+ var orgid string
+ var flowId string
+ var versionId string
+ var flowType string
+ cmd := &cobra.Command{
+ Use: "validate-draft",
+ Short: "Validate an Existing Flow or Subflow Draft",
+ Long: "Validate the current draft of an existing flow/subflow (read-only operation). Validation reads the draft as stored. Drafts where `associatedChannels` is missing or empty are treated as telephony flows, and validation does not derive the effective channel from `associatedChannels`.\n\nScope: `cjp:config_read`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "GET", "/{orgid}/project/{projectId}/v2/flows/{flowId}:validate")
+ req.PathParam("orgid", orgid)
+ req.PathParam("projectId", "5e5c9ad6d61f870d6d778c1b")
+ req.PathParam("flowId", flowId)
+ req.QueryParam("versionId", versionId)
+ req.QueryParam("flowType", flowType)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(false)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&flowId, "flow-id", "", "")
+ cmd.MarkFlagRequired("flow-id")
+ cmd.Flags().StringVar(&versionId, "version-id", "", "Version to validate. Use 'draft' for the current draft, or a specific version ObjectId.")
+ cmd.Flags().StringVar(&flowType, "flow-type", "", "Either of 'FLOW' or 'SUBFLOW'.")
+ flowCmd.AddCommand(cmd)
+ }
+
+ { // export
+ var orgid string
+ var flowId string
+ var version string
+ var flowType string
+ cmd := &cobra.Command{
+ Use: "export",
+ Short: "Export a Flow or Subflow",
+ Long: "Export a flow/subflow as a flow document for backup, migration, or version control. The exported payload includes `associatedChannels` metadata to preserve channel-specific activity behavior (for example, `customMessaging`) during re-import. If `associatedChannels` is missing or empty, the flow is treated as telephony.\n\nScope: `cjp:config_read`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "GET", "/{orgid}/project/{projectId}/v2/flows/{flowId}:export")
+ req.PathParam("orgid", orgid)
+ req.PathParam("projectId", "5e5c9ad6d61f870d6d778c1b")
+ req.PathParam("flowId", flowId)
+ req.QueryParam("version", version)
+ req.QueryParam("flowType", flowType)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(false)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&flowId, "flow-id", "", "")
+ cmd.MarkFlagRequired("flow-id")
+ cmd.Flags().StringVar(&version, "version", "", "Version to export. Use 'latest' for the most recent published version, 'draft' for the working copy, or a specific version ObjectId.")
+ cmd.Flags().StringVar(&flowType, "flow-type", "", "Either of 'FLOW' or 'SUBFLOW'.")
+ flowCmd.AddCommand(cmd)
+ }
+
+ { // search
+ var orgid string
+ var query string
+ var flowType string
+ var page string
+ var size string
+ var keyValueFilter string
+ cmd := &cobra.Command{
+ Use: "search",
+ Short: "Search Flows",
+ Long: "Returns a list of flows in response. The search is case-sensitive.\n\nScope: `cjp:config_read`. Roles: [`Organizational Full Admin`, `Supervisor`, `Contact Center Service Admin`, `User Admin`]",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "GET", "/{orgid}/project/{projectId}/flows:search")
+ req.PathParam("orgid", orgid)
+ req.PathParam("projectId", "5e5c9ad6d61f870d6d778c1b")
+ req.QueryParam("query", query)
+ req.QueryParam("flowType", flowType)
+ req.QueryParam("page", page)
+ req.QueryParam("size", size)
+ req.QueryParam("keyValueFilter", keyValueFilter)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(false)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&query, "query", "", "Searches for flows with the given query. The search is case-sensitive.")
+ cmd.Flags().StringVar(&flowType, "flow-type", "", "Either of 'FLOW' or 'SUBFLOW' or 'ALL'. Default value is 'ALL'.")
+ cmd.Flags().StringVar(&page, "page", "", "Defines the number of the displayed page. The page number starts from 0.")
+ cmd.Flags().StringVar(&size, "size", "", "Defines the number of items to be displayed on a page. If the number specified is more than allowed max page size, the API will automatically adjust the page size to the max page size.")
+ cmd.Flags().StringVar(&keyValueFilter, "key-value-filter", "", "Filters results based on key-value pairs. Format: 'key1|value1,key2|value2'. This will add a filter on normalizedFlow collection directly instead of running query on atlas.")
+ flowCmd.AddCommand(cmd)
+ }
+
+ { // delete
+ var orgid string
+ var flowId string
+ var force string
+ var skipRsEpcheck string
+ var flowType string
+ cmd := &cobra.Command{
+ Use: "delete",
+ Short: "Delete a Flow or Subflow",
+ Long: "Permanently deletes a flow or subflow. Flows deleted via this API are removed permanently and cannot be recovered.\n\nScope: `cjp:config_write`. Roles: [`Organizational Full Admin`, `Contact Center Service Admin`]",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "DELETE", "/{orgid}/project/{projectId}/flows/{flowId}")
+ req.PathParam("orgid", orgid)
+ req.PathParam("projectId", "5e5c9ad6d61f870d6d778c1b")
+ req.PathParam("flowId", flowId)
+ req.QueryParam("force", force)
+ req.QueryParam("skipRsEPCheck", skipRsEpcheck)
+ req.QueryParam("flowType", flowType)
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&flowId, "flow-id", "", "ID of the flow/subflow to delete.")
+ cmd.MarkFlagRequired("flow-id")
+ cmd.Flags().StringVar(&force, "force", "", "If 'yes', the flow is deleted even if it is still referenced by other entities. Defaults to 'no'.")
+ cmd.Flags().StringVar(&skipRsEpcheck, "skip-rs-epcheck", "", "If true, skips the check for routing strategy and entry point associations before deleting the flow.")
cmd.Flags().StringVar(&flowType, "flow-type", "", "Either of 'FLOW' or 'SUBFLOW'.")
- cmd.Flags().StringVar(&contentLength, "content-length", "", "Content length value in number of bytes.")
flowCmd.AddCommand(cmd)
}
diff --git a/cmd/cc/functions.go b/cmd/cc/functions.go
new file mode 100644
index 0000000..f11c6e4
--- /dev/null
+++ b/cmd/cc/functions.go
@@ -0,0 +1,458 @@
+// Code generated by codegen/generate_cli.py; DO NOT EDIT.
+
+package cc
+
+import (
+ "fmt"
+ "strconv"
+ "strings"
+
+ cmd "github.com/Cloverhound/webex-cli/cmd"
+ "github.com/Cloverhound/webex-cli/internal/client"
+ "github.com/Cloverhound/webex-cli/internal/config"
+ "github.com/Cloverhound/webex-cli/internal/output"
+ "github.com/spf13/cobra"
+)
+
+// Ensure imports are used.
+var _ = fmt.Sprintf
+var _ = config.Token
+var _ = output.Print
+var _ = strconv.Itoa
+var _ = strings.Join
+
+var functionsCmd = &cobra.Command{
+ Use: "functions",
+ Short: "Functions commands",
+}
+
+func init() {
+ cmd.CcCmd.AddCommand(functionsCmd)
+
+ { // list
+ var orgid string
+ var isPartialMatch string
+ var isCaseSensitive string
+ var name string
+ var language string
+ var status string
+ var sortBy string
+ var page string
+ var size string
+ var ids string
+ var fields string
+ var isValidation string
+ cmd := &cobra.Command{
+ Use: "list",
+ Short: "List Custom Functions",
+ Long: "List or search custom functions in the organization. Without filters, returns all custom functions. Supports filtering by name, language, and status, plus sorting and pagination.\n\nScope: `cjp:config_read`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "GET", "/v1/{orgid}/functions")
+ req.PathParam("orgid", orgid)
+ req.QueryParam("isPartialMatch", isPartialMatch)
+ req.QueryParam("isCaseSensitive", isCaseSensitive)
+ req.QueryParam("name", name)
+ req.QueryParam("language", language)
+ req.QueryParam("status", status)
+ req.QueryParam("sortBy", sortBy)
+ req.QueryParam("page", page)
+ req.QueryParam("size", size)
+ req.QueryParam("ids", ids)
+ req.QueryParam("fields", fields)
+ req.QueryParam("isValidation", isValidation)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(false)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&isPartialMatch, "is-partial-match", "", "Whether to search with partial matches. If `false`, search/filter is based on exact match.")
+ cmd.Flags().StringVar(&isCaseSensitive, "is-case-sensitive", "", "Whether the search should be case-sensitive. Currently applicable only to the `name` field.")
+ cmd.Flags().StringVar(&name, "name", "", "Filter by function name.")
+ cmd.Flags().StringVar(&language, "language", "", "Filter by programming language.")
+ cmd.Flags().StringVar(&status, "status", "", "Filter by one or more function statuses (comma-separated, no spaces). Case-sensitive.")
+ cmd.Flags().StringVar(&sortBy, "sort-by", "", "Comma-separated fields with order. Supported fields (case-sensitive): `name`, `language`, `status`, `lastModifiedDate`. Prefix a field with `-` for descending order; no prefix means ascending.")
+ cmd.Flags().StringVar(&page, "page", "", "Zero-based page number for the paginated query.")
+ cmd.Flags().StringVar(&size, "size", "", "Number of results per page.")
+ cmd.Flags().StringVar(&ids, "ids", "", "Comma-separated list of function IDs to fetch.")
+ cmd.Flags().StringVar(&fields, "fields", "", "Comma-separated list of function fields to include in the response.")
+ cmd.Flags().StringVar(&isValidation, "is-validation", "", "Used by the Tenant Management team to validate the existence of functions with given IDs regardless of the user's RBAC access.")
+ functionsCmd.AddCommand(cmd)
+ }
+
+ { // create
+ var orgid string
+ var bodyRaw string
+ var bodyFile string
+ cmd := &cobra.Command{
+ Use: "create",
+ Short: "Create a Custom Function",
+ Long: "Create a new custom function. The source code is provided as an escaped string and the runtime defaults to the highest supported runtime for the given language.\n\nScope: `cjp:config_write`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "POST", "/v1/{orgid}/functions")
+ req.PathParam("orgid", orgid)
+ if bodyFile != "" {
+ if err := req.SetBodyFile(bodyFile); err != nil {
+ return err
+ }
+ } else if bodyRaw != "" {
+ req.SetBodyRaw(bodyRaw)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
+ cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
+ functionsCmd.AddCommand(cmd)
+ }
+
+ { // get
+ var orgid string
+ var id string
+ var versionOrTag string
+ var metaDataOnly string
+ cmd := &cobra.Command{
+ Use: "get",
+ Short: "Get a Custom Function",
+ Long: "Retrieve a custom function by its ID. Use `versionOrTag` to fetch a specific published version, or omit it to get the draft.\n\nScope: `cjp:config_read`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "GET", "/v1/{orgid}/functions/{id}")
+ req.PathParam("orgid", orgid)
+ req.PathParam("id", id)
+ req.QueryParam("versionOrTag", versionOrTag)
+ req.QueryParam("metaDataOnly", metaDataOnly)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(false)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&id, "id", "", "Custom function ID. Hexadecimal ObjectId returned by the create or list APIs.")
+ cmd.MarkFlagRequired("id")
+ cmd.Flags().StringVar(&versionOrTag, "version-or-tag", "", "Version number or publish tag of the source code to return (for example, `Dev`, `Live`, or `2`). If omitted, the draft version is returned.")
+ cmd.Flags().StringVar(&metaDataOnly, "meta-data-only", "", "If `true`, returns only metadata and excludes source code. If `false` or omitted, returns both metadata and source code.")
+ functionsCmd.AddCommand(cmd)
+ }
+
+ { // update
+ var orgid string
+ var id string
+ var bodyRaw string
+ var bodyFile string
+ cmd := &cobra.Command{
+ Use: "update",
+ Short: "Update a Custom Function",
+ Long: "Update an existing custom function by ID. Replaces the draft source code and metadata with the supplied body.\n\nScope: `cjp:config_write`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "PUT", "/v1/{orgid}/functions/{id}")
+ req.PathParam("orgid", orgid)
+ req.PathParam("id", id)
+ if bodyFile != "" {
+ if err := req.SetBodyFile(bodyFile); err != nil {
+ return err
+ }
+ } else if bodyRaw != "" {
+ req.SetBodyRaw(bodyRaw)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&id, "id", "", "Custom function ID.")
+ cmd.MarkFlagRequired("id")
+ cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
+ cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
+ functionsCmd.AddCommand(cmd)
+ }
+
+ { // delete
+ var orgid string
+ var id string
+ var isForceDeletion string
+ cmd := &cobra.Command{
+ Use: "delete",
+ Short: "Delete a Custom Function",
+ Long: "Delete a custom function by ID. Use `isForceDeletion=true` to delete even when the function is referenced by one or more flows.\n\nScope: `cjp:config_write`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "DELETE", "/v1/{orgid}/functions/{id}")
+ req.PathParam("orgid", orgid)
+ req.PathParam("id", id)
+ req.QueryParam("isForceDeletion", isForceDeletion)
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&id, "id", "", "Custom function ID.")
+ cmd.MarkFlagRequired("id")
+ cmd.Flags().StringVar(&isForceDeletion, "is-force-deletion", "", "If `true`, deletes the function regardless of its usage in flows.")
+ functionsCmd.AddCommand(cmd)
+ }
+
+ { // import
+ var orgid string
+ var overwrite string
+ var associatedRcs string
+ cmd := &cobra.Command{
+ Use: "import",
+ Short: "Import a Custom Function",
+ Long: "Import a custom function from a previously exported function-definition JSON file, uploaded as the multipart `file` part (not a zip or base64 envelope). Use `overwrite=true` to replace any existing function with the same name.\n\nScope: `cjp:config_write`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "POST", "/v1/{orgid}/functions:import")
+ req.PathParam("orgid", orgid)
+ req.QueryParam("overwrite", overwrite)
+ req.QueryParam("associatedRcs", associatedRcs)
+ req.QueryParam("associatedRcs", associatedRcs)
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&overwrite, "overwrite", "", "If `true`, overwrites a function with the same name if one already exists.")
+ cmd.Flags().StringVar(&associatedRcs, "associated-rcs", "", "Optional list of associated routing-context IDs.")
+ functionsCmd.AddCommand(cmd)
+ }
+
+ { // unlock
+ var orgid string
+ var id string
+ cmd := &cobra.Command{
+ Use: "unlock",
+ Short: "Unlock a Custom Function",
+ Long: "Release the edit lock on a custom function so that other users can edit it.\n\nScope: `cjp:config_write`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "POST", "/v1/{orgid}/functions/{id}:unlock")
+ req.PathParam("orgid", orgid)
+ req.PathParam("id", id)
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&id, "id", "", "")
+ cmd.MarkFlagRequired("id")
+ functionsCmd.AddCommand(cmd)
+ }
+
+ { // lock
+ var orgid string
+ var id string
+ cmd := &cobra.Command{
+ Use: "lock",
+ Short: "Lock a Custom Function",
+ Long: "Acquire an edit lock on a custom function to prevent concurrent writes by other users.\n\nScope: `cjp:config_write`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "POST", "/v1/{orgid}/functions/{id}:lock")
+ req.PathParam("orgid", orgid)
+ req.PathParam("id", id)
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&id, "id", "", "")
+ cmd.MarkFlagRequired("id")
+ functionsCmd.AddCommand(cmd)
+ }
+
+ { // test
+ var orgid string
+ var id string
+ var bodyRaw string
+ var bodyFile string
+ cmd := &cobra.Command{
+ Use: "test",
+ Short: "Test a Custom Function",
+ Long: "Execute a custom function with a test payload. Implicitly publishes the latest draft first, so the run uses the most recent source code.\n\nScope: `cjp:config_write`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "POST", "/v1/{orgid}/functions/{id}:test")
+ req.PathParam("orgid", orgid)
+ req.PathParam("id", id)
+ if bodyFile != "" {
+ if err := req.SetBodyFile(bodyFile); err != nil {
+ return err
+ }
+ } else if bodyRaw != "" {
+ req.SetBodyRaw(bodyRaw)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&id, "id", "", "")
+ cmd.MarkFlagRequired("id")
+ cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
+ cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
+ functionsCmd.AddCommand(cmd)
+ }
+
+ { // publish
+ var orgid string
+ var id string
+ var tags []string
+ var comment string
+ var key_0 int64
+ var key_1 float64
+ var key_2 float64
+ var key_3 float64
+ var bodyRaw string
+ var bodyFile string
+ cmd := &cobra.Command{
+ Use: "publish",
+ Short: "Publish a Custom Function",
+ Long: "Publish the latest draft of a custom function under one or more tags (`Dev`, `Test`, `Latest`, `Live`). Ensure the function has been created or updated before calling this API.\n\nScope: `cjp:config_write`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "POST", "/v1/{orgid}/functions/{id}:publish")
+ req.PathParam("orgid", orgid)
+ req.PathParam("id", id)
+ if bodyFile != "" {
+ if err := req.SetBodyFile(bodyFile); err != nil {
+ return err
+ }
+ } else if bodyRaw != "" {
+ req.SetBodyRaw(bodyRaw)
+ } else {
+ req.BodyStringSlice("tags", tags)
+ req.BodyString("comment", comment)
+ req.BodyInt("key_0", key_0, cmd.Flags().Changed("key_0"))
+ req.BodyFloat("key_1", key_1, cmd.Flags().Changed("key_1"))
+ req.BodyFloat("key_2", key_2, cmd.Flags().Changed("key_2"))
+ req.BodyFloat("key_3", key_3, cmd.Flags().Changed("key_3"))
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&id, "id", "", "")
+ cmd.MarkFlagRequired("id")
+ cmd.Flags().StringSliceVar(&tags, "tags", nil, "")
+ cmd.Flags().StringVar(&comment, "comment", "", "")
+ cmd.Flags().Int64Var(&key_0, "key_0", 0, "")
+ cmd.Flags().Float64Var(&key_1, "key_1", 0, "")
+ cmd.Flags().Float64Var(&key_2, "key_2", 0, "")
+ cmd.Flags().Float64Var(&key_3, "key_3", 0, "")
+ cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
+ cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
+ functionsCmd.AddCommand(cmd)
+ }
+
+ { // export
+ var orgid string
+ var id string
+ var versionOrTag string
+ cmd := &cobra.Command{
+ Use: "export",
+ Short: "Export a Custom Function",
+ Long: "Export a custom function for the given version or publish tag. Returns the plain function-definition JSON (name, language, runtime, description, source code, inputs, and outputs), suitable for re-importing via the import API.\n\nScope: `cjp:config_read`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "POST", "/v1/{orgid}/functions/{id}:export")
+ req.PathParam("orgid", orgid)
+ req.PathParam("id", id)
+ req.QueryParam("versionOrTag", versionOrTag)
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&id, "id", "", "")
+ cmd.MarkFlagRequired("id")
+ cmd.Flags().StringVar(&versionOrTag, "version-or-tag", "", "Version number or publish tag of the source code to export. If omitted, the latest published version is exported.")
+ functionsCmd.AddCommand(cmd)
+ }
+
+ { // list-options
+ var orgid string
+ var language string
+ var runtime string
+ cmd := &cobra.Command{
+ Use: "list-options",
+ Short: "List Function Options",
+ Long: "List the supported programming languages, runtimes, and corresponding wrapper code for custom functions. Filter by `language` or `runtime` to narrow the result.\n\nScope: `cjp:config_read`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "GET", "/v1/{orgid}/functions/options")
+ req.PathParam("orgid", orgid)
+ req.QueryParam("language", language)
+ req.QueryParam("runtime", runtime)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(false)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&language, "language", "", "Filter by programming language (for example, `js`, `py`).")
+ cmd.Flags().StringVar(&runtime, "runtime", "", "Filter by runtime (for example, `nodejs22.x`, `python3.13`).")
+ functionsCmd.AddCommand(cmd)
+ }
+
+}
diff --git a/cmd/cc/generated_summaries.go b/cmd/cc/generated_summaries.go
index 566422e..c21a022 100644
--- a/cmd/cc/generated_summaries.go
+++ b/cmd/cc/generated_summaries.go
@@ -27,13 +27,14 @@ var generatedSummariesCmd = &cobra.Command{
func init() {
cmd.CcCmd.AddCommand(generatedSummariesCmd)
- { // get-id
+ { // get
var orgid string
var id string
cmd := &cobra.Command{
- Use: "get-id",
- Short: "Get specific Generated Summaries resource by ID",
- Long: `Retrieve an existing Generated Summaries resource by ID in a given organization. Deprecated. Use GET /ai-feature/generated-summaries/{id} instead.`,
+ Use: "get",
+ Aliases: []string{"get-id"},
+ Short: "Get specific Generated Summaries resource by ID",
+ Long: `Retrieve an existing Generated Summaries resource by ID in a given organization. Deprecated. Use GET /ai-feature/generated-summaries/{id} instead.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/generated-summaries/{id}")
req.PathParam("orgid", orgid)
@@ -59,7 +60,7 @@ func init() {
generatedSummariesCmd.AddCommand(cmd)
}
- { // update-id
+ { // update
var orgid string
var id string
var organizationId string
@@ -73,9 +74,10 @@ func init() {
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "update-id",
- Short: "Update specific Generated Summaries resource by ID",
- Long: `Update an existing Generated Summaries resource by ID in a given organization. Deprecated. Use PUT /ai-feature/generated-summaries/{id} instead.`,
+ Use: "update",
+ Aliases: []string{"update-id"},
+ Short: "Update specific Generated Summaries resource by ID",
+ Long: `Update an existing Generated Summaries resource by ID in a given organization. Deprecated. Use PUT /ai-feature/generated-summaries/{id} instead.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "PUT", "/organization/{orgid}/generated-summaries/{id}")
req.PathParam("orgid", orgid)
diff --git a/cmd/cc/global_variables.go b/cmd/cc/global_variables.go
index e7d4d7a..7123806 100644
--- a/cmd/cc/global_variables.go
+++ b/cmd/cc/global_variables.go
@@ -220,13 +220,14 @@ func init() {
globalVariablesCmd.AddCommand(cmd)
}
- { // get-id
+ { // get
var orgid string
var id string
cmd := &cobra.Command{
- Use: "get-id",
- Short: "Get specific Global Variable by ID",
- Long: `Retrieve an existing Global Variable by ID in a given organization.`,
+ Use: "get",
+ Aliases: []string{"get-id"},
+ Short: "Get specific Global Variable by ID",
+ Long: `Retrieve an existing Global Variable by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/cad-variable/{id}")
req.PathParam("orgid", orgid)
@@ -252,7 +253,7 @@ func init() {
globalVariablesCmd.AddCommand(cmd)
}
- { // update-id
+ { // update
var orgid string
var id string
var active bool
@@ -271,9 +272,10 @@ func init() {
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "update-id",
- Short: "Update specific Global Variable by ID",
- Long: `Update an existing Global Variable by ID in a given organization. Required fields in payload are agentEditable, variableType, agentViewable, reportable, active, defaultValue.`,
+ Use: "update",
+ Aliases: []string{"update-id"},
+ Short: "Update specific Global Variable by ID",
+ Long: `Update an existing Global Variable by ID in a given organization. Required fields in payload are agentEditable, variableType, agentViewable, reportable, active, defaultValue.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "PUT", "/organization/{orgid}/cad-variable/{id}")
req.PathParam("orgid", orgid)
@@ -329,13 +331,14 @@ func init() {
globalVariablesCmd.AddCommand(cmd)
}
- { // delete-id
+ { // delete
var orgid string
var id string
cmd := &cobra.Command{
- Use: "delete-id",
- Short: "Delete specific Global Variable by ID",
- Long: `Delete an existing Global Variable by ID in a given organization.`,
+ Use: "delete",
+ Aliases: []string{"delete-id"},
+ Short: "Delete specific Global Variable by ID",
+ Long: `Delete an existing Global Variable by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "DELETE", "/organization/{orgid}/cad-variable/{id}")
req.PathParam("orgid", orgid)
diff --git a/cmd/cc/holiday_list.go b/cmd/cc/holiday_list.go
index a9991c2..86878a4 100644
--- a/cmd/cc/holiday_list.go
+++ b/cmd/cc/holiday_list.go
@@ -39,9 +39,9 @@ func init() {
var singleObjectResponse string
cmd := &cobra.Command{
Use: "list",
- Short: "List Holiday List(s)",
- Long: `Retrieve a list of Holiday List(s) in a given organization.
- Note: Array fields are removed from List API. If all fields are required please fetch Id's and use get-by-id API.`,
+ Short: "List Holiday Lists",
+ Long: `Retrieve a list of Holiday Lists in a given organization.
+ Note: Returning array fields in the List (Get All) API response is deprecated. To retrieve the complete resource with all fields, please use the Get-by-ID API instead.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/v2/holiday-list")
req.PathParam("orgid", orgid)
@@ -75,8 +75,8 @@ func init() {
cmd.Flags().StringVar(&page, "page", "", "Defines the number of displayed page. The page number starts from 0.")
cmd.Flags().StringVar(&pageSize, "page-size", "", "Defines the number of items to be displayed on a page. If the number specified is more than allowed max page size, the API will automatically adjust the page size to the max page size.")
cmd.Flags().StringVar(&sort, "sort", "", "Sorting criteria in the format: property(, asc | desc). Default sort order is ascending. Supported sortable fields (name, createdTime, lastUpdatedTime). The examples below show some sort queries - name,asc - createdTime,desc ")
- cmd.Flags().StringVar(&includeCount, "include-count", "", "Enable the flag to get the count of holidays")
- cmd.Flags().StringVar(&singleObjectResponse, "single-object-response", "", "Specifiy whether to include array fields in the response, This query param should use only if the response contain single record, if we are using for multiple objects response query param not supported and throws an exception.")
+ cmd.Flags().StringVar(&includeCount, "include-count", "", "Enable this flag to get the count of holidays.")
+ cmd.Flags().StringVar(&singleObjectResponse, "single-object-response", "", "Specify whether to include array fields in the response. This query parameter should be used only when the response contains a single record. It is not supported for responses with multiple objects and throws an exception.")
holidayListCmd.AddCommand(cmd)
}
@@ -118,8 +118,8 @@ func init() {
var bodyFile string
cmd := &cobra.Command{
Use: "bulk-save",
- Short: "Bulk save Holiday List(s)",
- Long: `Create, Update or delete Holiday List(s) in bulk in a given organization.`,
+ Short: "Bulk save Holiday Lists",
+ Long: `Create, Update or delete Holiday Lists in bulk in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "POST", "/organization/{orgid}/holiday-list/bulk")
req.PathParam("orgid", orgid)
@@ -178,13 +178,14 @@ func init() {
holidayListCmd.AddCommand(cmd)
}
- { // get-id
+ { // get
var orgid string
var id string
cmd := &cobra.Command{
- Use: "get-id",
- Short: "Get specific Holiday List by ID",
- Long: `Retrieve an existing Holiday List by ID in a given organization.`,
+ Use: "get",
+ Aliases: []string{"get-id"},
+ Short: "Get specific Holiday List by ID",
+ Long: `Retrieve an existing Holiday List by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/holiday-list/{id}")
req.PathParam("orgid", orgid)
@@ -210,15 +211,16 @@ func init() {
holidayListCmd.AddCommand(cmd)
}
- { // update-id
+ { // update
var orgid string
var id string
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "update-id",
- Short: "Update specific Holiday List by ID",
- Long: `Update an existing Holiday List by ID in a given organization.`,
+ Use: "update",
+ Aliases: []string{"update-id"},
+ Short: "Update specific Holiday List by ID",
+ Long: `Update an existing Holiday List by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "PUT", "/organization/{orgid}/holiday-list/{id}")
req.PathParam("orgid", orgid)
@@ -246,13 +248,14 @@ func init() {
holidayListCmd.AddCommand(cmd)
}
- { // delete-id
+ { // delete
var orgid string
var id string
cmd := &cobra.Command{
- Use: "delete-id",
- Short: "Delete specific Holiday List by ID",
- Long: `Delete an existing Holiday List by ID in a given organization.`,
+ Use: "delete",
+ Aliases: []string{"delete-id"},
+ Short: "Delete specific Holiday List by ID",
+ Long: `Delete an existing Holiday List by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "DELETE", "/organization/{orgid}/holiday-list/{id}")
req.PathParam("orgid", orgid)
diff --git a/cmd/cc/multimedia_profile.go b/cmd/cc/multimedia_profile.go
index cb1550f..8b6d9f5 100644
--- a/cmd/cc/multimedia_profile.go
+++ b/cmd/cc/multimedia_profile.go
@@ -192,13 +192,14 @@ func init() {
multimediaProfileCmd.AddCommand(cmd)
}
- { // get-id
+ { // get
var orgid string
var id string
cmd := &cobra.Command{
- Use: "get-id",
- Short: "Get specific Multimedia Profile by ID",
- Long: `Retrieve an existing Multimedia Profile by ID in a given organization.`,
+ Use: "get",
+ Aliases: []string{"get-id"},
+ Short: "Get specific Multimedia Profile by ID",
+ Long: `Retrieve an existing Multimedia Profile by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/multimedia-profile/{id}")
req.PathParam("orgid", orgid)
@@ -224,15 +225,16 @@ func init() {
multimediaProfileCmd.AddCommand(cmd)
}
- { // update-id
+ { // update
var orgid string
var id string
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "update-id",
- Short: "Update specific Multimedia Profile by ID",
- Long: `Update an existing Multimedia Profile by ID in a given organization.`,
+ Use: "update",
+ Aliases: []string{"update-id"},
+ Short: "Update specific Multimedia Profile by ID",
+ Long: `Update an existing Multimedia Profile by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "PUT", "/organization/{orgid}/multimedia-profile/{id}")
req.PathParam("orgid", orgid)
@@ -260,13 +262,14 @@ func init() {
multimediaProfileCmd.AddCommand(cmd)
}
- { // delete-id
+ { // delete
var orgid string
var id string
cmd := &cobra.Command{
- Use: "delete-id",
- Short: "Delete specific Multimedia Profile by ID",
- Long: `Delete an existing Multimedia Profile by ID in a given organization.`,
+ Use: "delete",
+ Aliases: []string{"delete-id"},
+ Short: "Delete specific Multimedia Profile by ID",
+ Long: `Delete an existing Multimedia Profile by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "DELETE", "/organization/{orgid}/multimedia-profile/{id}")
req.PathParam("orgid", orgid)
diff --git a/cmd/cc/notification.go b/cmd/cc/notification.go
index 2e12b35..021081c 100644
--- a/cmd/cc/notification.go
+++ b/cmd/cc/notification.go
@@ -35,7 +35,7 @@ func init() {
cmd := &cobra.Command{
Use: "subscribe",
Short: "Subscribe Notification",
- Long: `Access this endpoint when the user has to register for a WebSocket Session. Requires 'cjp:user' scope or roles 'id_full_admin', 'id_readonly_admin', 'atlas-portal.partner.salesadmin', 'cjp.supervisor', 'cjp.admin', 'atlas-portal.partner.provision_admin', 'cloud-contact-center:pod_conv' for authorization`,
+ Long: "Access this endpoint when the user has to register for a WebSocket Session. Requires one of the following accepted registration scopes: `cjp:user` or `cloud-contact-center:pod_conv`. The `cjp-hybrid-conn:read` scope is also accepted when CCE authentication is enabled. Tokens with only admin or partner roles and no accepted registration scope are rejected.",
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "POST", "/v1/notification/subscribe")
if bodyFile != "" {
diff --git a/cmd/cc/outdial_ani.go b/cmd/cc/outdial_ani.go
index 3ad174c..058f863 100644
--- a/cmd/cc/outdial_ani.go
+++ b/cmd/cc/outdial_ani.go
@@ -37,9 +37,9 @@ func init() {
var singleObjectResponse string
cmd := &cobra.Command{
Use: "list",
- Short: "List Outdial ANI(s)",
- Long: `Retrieve a list of Outdial ANI(s) in a given organization.
- Note: Array fields are removed from List API. If all fields are required please fetch Id's and use get-by-id API.`,
+ Short: "List Outdial ANIs",
+ Long: `Retrieve a list of Outdial ANIs in a given organization.
+ Note: Returning array fields in the List (Get All) API response is deprecated. To retrieve the complete resource with all fields, please use the Get-by-ID API instead.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/v2/outdial-ani")
req.PathParam("orgid", orgid)
@@ -70,7 +70,7 @@ func init() {
cmd.Flags().StringVar(&search, "search", "", "Filter data based on the search keyword.Supported search columns(name, description) The examples below show some search queries - \"Cisco\" - field==\"name\";value==\"Cisco\" - fields=in=(\"name\",\"description\");value==\"Cisco\" ")
cmd.Flags().StringVar(&page, "page", "", "Defines the number of displayed page. The page number starts from 0.")
cmd.Flags().StringVar(&pageSize, "page-size", "", "Defines the number of items to be displayed on a page. If the number specified is more than allowed max page size, the API will automatically adjust the page size to the max page size.")
- cmd.Flags().StringVar(&singleObjectResponse, "single-object-response", "", "Specifiy whether to include array fields in the response, This query param should use only if the response contain single record, if we are using for multiple objects response query param not supported and throws an exception.")
+ cmd.Flags().StringVar(&singleObjectResponse, "single-object-response", "", "Specify whether to include array fields in the response. This query parameter should be used only when the response contains a single record. It is not supported for responses with multiple objects and throws an exception.")
outdialAniCmd.AddCommand(cmd)
}
@@ -112,8 +112,8 @@ func init() {
var bodyFile string
cmd := &cobra.Command{
Use: "bulk-save",
- Short: "Bulk save Outdial ANI(s)",
- Long: `Create, Update or delete Outdial ANI(s) in bulk in a given organization.`,
+ Short: "Bulk save Outdial ANIs",
+ Long: `Create, Update or delete Outdial ANIs in bulk in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "POST", "/organization/{orgid}/outdial-ani/bulk")
req.PathParam("orgid", orgid)
@@ -172,7 +172,7 @@ func init() {
outdialAniCmd.AddCommand(cmd)
}
- { // list-entry
+ { // list-entries
var orgid string
var filter string
var attributes string
@@ -180,9 +180,10 @@ func init() {
var page string
var pageSize string
cmd := &cobra.Command{
- Use: "list-entry",
- Short: "List Outdial ANI Entry(s)",
- Long: `Retrieve a list of Outdial ANI Entry(s) in a given organization.`,
+ Use: "list-entries",
+ Aliases: []string{"list-entry"},
+ Short: "List Outdial ANI Entries",
+ Long: `Retrieve a list of Outdial ANI Entries in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/outdial-ani/entry")
req.PathParam("orgid", orgid)
@@ -215,13 +216,14 @@ func init() {
outdialAniCmd.AddCommand(cmd)
}
- { // get-id
+ { // get
var orgid string
var id string
cmd := &cobra.Command{
- Use: "get-id",
- Short: "Get specific Outdial ANI by ID",
- Long: `Retrieve an existing Outdial ANI by ID in a given organization.`,
+ Use: "get",
+ Aliases: []string{"get-id"},
+ Short: "Get specific Outdial ANI by ID",
+ Long: `Retrieve an existing Outdial ANI by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/outdial-ani/{id}")
req.PathParam("orgid", orgid)
@@ -247,15 +249,16 @@ func init() {
outdialAniCmd.AddCommand(cmd)
}
- { // update-id
+ { // update
var orgid string
var id string
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "update-id",
- Short: "Update specific Outdial ANI by ID",
- Long: `Update an existing Outdial ANI by ID in a given organization.`,
+ Use: "update",
+ Aliases: []string{"update-id"},
+ Short: "Update specific Outdial ANI by ID",
+ Long: `Update an existing Outdial ANI by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "PUT", "/organization/{orgid}/outdial-ani/{id}")
req.PathParam("orgid", orgid)
@@ -283,13 +286,14 @@ func init() {
outdialAniCmd.AddCommand(cmd)
}
- { // delete-id
+ { // delete
var orgid string
var id string
cmd := &cobra.Command{
- Use: "delete-id",
- Short: "Delete specific Outdial ANI by ID",
- Long: `Delete an existing Outdial ANI by ID in a given organization.`,
+ Use: "delete",
+ Aliases: []string{"delete-id"},
+ Short: "Delete specific Outdial ANI by ID",
+ Long: `Delete an existing Outdial ANI by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "DELETE", "/organization/{orgid}/outdial-ani/{id}")
req.PathParam("orgid", orgid)
@@ -410,15 +414,16 @@ func init() {
outdialAniCmd.AddCommand(cmd)
}
- { // bulk-save-entry
+ { // bulk-save-entries
var orgid string
var outDialAniId string
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "bulk-save-entry",
- Short: "Bulk save Outdial ANI Entry(s)",
- Long: `Create, Update or delete Outdial ANI Entry(s) in bulk for an Address Book in a given organization.`,
+ Use: "bulk-save-entries",
+ Aliases: []string{"bulk-save-entry"},
+ Short: "Bulk save Outdial ANI Entries",
+ Long: `Create, Update or delete Outdial ANI Entries in bulk for an Address Book in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "POST", "/organization/{orgid}/outdial-ani/{outDialAniId}/entry/bulk")
req.PathParam("orgid", orgid)
@@ -574,7 +579,7 @@ func init() {
outdialAniCmd.AddCommand(cmd)
}
- { // list-entry-2
+ { // list-entries-for-ani
var orgid string
var outDialAniId string
var filter string
@@ -583,9 +588,10 @@ func init() {
var page string
var pageSize string
cmd := &cobra.Command{
- Use: "list-entry-2",
- Short: "List Outdial ANI Entry(s)",
- Long: `Retrieve a list of Outdial ANI Entry(s) in a given organization.`,
+ Use: "list-entries-for-ani",
+ Aliases: []string{"list-entry-2"},
+ Short: "List Outdial ANI Entries",
+ Long: `Retrieve a list of Outdial ANI Entries in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/v2/outdial-ani/{outDialAniId}/entry")
req.PathParam("orgid", orgid)
diff --git a/cmd/cc/overrides.go b/cmd/cc/overrides.go
index 88b2994..1fbbe68 100644
--- a/cmd/cc/overrides.go
+++ b/cmd/cc/overrides.go
@@ -41,7 +41,7 @@ func init() {
Use: "list",
Short: "List Overrides resource(s)",
Long: `Retrieve a list of Overrides resource(s) in a given organization.
- Note: Array fields are removed from List API. If all fields are required please fetch Id's and use get-by-id API.`,
+ Note: Returning array fields in the List (Get All) API response is deprecated. To retrieve the complete resource with all fields, please use the Get-by-ID API instead.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/v2/overrides")
req.PathParam("orgid", orgid)
@@ -178,13 +178,14 @@ func init() {
overridesCmd.AddCommand(cmd)
}
- { // get-id
+ { // get
var orgid string
var id string
cmd := &cobra.Command{
- Use: "get-id",
- Short: "Get specific Overrides resource by ID",
- Long: `Retrieve an existing Overrides resource by ID in a given organization.`,
+ Use: "get",
+ Aliases: []string{"get-id"},
+ Short: "Get specific Overrides resource by ID",
+ Long: `Retrieve an existing Overrides resource by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/overrides/{id}")
req.PathParam("orgid", orgid)
@@ -210,15 +211,16 @@ func init() {
overridesCmd.AddCommand(cmd)
}
- { // update-id
+ { // update
var orgid string
var id string
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "update-id",
- Short: "Update specific Overrides resource by ID",
- Long: `Update an existing Overrides resource by ID in a given organization.`,
+ Use: "update",
+ Aliases: []string{"update-id"},
+ Short: "Update specific Overrides resource by ID",
+ Long: `Update an existing Overrides resource by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "PUT", "/organization/{orgid}/overrides/{id}")
req.PathParam("orgid", orgid)
@@ -246,13 +248,14 @@ func init() {
overridesCmd.AddCommand(cmd)
}
- { // delete-id
+ { // delete
var orgid string
var id string
cmd := &cobra.Command{
- Use: "delete-id",
- Short: "Delete specific Overrides resource by ID",
- Long: `Delete an existing Overrides resource by ID in a given organization.`,
+ Use: "delete",
+ Aliases: []string{"delete-id"},
+ Short: "Delete specific Overrides resource by ID",
+ Long: `Delete an existing Overrides resource by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "DELETE", "/organization/{orgid}/overrides/{id}")
req.PathParam("orgid", orgid)
diff --git a/cmd/cc/realtime.go b/cmd/cc/realtime.go
index 62a64db..11e13aa 100644
--- a/cmd/cc/realtime.go
+++ b/cmd/cc/realtime.go
@@ -35,7 +35,7 @@ func init() {
cmd := &cobra.Command{
Use: "subscribe-notification",
Short: "Subscribe Realtime Notification",
- Long: `Access this endpoint when the user has to register for a WebSocket Session to receive realtime events. Requires 'cjp:user' scope or roles 'id_full_admin', 'id_readonly_admin', 'atlas-portal.partner.salesadmin', 'atlas-portal.partner.helpdesk', 'cjp.supervisor', 'cjp.admin', 'atlas-portal.partner.provision_admin' for authorization`,
+ Long: "Access this endpoint when the user has to register for a WebSocket Session to receive realtime events. Requires one of the following accepted registration scopes: `cjp:user` or `cloud-contact-center:pod_conv`. The `cjp-hybrid-conn:read` scope is also accepted when CCE authentication is enabled. Tokens with only admin or partner roles and no accepted registration scope are rejected.",
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "POST", "/v1/realtime/subscribe")
if bodyFile != "" {
diff --git a/cmd/cc/resource_collection.go b/cmd/cc/resource_collection.go
index 89168ea..e722f94 100644
--- a/cmd/cc/resource_collection.go
+++ b/cmd/cc/resource_collection.go
@@ -123,13 +123,14 @@ func init() {
resourceCollectionCmd.AddCommand(cmd)
}
- { // get-id
+ { // get
var orgid string
var id string
cmd := &cobra.Command{
- Use: "get-id",
- Short: "Get specific Resource Collection by ID",
- Long: `Retrieve an existing Resource Collection by ID in a given organization.`,
+ Use: "get",
+ Aliases: []string{"get-id"},
+ Short: "Get specific Resource Collection by ID",
+ Long: `Retrieve an existing Resource Collection by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/resource-collection/{id}")
req.PathParam("orgid", orgid)
@@ -155,15 +156,16 @@ func init() {
resourceCollectionCmd.AddCommand(cmd)
}
- { // update-id
+ { // update
var orgid string
var id string
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "update-id",
- Short: "Update specific Resource Collection by ID",
- Long: `Update an existing resource collection by ID in a given organization.`,
+ Use: "update",
+ Aliases: []string{"update-id"},
+ Short: "Update specific Resource Collection by ID",
+ Long: `Update an existing resource collection by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "PUT", "/organization/{orgid}/resource-collection/{id}")
req.PathParam("orgid", orgid)
@@ -191,13 +193,14 @@ func init() {
resourceCollectionCmd.AddCommand(cmd)
}
- { // delete-id
+ { // delete
var orgid string
var id string
cmd := &cobra.Command{
- Use: "delete-id",
- Short: "Delete specific Resource Collection by ID",
- Long: `Delete an existing resource collection by ID in a given organization.`,
+ Use: "delete",
+ Aliases: []string{"delete-id"},
+ Short: "Delete specific Resource Collection by ID",
+ Long: `Delete an existing resource collection by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "DELETE", "/organization/{orgid}/resource-collection/{id}")
req.PathParam("orgid", orgid)
diff --git a/cmd/cc/search_metadata.go b/cmd/cc/search_metadata.go
new file mode 100644
index 0000000..f2e2faf
--- /dev/null
+++ b/cmd/cc/search_metadata.go
@@ -0,0 +1,58 @@
+// Code generated by codegen/generate_cli.py; DO NOT EDIT.
+
+package cc
+
+import (
+ "fmt"
+
+ cmd "github.com/Cloverhound/webex-cli/cmd"
+ "github.com/Cloverhound/webex-cli/internal/client"
+ "github.com/Cloverhound/webex-cli/internal/config"
+ "github.com/Cloverhound/webex-cli/internal/output"
+ "github.com/spf13/cobra"
+)
+
+// Ensure imports are used.
+var _ = fmt.Sprintf
+var _ = config.Token
+var _ = output.Print
+
+var searchMetadataCmd = &cobra.Command{
+ Use: "search-metadata",
+ Short: "SearchMetadata commands",
+}
+
+func init() {
+ cmd.CcCmd.AddCommand(searchMetadataCmd)
+
+ { // get
+ var xOrganizationId string
+ var trackingId string
+ cmd := &cobra.Command{
+ Use: "get",
+ Short: "Get Search Metadata",
+ Long: "Returns schema metadata for the Webex Contact Center Search GraphQL API, describing supported queries, fields, nested structures, data types, filters, sorting options, grouping capabilities, and aggregation operations.\n\n**Authentication & Authorization:**\n- **Required Scopes:** `cjp:config` or `cjp:config_read`\n\nAn asterisk (*) in the rendered response schema indicates a required property.",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "GET", "/search/v2/meta")
+ req.Header("X-ORGANIZATION-ID", xOrganizationId)
+ req.Header("TrackingId", trackingId)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(false)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&xOrganizationId, "x-organization-id", "", "Organization ID to use for this operation. If unspecified, inferred from token. Token must have permission to interact with this organization.")
+ cmd.Flags().StringVar(&trackingId, "tracking-id", "", "Tracking ID to use for this operation, for traceability, debugging, and error reporting purposes. ")
+ searchMetadataCmd.AddCommand(cmd)
+ }
+
+}
diff --git a/cmd/cc/site.go b/cmd/cc/site.go
index 7214236..9c13d8e 100644
--- a/cmd/cc/site.go
+++ b/cmd/cc/site.go
@@ -217,13 +217,14 @@ func init() {
siteCmd.AddCommand(cmd)
}
- { // get-id
+ { // get
var orgid string
var id string
cmd := &cobra.Command{
- Use: "get-id",
- Short: "Get specific Site by ID",
- Long: `Retrieve an existing Site by ID in a given organization.`,
+ Use: "get",
+ Aliases: []string{"get-id"},
+ Short: "Get specific Site by ID",
+ Long: `Retrieve an existing Site by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/site/{id}")
req.PathParam("orgid", orgid)
@@ -249,7 +250,7 @@ func init() {
siteCmd.AddCommand(cmd)
}
- { // update-id
+ { // update
var orgid string
var id string
var active bool
@@ -262,9 +263,10 @@ func init() {
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "update-id",
- Short: "Update specific Site by ID",
- Long: `Update an existing Site by ID in a given organization.`,
+ Use: "update",
+ Aliases: []string{"update-id"},
+ Short: "Update specific Site by ID",
+ Long: `Update an existing Site by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "PUT", "/organization/{orgid}/site/{id}")
req.PathParam("orgid", orgid)
@@ -308,13 +310,14 @@ func init() {
siteCmd.AddCommand(cmd)
}
- { // delete-id
+ { // delete
var orgid string
var id string
cmd := &cobra.Command{
- Use: "delete-id",
- Short: "Delete specific Site by ID",
- Long: `Delete an existing Site by ID in a given organization.`,
+ Use: "delete",
+ Aliases: []string{"delete-id"},
+ Short: "Delete specific Site by ID",
+ Long: `Delete an existing Site by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "DELETE", "/organization/{orgid}/site/{id}")
req.PathParam("orgid", orgid)
diff --git a/cmd/cc/skill.go b/cmd/cc/skill.go
index b1873f7..5d1763e 100644
--- a/cmd/cc/skill.go
+++ b/cmd/cc/skill.go
@@ -35,10 +35,11 @@ func init() {
var page string
var pageSize string
var singleObjectResponse string
+ var include string
cmd := &cobra.Command{
Use: "list",
- Short: "List Skill(s)",
- Long: `Retrieve a list of Skill(s) in a given organization.
+ Short: "List Skills",
+ Long: `Retrieve a list of Skills in a given organization.
Note: Returning array fields in the List (Get All) API response is deprecated. To retrieve the complete resource with all fields, please use the Get-by-ID API instead.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/v2/skill")
@@ -49,6 +50,7 @@ func init() {
req.QueryParam("page", page)
req.QueryParam("pageSize", pageSize)
req.QueryParam("singleObjectResponse", singleObjectResponse)
+ req.QueryParam("include", include)
if config.Paginate() {
resp, statusCode, err := req.DoPaginated(false)
if err != nil {
@@ -70,24 +72,13 @@ func init() {
cmd.Flags().StringVar(&search, "search", "", "Filter data based on the search keyword.Supported search columns(name) The examples below show some search queries - \"Cisco\" - field==\"name\";value==\"Cisco\" - fields=in=(\"name\");value==\"Cisco\" ")
cmd.Flags().StringVar(&page, "page", "", "Defines the number of displayed page. The page number starts from 0.")
cmd.Flags().StringVar(&pageSize, "page-size", "", "Defines the number of items to be displayed on a page. If the number specified is more than allowed max page size, the API will automatically adjust the page size to the max page size.")
- cmd.Flags().StringVar(&singleObjectResponse, "single-object-response", "", "Specifiy whether to include array fields in the response, This query param should use only if the response contain single record, if we are using for multiple objects response query param not supported and throws an exception.")
+ cmd.Flags().StringVar(&singleObjectResponse, "single-object-response", "", "Specify whether to include array fields in the response. This query parameter should be used only when the response contains a single record. It is not supported for responses with multiple objects and throws an exception.")
+ cmd.Flags().StringVar(&include, "include", "", "Fetch array fields on demand only. Supported array fields are enumSkillValues.")
skillCmd.AddCommand(cmd)
}
{ // create
var orgid string
- var active string
- var name string
- var serviceLevelThreshold string
- var skillType string
- var organizationId string
- var id string
- var version string
- var description string
- var enumSkillValues string
- var dynamicSkill string
- var createdTime string
- var lastUpdatedTime string
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
@@ -97,18 +88,6 @@ func init() {
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "POST", "/organization/{orgid}/skill")
req.PathParam("orgid", orgid)
- req.QueryParam("active", active)
- req.QueryParam("name", name)
- req.QueryParam("serviceLevelThreshold", serviceLevelThreshold)
- req.QueryParam("skillType", skillType)
- req.QueryParam("organizationId", organizationId)
- req.QueryParam("id", id)
- req.QueryParam("version", version)
- req.QueryParam("description", description)
- req.QueryParam("enumSkillValues", enumSkillValues)
- req.QueryParam("dynamicSkill", dynamicSkill)
- req.QueryParam("createdTime", createdTime)
- req.QueryParam("lastUpdatedTime", lastUpdatedTime)
if bodyFile != "" {
if err := req.SetBodyFile(bodyFile); err != nil {
return err
@@ -125,18 +104,6 @@ func init() {
}
cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID to be used for this operation. The specified security token must have permission to interact with the organization.")
cmd.MarkFlagRequired("orgid")
- cmd.Flags().StringVar(&active, "active", "", "Skill configuration data")
- cmd.Flags().StringVar(&name, "name", "", "Skill configuration data")
- cmd.Flags().StringVar(&serviceLevelThreshold, "service-level-threshold", "", "Skill configuration data")
- cmd.Flags().StringVar(&skillType, "skill-type", "", "Skill configuration data")
- cmd.Flags().StringVar(&organizationId, "organization-id", "", "Skill configuration data")
- cmd.Flags().StringVar(&id, "id", "", "Skill configuration data")
- cmd.Flags().StringVar(&version, "version", "", "Skill configuration data")
- cmd.Flags().StringVar(&description, "description", "", "Skill configuration data")
- cmd.Flags().StringVar(&enumSkillValues, "enum-skill-values", "", "Skill configuration data")
- cmd.Flags().StringVar(&dynamicSkill, "dynamic-skill", "", "Skill configuration data")
- cmd.Flags().StringVar(&createdTime, "created-time", "", "Skill configuration data")
- cmd.Flags().StringVar(&lastUpdatedTime, "last-updated-time", "", "Skill configuration data")
cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
skillCmd.AddCommand(cmd)
@@ -148,8 +115,8 @@ func init() {
var bodyFile string
cmd := &cobra.Command{
Use: "bulk-save",
- Short: "Bulk save Skill(s)",
- Long: `Create, Update or delete Skill(s) in bulk in a given organization.`,
+ Short: "Bulk save Skills",
+ Long: `Create, Update or delete Skills in bulk in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "POST", "/organization/{orgid}/skill/bulk")
req.PathParam("orgid", orgid)
@@ -213,8 +180,8 @@ func init() {
var nextStartId string
cmd := &cobra.Command{
Use: "purge-inactive",
- Short: "Purge inactive Skill(s)",
- Long: `Purge inactive Skill(s) older than the configured interval for a given organization.`,
+ Short: "Purge inactive Skills",
+ Long: `Purge inactive Skills older than the configured interval for a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "POST", "/organization/{orgid}/skill/purge-inactive-entities")
req.PathParam("orgid", orgid)
@@ -228,17 +195,18 @@ func init() {
}
cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID to be used for this operation. The specified security token must have permission to interact with the organization.")
cmd.MarkFlagRequired("orgid")
- cmd.Flags().StringVar(&nextStartId, "next-start-id", "", "This is the entity ID from which items for the next purge batch with be selected.")
+ cmd.Flags().StringVar(&nextStartId, "next-start-id", "", "This is the entity ID from which items for the next purge batch will be selected.")
skillCmd.AddCommand(cmd)
}
- { // get-id
+ { // get
var orgid string
var id string
cmd := &cobra.Command{
- Use: "get-id",
- Short: "Get specific Skill by ID",
- Long: `Retrieve an existing Skill by ID in a given organization.`,
+ Use: "get",
+ Aliases: []string{"get-id"},
+ Short: "Get specific Skill by ID",
+ Long: `Retrieve an existing Skill by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/skill/{id}")
req.PathParam("orgid", orgid)
@@ -264,42 +232,20 @@ func init() {
skillCmd.AddCommand(cmd)
}
- { // update-id
+ { // update
var orgid string
var id string
- var active string
- var name string
- var serviceLevelThreshold string
- var skillType string
- var organizationId string
- var version string
- var description string
- var enumSkillValues string
- var dynamicSkill string
- var createdTime string
- var lastUpdatedTime string
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "update-id",
- Short: "Update specific Skill by ID",
- Long: `Update an existing Skill by ID in a given organization.`,
+ Use: "update",
+ Aliases: []string{"update-id"},
+ Short: "Update specific Skill by ID",
+ Long: `Update an existing Skill by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "PUT", "/organization/{orgid}/skill/{id}")
req.PathParam("orgid", orgid)
req.PathParam("id", id)
- req.QueryParam("active", active)
- req.QueryParam("name", name)
- req.QueryParam("serviceLevelThreshold", serviceLevelThreshold)
- req.QueryParam("skillType", skillType)
- req.QueryParam("organizationId", organizationId)
- req.QueryParam("id", id)
- req.QueryParam("version", version)
- req.QueryParam("description", description)
- req.QueryParam("enumSkillValues", enumSkillValues)
- req.QueryParam("dynamicSkill", dynamicSkill)
- req.QueryParam("createdTime", createdTime)
- req.QueryParam("lastUpdatedTime", lastUpdatedTime)
if bodyFile != "" {
if err := req.SetBodyFile(bodyFile); err != nil {
return err
@@ -318,29 +264,19 @@ func init() {
cmd.MarkFlagRequired("orgid")
cmd.Flags().StringVar(&id, "id", "", "Resource ID of the Skill.")
cmd.MarkFlagRequired("id")
- cmd.Flags().StringVar(&active, "active", "", "Skill configuration data for update")
- cmd.Flags().StringVar(&name, "name", "", "Skill configuration data for update")
- cmd.Flags().StringVar(&serviceLevelThreshold, "service-level-threshold", "", "Skill configuration data for update")
- cmd.Flags().StringVar(&skillType, "skill-type", "", "Skill configuration data for update")
- cmd.Flags().StringVar(&organizationId, "organization-id", "", "Skill configuration data for update")
- cmd.Flags().StringVar(&version, "version", "", "Skill configuration data for update")
- cmd.Flags().StringVar(&description, "description", "", "Skill configuration data for update")
- cmd.Flags().StringVar(&enumSkillValues, "enum-skill-values", "", "Skill configuration data for update")
- cmd.Flags().StringVar(&dynamicSkill, "dynamic-skill", "", "Skill configuration data for update")
- cmd.Flags().StringVar(&createdTime, "created-time", "", "Skill configuration data for update")
- cmd.Flags().StringVar(&lastUpdatedTime, "last-updated-time", "", "Skill configuration data for update")
cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
skillCmd.AddCommand(cmd)
}
- { // delete-id
+ { // delete
var orgid string
var id string
cmd := &cobra.Command{
- Use: "delete-id",
- Short: "Delete specific Skill by ID",
- Long: `Delete an existing Skill by ID in a given organization.`,
+ Use: "delete",
+ Aliases: []string{"delete-id"},
+ Short: "Delete specific Skill by ID",
+ Long: `Delete an existing Skill by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "DELETE", "/organization/{orgid}/skill/{id}")
req.PathParam("orgid", orgid)
diff --git a/cmd/cc/skill_profile.go b/cmd/cc/skill_profile.go
index 86d0693..189d366 100644
--- a/cmd/cc/skill_profile.go
+++ b/cmd/cc/skill_profile.go
@@ -199,14 +199,15 @@ func init() {
skillProfileCmd.AddCommand(cmd)
}
- { // get-id
+ { // get
var orgid string
var id string
var includeSkillDetails string
cmd := &cobra.Command{
- Use: "get-id",
- Short: "Get specific Skill Profile by ID",
- Long: `Retrieve an existing Skill Profile by ID in a given organization.`,
+ Use: "get",
+ Aliases: []string{"get-id"},
+ Short: "Get specific Skill Profile by ID",
+ Long: `Retrieve an existing Skill Profile by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/skill-profile/{id}")
req.PathParam("orgid", orgid)
@@ -234,7 +235,7 @@ func init() {
skillProfileCmd.AddCommand(cmd)
}
- { // update-id
+ { // update
var orgid string
var id string
var activeSkills string
@@ -248,9 +249,10 @@ func init() {
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "update-id",
- Short: "Update specific Skill Profile by ID",
- Long: `Update an existing Skill Profile by ID in a given organization.`,
+ Use: "update",
+ Aliases: []string{"update-id"},
+ Short: "Update specific Skill Profile by ID",
+ Long: `Update an existing Skill Profile by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "PUT", "/organization/{orgid}/skill-profile/{id}")
req.PathParam("orgid", orgid)
@@ -295,13 +297,14 @@ func init() {
skillProfileCmd.AddCommand(cmd)
}
- { // delete-id
+ { // delete
var orgid string
var id string
cmd := &cobra.Command{
- Use: "delete-id",
- Short: "Delete specific Skill Profile by ID",
- Long: `Delete an existing Skill Profile by ID in a given organization.`,
+ Use: "delete",
+ Aliases: []string{"delete-id"},
+ Short: "Delete specific Skill Profile by ID",
+ Long: `Delete an existing Skill Profile by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "DELETE", "/organization/{orgid}/skill-profile/{id}")
req.PathParam("orgid", orgid)
diff --git a/cmd/cc/tasks.go b/cmd/cc/tasks.go
index cd09714..7be8a0e 100644
--- a/cmd/cc/tasks.go
+++ b/cmd/cc/tasks.go
@@ -4,7 +4,6 @@ package cc
import (
"fmt"
- "strconv"
cmd "github.com/Cloverhound/webex-cli/cmd"
"github.com/Cloverhound/webex-cli/internal/client"
@@ -18,7 +17,6 @@ import (
var _ = fmt.Sprintf
var _ = config.Token
var _ = output.Print
-var _ = strconv.Itoa
var _ = timeutil.ParseLastISO
var tasksCmd = &cobra.Command{
@@ -35,7 +33,7 @@ func init() {
cmd := &cobra.Command{
Use: "create",
Short: "Create Task",
- Long: "Creates a Work Item task. Requires `CJP_User` scope for authorization.",
+ Long: "This feature is currently in Beta. Contact your Cisco team if you want access to this feature.\n\nCreates a new contact center task using the v2 task contract. The request body must include a `channelType` discriminator to select the task variant \u2014 `workItem` for structured form tasks, `customMessaging` for conversational messaging tasks, or `telephony` for voice tasks.\n\nOn success, returns a `201` response containing the task ID, which can be used to track the task lifecycle.\n\nRequires `cjp:task_write` OAuth scope. For partner-initiated inbound tasks (`workItem`, `customMessaging`), the `cjp:task_write` scope must be present in the partner application's access token. When an authenticated agent initiates an outdial (`telephony`) task, ensure the `cjp:task_write` scope is included in the agent's access token.",
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "POST", "/v2/tasks")
if bodyFile != "" {
@@ -261,15 +259,16 @@ If the header is not present in the request or if gzip is not listed as one of t
tasksCmd.AddCommand(cmd)
}
- { // resume
+ { // unhold
var taskId string
var mediaResourceId string
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "resume",
- Short: "Resume Task",
- Long: `Access this endpoint when the user has to resume a call from hold. When an user is done consulting, the previously held interaction with the customer should be resumed. It is not applicable for chats and emails. Requires one of the following scopes 'cjp:user','cloud-contact-center:pod_conv' for authorization. For a list of possible response messages, see the [Call Control API Guide](/docs/contact-control-apis).`,
+ Use: "unhold",
+ Aliases: []string{"resume"},
+ Short: "Unhold Task",
+ Long: `Access this endpoint when the user has to resume a call from hold. When an user is done consulting, the previously held interaction with the customer should be resumed. It is not applicable for chats and emails. Requires one of the following scopes 'cjp:user','cloud-contact-center:pod_conv' for authorization. For a list of possible response messages, see the [Call Control API Guide](/docs/contact-control-apis).`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "POST", "/v1/tasks/{taskId}/unhold")
req.PathParam("taskId", taskId)
@@ -726,14 +725,15 @@ If the header is not present in the request or if gzip is not listed as one of t
tasksCmd.AddCommand(cmd)
}
- { // update-2
+ { // append-message
var taskId string
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "update-2",
- Short: "Update Task",
- Long: "Appends a Work Item message to an existing task. This is an asynchronous operation. Requires `CJP_User` scope for authorization.",
+ Use: "append-message",
+ Aliases: []string{"update-2"},
+ Short: "Append Task Message",
+ Long: "This feature is currently in Beta. Contact your Cisco team if you want access to this feature.\n\nAppends an inbound message to an existing `workItem` or `customMessaging` task. Use this API after the initial task has been created through Create Task. Requires `cjp:task_write` OAuth scope. For partner-initiated inbound message appends, the `cjp:task_write` scope must be present in the partner application's access token.\n\nOn success, returns a `202` response containing the append event identifier as `data.id`. Partners can use this identifier to correlate subsequent webhook delivery for the appended message.",
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "POST", "/v2/tasks/{taskId}/messages")
req.PathParam("taskId", taskId)
@@ -751,11 +751,78 @@ If the header is not present in the request or if gzip is not listed as one of t
return output.Print(resp, statusCode)
},
}
- cmd.Flags().StringVar(&taskId, "task-id", "", "The unique ID of the Work Item task.")
+ cmd.Flags().StringVar(&taskId, "task-id", "", "UUID of the existing task to which the message will be appended.")
cmd.MarkFlagRequired("task-id")
cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
tasksCmd.AddCommand(cmd)
}
+ { // drop-participant-conference
+ var taskId string
+ var participantId string
+ cmd := &cobra.Command{
+ Use: "drop-participant-conference",
+ Short: "Drop Participant From Conference",
+ Long: "Access this endpoint when the user needs to drop a specific participant from an active conference associated with a task. This operation removes only the targeted participant while keeping the remaining parties in the conference. Requires `cjp:user` scope for authorization. For a list of possible response messages, see the [Call Control API Guide](/docs/contact-control-apis)",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "POST", "/v1/tasks/{taskId}/conference/participants/{participantId}/drop")
+ req.PathParam("taskId", taskId)
+ req.PathParam("participantId", participantId)
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&taskId, "task-id", "", "The taskId represents the task that the user is currently working on. It will be generated automatically during the creation of a new task.")
+ cmd.MarkFlagRequired("task-id")
+ cmd.Flags().StringVar(&participantId, "participant-id", "", "The ID of the participant ( Agent / DN / Entry Point DN / Customer) to be dropped from the conference, maximum length 36 characters.")
+ cmd.MarkFlagRequired("participant-id")
+ tasksCmd.AddCommand(cmd)
+ }
+
+ { // pause-digital
+ var taskId string
+ cmd := &cobra.Command{
+ Use: "pause-digital",
+ Short: "Pause Task",
+ Long: "Access this endpoint when users such as administrators, supervisors, or agents with an agent license need to pause a task that cannot be handled immediately. This API is supported only for non-real-time digital channels, such as email, social, etc. Authorization requires the `cjp:user` scope. For a list of potential response messages, refer to the [Call Control API Guide](/docs/contact-control-apis).",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "POST", "/v1/tasks/{taskId}/pause")
+ req.PathParam("taskId", taskId)
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&taskId, "task-id", "", "The unique ID represents the interaction or task that the user wants to pause.")
+ cmd.MarkFlagRequired("task-id")
+ tasksCmd.AddCommand(cmd)
+ }
+
+ { // resume-digital
+ var taskId string
+ cmd := &cobra.Command{
+ Use: "resume-digital",
+ Short: "Resume Task",
+ Long: "Access this endpoint when users such as administrators, supervisors, or agents with an agent license need to resume a previously paused task. This API is supported only for non-real-time digital channels, such as email, social, etc. Authorization requires the `cjp:user` scope. For a list of potential response messages, refer to the [Call Control API Guide](/docs/contact-control-apis).",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "POST", "/v1/tasks/{taskId}/resume")
+ req.PathParam("taskId", taskId)
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&taskId, "task-id", "", "The unique ID represents the interaction or task that the user wants to resume.")
+ cmd.MarkFlagRequired("task-id")
+ tasksCmd.AddCommand(cmd)
+ }
+
}
diff --git a/cmd/cc/team.go b/cmd/cc/team.go
index 2ec9523..d118a88 100644
--- a/cmd/cc/team.go
+++ b/cmd/cc/team.go
@@ -41,8 +41,8 @@ func init() {
var singleObjectResponse string
cmd := &cobra.Command{
Use: "list",
- Short: "List Team(s)",
- Long: `Retrieve a list of Team(s) in a given organization.`,
+ Short: "List Teams",
+ Long: `Retrieve a list of Teams in a given organization. Note: Returning array fields in the List (Get All) API response is deprecated. To retrieve the complete resource with all fields, please use the Get-by-ID API instead.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/v2/team")
req.PathParam("orgid", orgid)
@@ -70,14 +70,14 @@ func init() {
}
cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID to be used for this operation. The specified security token must have permission to interact with the organization.")
cmd.MarkFlagRequired("orgid")
- cmd.Flags().StringVar(&filter, "filter", "", "Specify a filter based on which the results will be fetched. All the fields are supported except: organizationId, userIds, queueRankings, createdTime, lastUpdatedTime Use userId field to filter teams assocaited to provided user. The examples below show some search queries - id==\"57efb0e6-5af0-4245-a67d-d3c5045cdb6e\" - id!=\"57efb0e6-5af0-4245-a67d-d3c5045cdb6e\" - id=in=(\"57efb0e6-5af0-4245-a67d-d3c5045cdb6e\",\"a421e0b2-732e-46f3-a057-39160a53afb9\") - id=out=(\"57efb0e6-5af0-4245-a67d-d3c5045cdb6e\",\"a421e0b2-732e-46f3-a057-39160a53afb9\") This parameter uses the RSQL query syntax, a URI-friendly format for expressing criteria for filtering REST entities. For more information about RSQL in general, see this reference. For a list of supported operators, see this syntax guide. Note: values to be used in the filter syntax should not contain spaces. If they do, please enclose them in quotes to apply the filter. ")
+ cmd.Flags().StringVar(&filter, "filter", "", "Specify a filter based on which the results will be fetched. All the fields are supported except: organizationId, userIds, queueRankings, createdTime, lastUpdatedTime Use the userId field to filter teams associated with the provided user. The examples below show some search queries - id==\"57efb0e6-5af0-4245-a67d-d3c5045cdb6e\" - id!=\"57efb0e6-5af0-4245-a67d-d3c5045cdb6e\" - id=in=(\"57efb0e6-5af0-4245-a67d-d3c5045cdb6e\",\"a421e0b2-732e-46f3-a057-39160a53afb9\") - id=out=(\"57efb0e6-5af0-4245-a67d-d3c5045cdb6e\",\"a421e0b2-732e-46f3-a057-39160a53afb9\") This parameter uses the RSQL query syntax, a URI-friendly format for expressing criteria for filtering REST entities. For more information about RSQL in general, see this reference. For a list of supported operators, see this syntax guide. Note: values to be used in the filter syntax should not contain spaces. If they do, please enclose them in quotes to apply the filter. ")
cmd.Flags().StringVar(&attributes, "attributes", "", "Specify the attributes to be returned. By default, all attributes are returned along with the specified columns. All attributes are supported. except (userIds, queueRankings)")
cmd.Flags().StringVar(&search, "search", "", "Filter data based on the search keyword.Supported search columns(name, description) The examples below show some search queries - \"Cisco\" - field==\"name\";value==\"Cisco\" - fields=in=(\"name\",\"description\");value==\"Cisco\" ")
cmd.Flags().StringVar(&page, "page", "", "Defines the number of displayed page. The page number starts from 0.")
cmd.Flags().StringVar(&pageSize, "page-size", "", "Defines the number of items to be displayed on a page. If the number specified is more than allowed max page size, the API will automatically adjust the page size to the max page size.")
- cmd.Flags().StringVar(&supervisorView, "supervisor-view", "", "If set to true, the API will only return data that user has access to, according to User Profile")
- cmd.Flags().StringVar(&provisioningView, "provisioning-view", "", "If set to true, the API will only return data that user has access to, according to User Profile.")
- cmd.Flags().StringVar(&singleObjectResponse, "single-object-response", "", "Specifiy whether to include array fields in the response, This query param should use only if the response contain single record, if we are using for multiple objects response query param not supported and throws an exception.")
+ cmd.Flags().StringVar(&supervisorView, "supervisor-view", "", "If set to true, the API will only return data that the user has access to, according to the User Profile.")
+ cmd.Flags().StringVar(&provisioningView, "provisioning-view", "", "If set to true, the API will only return data that the user has access to, according to the User Profile.")
+ cmd.Flags().StringVar(&singleObjectResponse, "single-object-response", "", "Specify whether to include array fields in the response. This query parameter should be used only when the response contains a single record. It is not supported for responses with multiple objects and throws an exception.")
teamCmd.AddCommand(cmd)
}
@@ -179,8 +179,8 @@ func init() {
var bodyFile string
cmd := &cobra.Command{
Use: "bulk-save",
- Short: "Bulk save Team(s)",
- Long: `Create, Update or delete Team(s) in bulk in a given organization.`,
+ Short: "Bulk save Teams",
+ Long: `Create, Update or delete Teams in bulk in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "POST", "/organization/{orgid}/team/bulk")
req.PathParam("orgid", orgid)
@@ -244,8 +244,8 @@ func init() {
var nextStartId string
cmd := &cobra.Command{
Use: "purge-inactive",
- Short: "Purge inactive Team(s)",
- Long: `Purge inactive Team(s) older than the configured interval for a given organization.`,
+ Short: "Purge inactive Teams",
+ Long: `Purge inactive Teams older than the configured interval for a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "POST", "/organization/{orgid}/team/purge-inactive-entities")
req.PathParam("orgid", orgid)
@@ -259,17 +259,18 @@ func init() {
}
cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID to be used for this operation. The specified security token must have permission to interact with the organization.")
cmd.MarkFlagRequired("orgid")
- cmd.Flags().StringVar(&nextStartId, "next-start-id", "", "This is the entity ID from which items for the next purge batch with be selected.")
+ cmd.Flags().StringVar(&nextStartId, "next-start-id", "", "This is the entity ID from which items for the next purge batch will be selected.")
teamCmd.AddCommand(cmd)
}
- { // get-id
+ { // get
var orgid string
var id string
cmd := &cobra.Command{
- Use: "get-id",
- Short: "Get specific Team by ID",
- Long: `Retrieve an existing Team by ID in a given organization.`,
+ Use: "get",
+ Aliases: []string{"get-id"},
+ Short: "Get specific Team by ID",
+ Long: `Retrieve an existing Team by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/team/{id}")
req.PathParam("orgid", orgid)
@@ -295,7 +296,7 @@ func init() {
teamCmd.AddCommand(cmd)
}
- { // update-id
+ { // update
var orgid string
var id string
var active string
@@ -320,9 +321,10 @@ func init() {
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "update-id",
- Short: "Update specific Team by ID",
- Long: `Update an existing Team by ID in a given organization.`,
+ Use: "update",
+ Aliases: []string{"update-id"},
+ Short: "Update specific Team by ID",
+ Long: `Update an existing Team by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "PUT", "/organization/{orgid}/team/{id}")
req.PathParam("orgid", orgid)
@@ -389,13 +391,14 @@ func init() {
teamCmd.AddCommand(cmd)
}
- { // delete-id
+ { // delete
var orgid string
var id string
cmd := &cobra.Command{
- Use: "delete-id",
- Short: "Delete specific Team by ID",
- Long: `Delete an existing Team by ID in a given organization.`,
+ Use: "delete",
+ Aliases: []string{"delete-id"},
+ Short: "Delete specific Team by ID",
+ Long: `Delete an existing Team by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "DELETE", "/organization/{orgid}/team/{id}")
req.PathParam("orgid", orgid)
diff --git a/cmd/cc/templates.go b/cmd/cc/templates.go
new file mode 100644
index 0000000..74430fa
--- /dev/null
+++ b/cmd/cc/templates.go
@@ -0,0 +1,83 @@
+// Code generated by codegen/generate_cli.py; DO NOT EDIT.
+
+package cc
+
+import (
+ "fmt"
+
+ cmd "github.com/Cloverhound/webex-cli/cmd"
+ "github.com/Cloverhound/webex-cli/internal/client"
+ "github.com/Cloverhound/webex-cli/internal/config"
+ "github.com/Cloverhound/webex-cli/internal/output"
+ "github.com/spf13/cobra"
+)
+
+// Ensure imports are used.
+var _ = fmt.Sprintf
+var _ = config.Token
+var _ = output.Print
+
+var templatesCmd = &cobra.Command{
+ Use: "templates",
+ Short: "Templates commands",
+}
+
+func init() {
+ cmd.CcCmd.AddCommand(templatesCmd)
+
+ { // list-flow
+ var typeVal string
+ cmd := &cobra.Command{
+ Use: "list-flow",
+ Short: "List Flow Templates",
+ Long: "List available flow templates that can be used to create new flows.\n\nScope: `cjp:config_read`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "GET", "/templates")
+ req.QueryParam("type", typeVal)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(false)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&typeVal, "type", "", "Filter by flow or subflow.")
+ templatesCmd.AddCommand(cmd)
+ }
+
+ { // get-flow
+ var id string
+ cmd := &cobra.Command{
+ Use: "get-flow",
+ Short: "Get a Flow Template",
+ Long: "Retrieve a specific flow template by its ID. Use this to inspect a template's flow structure before creating a flow from it.\n\nScope: `cjp:config_read`",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "GET", "/templates/{id}")
+ req.PathParam("id", id)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(false)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&id, "id", "", "Template ID.")
+ cmd.MarkFlagRequired("id")
+ templatesCmd.AddCommand(cmd)
+ }
+
+}
diff --git a/cmd/cc/usage_reports.go b/cmd/cc/usage_reports.go
new file mode 100644
index 0000000..01c4912
--- /dev/null
+++ b/cmd/cc/usage_reports.go
@@ -0,0 +1,201 @@
+// Code generated by codegen/generate_cli.py; DO NOT EDIT.
+
+package cc
+
+import (
+ "fmt"
+
+ cmd "github.com/Cloverhound/webex-cli/cmd"
+ "github.com/Cloverhound/webex-cli/internal/client"
+ "github.com/Cloverhound/webex-cli/internal/config"
+ "github.com/Cloverhound/webex-cli/internal/output"
+ "github.com/spf13/cobra"
+)
+
+// Ensure imports are used.
+var _ = fmt.Sprintf
+var _ = config.Token
+var _ = output.Print
+
+var usageReportsCmd = &cobra.Command{
+ Use: "usage-reports",
+ Short: "UsageReports commands",
+}
+
+func init() {
+ cmd.CcCmd.AddCommand(usageReportsCmd)
+
+ { // list-resource-types
+ cmd := &cobra.Command{
+ Use: "list-resource-types",
+ Short: "Get available resource types",
+ Long: `Returns the list of available resource types that can be used for report generation, along with available data dates.`,
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "GET", "/v1/usage-reports/resource-types")
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(false)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ usageReportsCmd.AddCommand(cmd)
+ }
+
+ { // create
+ var resourceType string
+ var startDate string
+ var endDate string
+ var bodyRaw string
+ var bodyFile string
+ cmd := &cobra.Command{
+ Use: "create",
+ Short: "Create usage report",
+ Long: "Creates a new usage report for the specified organization, resource type,\nand date range. The report is generated asynchronously in the background.\n\nA single **usage report (reportId)** is always created for each request.\nDepending on the requested date range, the report may contain **one or more\nreport files**, each representing a sub-range of the overall time period.\n\nWhen the requested date range spans **more than 30 days**, the overall range\nis **automatically split by natural calendar months**, and **multiple report\nfiles** are generated under the same report.\n\n**Examples:**\n\n- Requested range: `2025-12-23` ~ `2026-03-20`\n - Generated result:\n - Report ID: single report\n - Report files:\n - `2025-12-23` ~ `2025-12-31`\n - `2026-01-01` ~ `2026-01-31`\n - `2026-02-01` ~ `2026-02-28`\n - `2026-03-01` ~ `2026-03-20`\n\n- Requested range: `2025-12-23` ~ `2026-01-21`\n - Generated result:\n - Report ID: single report\n - Report files:\n - `2025-12-23` ~ `2026-01-21`\n\n**Important Notes:**\n- Only one usage report can be processed at a time for the same organization.\n If there is an ongoing report, new report creation requests will be rejected.\n",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "POST", "/v1/usage-reports")
+ if bodyFile != "" {
+ if err := req.SetBodyFile(bodyFile); err != nil {
+ return err
+ }
+ } else if bodyRaw != "" {
+ req.SetBodyRaw(bodyRaw)
+ } else {
+ req.BodyString("resourceType", resourceType)
+ req.BodyString("startDate", startDate)
+ req.BodyString("endDate", endDate)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&resourceType, "resource-type", "", "")
+ cmd.Flags().StringVar(&startDate, "start-date", "", "")
+ cmd.Flags().StringVar(&endDate, "end-date", "", "")
+ cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
+ cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
+ usageReportsCmd.AddCommand(cmd)
+ }
+
+ { // list
+ var resourceType string
+ var createdAfter string
+ var createdBefore string
+ cmd := &cobra.Command{
+ Use: "list",
+ Short: "List usage reports",
+ Long: "Retrieves a list of usage reports for the organization. Supports optional filtering by resource type and creation date range.\n\nEach report has a `reportId` and may contain one or more generated files in `reportFiles[]`. For long date ranges, the service can split results by calendar month to avoid creating a single very large download. For example, a 12-month report can return up to 12 report files, and a 36-month report can return up to 36 report files.\n\nUse `reportId` to retrieve the overall report status, list the generated files, or delete the report. Use each file's `fileId` or `downloadUrl` to download that specific file. The download API does not accept `reportId`.",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "GET", "/v1/usage-reports")
+ req.QueryParam("resourceType", resourceType)
+ req.QueryParam("createdAfter", createdAfter)
+ req.QueryParam("createdBefore", createdBefore)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(false)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&resourceType, "resource-type", "", "Filter by resource type")
+ cmd.Flags().StringVar(&createdAfter, "created-after", "", "Filter reports created after this timestamp (ISO 8601 format)")
+ cmd.Flags().StringVar(&createdBefore, "created-before", "", "Filter reports created before this timestamp (ISO 8601 format)")
+ usageReportsCmd.AddCommand(cmd)
+ }
+
+ { // get
+ var reportId string
+ cmd := &cobra.Command{
+ Use: "get",
+ Short: "Get usage report details",
+ Long: `Retrieves detailed information for a specific usage report.`,
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "GET", "/v1/usage-reports/{reportId}")
+ req.PathParam("reportId", reportId)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(false)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&reportId, "report-id", "", "Usage report ID")
+ cmd.MarkFlagRequired("report-id")
+ usageReportsCmd.AddCommand(cmd)
+ }
+
+ { // delete
+ var reportId string
+ cmd := &cobra.Command{
+ Use: "delete",
+ Short: "Delete usage report",
+ Long: `Deletes the specified usage report and its associated file. This operation cannot be undone.`,
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "DELETE", "/v1/usage-reports/{reportId}")
+ req.Header("Accept", "*/*")
+ req.PathParam("reportId", reportId)
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&reportId, "report-id", "", "Usage report ID")
+ cmd.MarkFlagRequired("report-id")
+ usageReportsCmd.AddCommand(cmd)
+ }
+
+ { // download-file
+ var fileId string
+ cmd := &cobra.Command{
+ Use: "download-file",
+ Short: "Download usage report file",
+ Long: "Downloads one completed report file as a binary stream.\n\nUse the `fileId` returned in the report's `reportFiles` array. A `reportId` identifies the overall report and cannot be used with this endpoint. Usage Reports can cover up to 36 months of raw data, so large date ranges may be split into one file per calendar month. This keeps individual compressed files more manageable and avoids requiring customers to download a single very large file. If a report contains multiple files, call this endpoint once for each `fileId`.\n\nPassing a `reportId` to this endpoint returns `404` because the path parameter expects a file-level identifier.\n\nThe Developer Portal may not handle binary downloads reliably. Use Postman, curl, or a programmatic API client to download the file.\n\n**Note:** Both file and download URLs expire 7 days after report completion.\n",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "GET", "/v1/usage-reports/{fileId}/download")
+ req.PathParam("fileId", fileId)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(false)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&fileId, "file-id", "", "ID of the specific report file to download. Use fileId, not reportId.")
+ cmd.MarkFlagRequired("file-id")
+ usageReportsCmd.AddCommand(cmd)
+ }
+
+}
diff --git a/cmd/cc/user_profiles.go b/cmd/cc/user_profiles.go
index 7b298c4..da72126 100644
--- a/cmd/cc/user_profiles.go
+++ b/cmd/cc/user_profiles.go
@@ -40,7 +40,7 @@ func init() {
Use: "list",
Short: "List user profiles",
Long: `Retrieve a list of user profiles in a given organization.
- Note: Array fields are removed from List API. If all fields are required please fetch Id's and use get-by-id API.`,
+ Note: Returning array fields in the List (Get All) API response is deprecated. To retrieve the complete resource with all fields, please use the Get-by-ID API instead.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/v3/user-profile")
req.PathParam("orgid", orgid)
@@ -163,14 +163,15 @@ func init() {
userProfilesCmd.AddCommand(cmd)
}
- { // get-id
+ { // get
var orgid string
var id string
var includeNames string
cmd := &cobra.Command{
- Use: "get-id",
- Short: "Get specific User Profile by ID",
- Long: `Retrieve an existing user profile by ID in a given organization.`,
+ Use: "get",
+ Aliases: []string{"get-id"},
+ Short: "Get specific User Profile by ID",
+ Long: `Retrieve an existing user profile by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/v3/user-profile/{id}")
req.PathParam("orgid", orgid)
@@ -198,15 +199,16 @@ func init() {
userProfilesCmd.AddCommand(cmd)
}
- { // update-id
+ { // update
var orgid string
var id string
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "update-id",
- Short: "Update specific User Profile by ID",
- Long: `Update an existing user profile by ID in a given organization.`,
+ Use: "update",
+ Aliases: []string{"update-id"},
+ Short: "Update specific User Profile by ID",
+ Long: `Update an existing user profile by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "PUT", "/organization/{orgid}/v3/user-profile/{id}")
req.PathParam("orgid", orgid)
@@ -234,13 +236,14 @@ func init() {
userProfilesCmd.AddCommand(cmd)
}
- { // delete-id
+ { // delete
var orgid string
var id string
cmd := &cobra.Command{
- Use: "delete-id",
- Short: "Delete specific User Profile by ID",
- Long: `Delete an existing user profile by ID in a given organization.`,
+ Use: "delete",
+ Aliases: []string{"delete-id"},
+ Short: "Delete specific User Profile by ID",
+ Long: `Delete an existing user profile by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "DELETE", "/organization/{orgid}/v3/user-profile/{id}")
req.PathParam("orgid", orgid)
diff --git a/cmd/cc/users.go b/cmd/cc/users.go
index 51d176a..94e0a30 100644
--- a/cmd/cc/users.go
+++ b/cmd/cc/users.go
@@ -45,8 +45,8 @@ func init() {
var includeDynamicSkillsLimitReached string
cmd := &cobra.Command{
Use: "list",
- Short: "List User(s)",
- Long: `Retrieve a list of User(s) in a given organization.`,
+ Short: "List Users",
+ Long: `Retrieve a list of Users in a given organization. Note: Returning array fields in the List (Get All) API response is deprecated. To retrieve the complete resource with all fields, please use the Get-by-ID API instead.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/v2/user")
req.PathParam("orgid", orgid)
@@ -84,11 +84,11 @@ func init() {
cmd.Flags().StringVar(&page, "page", "", "Defines the number of displayed page. The page number starts from 0.")
cmd.Flags().StringVar(&pageSize, "page-size", "", "Defines the number of items to be displayed on a page. If the number specified is more than allowed max page size, the API will automatically adjust the page size to the max page size.")
cmd.Flags().StringVar(&supervisorManagedAgentsOnly, "supervisor-managed-agents-only", "", "If set to true, the API will return contact center enabled users based on the invoking supervisor user's user profile access rights to sites and teams.")
- cmd.Flags().StringVar(&singleObjectResponse, "single-object-response", "", "Specifiy whether to include array fields in the response, This query param should use only if the response contain single record, if we are using for multiple objects response query param not supported and throws an exception.")
+ cmd.Flags().StringVar(&singleObjectResponse, "single-object-response", "", "Specify whether to include array fields in the response. This query parameter should be used only when the response contains a single record. It is not supported for responses with multiple objects and throws an exception.")
cmd.Flags().StringVar(&buddyTeamAgentsOnly, "buddy-team-agents-only", "", "If set to true, returns only users who are part of buddy teams without PBAC check.")
cmd.Flags().StringVar(&userInQueue, "user-in-queue", "", "Can be either assigned or unassigned. If passed, returns the users who are assigned or not assigned to an agent based queue managed by the supervisor.")
- cmd.Flags().StringVar(&queueId, "queue-id", "", "Contact Service Queue Id for which the list of assigned/unassigned agents needs to be fetched.")
- cmd.Flags().StringVar(&includeAimappingCount, "include-aimapping-count", "", "If set to true, the API response will include the count of each AI features mapped to the entity.")
+ cmd.Flags().StringVar(&queueId, "queue-id", "", "Contact Service Queue ID for which the list of assigned or unassigned agents must be fetched.")
+ cmd.Flags().StringVar(&includeAimappingCount, "include-aimapping-count", "", "If set to true, the API response will include the count of each AI feature mapped to the entity.")
cmd.Flags().StringVar(&includeDynamicSkillsLimitReached, "include-dynamic-skills-limit-reached", "", "If true, includes whether each user has reached the dynamic skills assignment limit.")
usersCmd.AddCommand(cmd)
}
@@ -164,6 +164,7 @@ func init() {
var id string
var includeUserProfile string
var includeNames string
+ var includeSkillDetails string
cmd := &cobra.Command{
Use: "get-ci-id",
Short: "Get specific User by CI User ID",
@@ -174,6 +175,7 @@ func init() {
req.PathParam("id", id)
req.QueryParam("includeUserProfile", includeUserProfile)
req.QueryParam("includeNames", includeNames)
+ req.QueryParam("includeSkillDetails", includeSkillDetails)
if config.Paginate() {
resp, statusCode, err := req.DoPaginated(false)
if err != nil {
@@ -194,6 +196,7 @@ func init() {
cmd.MarkFlagRequired("id")
cmd.Flags().StringVar(&includeUserProfile, "include-user-profile", "", "Specifiy whether to include user profile data")
cmd.Flags().StringVar(&includeNames, "include-names", "", "Specifiy whether to include resource collection names")
+ cmd.Flags().StringVar(&includeSkillDetails, "include-skill-details", "", "If set to true, the response includes skill information for each dynamic skill assignment.")
usersCmd.AddCommand(cmd)
}
@@ -202,18 +205,6 @@ func init() {
var search string
var page string
var pageSize string
- var condition string
- var skillId string
- var skillValue string
- var organizationId string
- var id string
- var version int64
- var skillName string
- var skillType string
- var weight int64
- var dynamicSkill bool
- var createdTime int64
- var lastUpdatedTime int64
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
@@ -232,19 +223,6 @@ func init() {
}
} else if bodyRaw != "" {
req.SetBodyRaw(bodyRaw)
- } else {
- req.BodyString("condition", condition)
- req.BodyString("skillId", skillId)
- req.BodyString("skillValue", skillValue)
- req.BodyString("organizationId", organizationId)
- req.BodyString("id", id)
- req.BodyInt("version", version, cmd.Flags().Changed("version"))
- req.BodyString("skillName", skillName)
- req.BodyString("skillType", skillType)
- req.BodyInt("weight", weight, cmd.Flags().Changed("weight"))
- req.BodyBool("dynamicSkill", dynamicSkill, cmd.Flags().Changed("dynamic-skill"))
- req.BodyInt("createdTime", createdTime, cmd.Flags().Changed("created-time"))
- req.BodyInt("lastUpdatedTime", lastUpdatedTime, cmd.Flags().Changed("last-updated-time"))
}
resp, statusCode, err := req.Do()
if err != nil {
@@ -258,24 +236,12 @@ func init() {
cmd.Flags().StringVar(&search, "search", "", "Filter data based on the search keyword.Supported search columns(firstName, lastName, email) The examples below show some search queries - \"Cisco\" - field==\"firstName\";value==\"Cisco\" - fields=in=(\"firstName\",\"lastName\");value==\"Cisco\" ")
cmd.Flags().StringVar(&page, "page", "", "Defines the number of displayed page. The page number starts from 0.")
cmd.Flags().StringVar(&pageSize, "page-size", "", "Defines the number of items to be displayed on a page. If the number specified is more than allowed max page size, the API will automatically adjust the page size to the max page size.")
- cmd.Flags().StringVar(&condition, "condition", "", "")
- cmd.Flags().StringVar(&skillId, "skill-id", "", "")
- cmd.Flags().StringVar(&skillValue, "skill-value", "", "")
- cmd.Flags().StringVar(&organizationId, "organization-id", "", "")
- cmd.Flags().StringVar(&id, "id", "", "")
- cmd.Flags().Int64Var(&version, "version", 0, "")
- cmd.Flags().StringVar(&skillName, "skill-name", "", "")
- cmd.Flags().StringVar(&skillType, "skill-type", "", "")
- cmd.Flags().Int64Var(&weight, "weight", 0, "")
- cmd.Flags().BoolVar(&dynamicSkill, "dynamic-skill", false, "")
- cmd.Flags().Int64Var(&createdTime, "created-time", 0, "")
- cmd.Flags().Int64Var(&lastUpdatedTime, "last-updated-time", 0, "")
cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
usersCmd.AddCommand(cmd)
}
- { // get-ids
+ { // list-by-ids
var orgid string
var page string
var pageSize string
@@ -285,9 +251,10 @@ func init() {
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "get-ids",
- Short: "Fetch User details by IDs",
- Long: `Retrieve an existing User's first name, last name and email by list of IDs in a given organization.`,
+ Use: "list-by-ids",
+ Aliases: []string{"get-ids"},
+ Short: "List Users with details",
+ Long: `Retrieve an existing User's first name, last name and email by list of IDs in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "POST", "/organization/{orgid}/user/fetch-user-details-by-ids")
req.PathParam("orgid", orgid)
@@ -328,7 +295,7 @@ func init() {
cmd := &cobra.Command{
Use: "list-along-profile",
Short: "List Users along with profile",
- Long: `Retrieve a list of User(s) along with their UserProfiles in a given organization.`,
+ Long: `Retrieve a list of Users along with their User Profiles in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/user/with-user-profile")
req.PathParam("orgid", orgid)
@@ -357,7 +324,7 @@ func init() {
cmd := &cobra.Command{
Use: "get-along-profile-id",
Short: "Get specific User along with profile by ID",
- Long: `Retrieve an existing User along with the corresponding UserProfile by ID in a given organization.`,
+ Long: `Retrieve an existing User along with the corresponding User Profile by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/user/with-user-profile/{id}")
req.PathParam("orgid", orgid)
@@ -383,7 +350,7 @@ func init() {
usersCmd.AddCommand(cmd)
}
- { // get-id
+ { // get
var orgid string
var id string
var includeCount string
@@ -391,10 +358,13 @@ func init() {
var includeSkillProfileAudit string
var includeReskillAuditInfo string
var includeSkillDetails string
+ var checkIfUserHasDynamicSkill string
+ var dynamicSkillId string
cmd := &cobra.Command{
- Use: "get-id",
- Short: "Get specific User by ID",
- Long: `Retrieve an existing Users by ID in a given organization.`,
+ Use: "get",
+ Aliases: []string{"get-id"},
+ Short: "Get specific User by ID",
+ Long: `Retrieve an existing Users by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/user/{id}")
req.PathParam("orgid", orgid)
@@ -404,6 +374,8 @@ func init() {
req.QueryParam("includeSkillProfileAudit", includeSkillProfileAudit)
req.QueryParam("includeReskillAuditInfo", includeReskillAuditInfo)
req.QueryParam("includeSkillDetails", includeSkillDetails)
+ req.QueryParam("checkIfUserHasDynamicSkill", checkIfUserHasDynamicSkill)
+ req.QueryParam("dynamicSkillId", dynamicSkillId)
if config.Paginate() {
resp, statusCode, err := req.DoPaginated(false)
if err != nil {
@@ -422,23 +394,26 @@ func init() {
cmd.MarkFlagRequired("orgid")
cmd.Flags().StringVar(&id, "id", "", "Resource ID of the User.")
cmd.MarkFlagRequired("id")
- cmd.Flags().StringVar(&includeCount, "include-count", "", "If set to true, the API response will include the count of each type of Contact Service Queues that the user is assigned to")
- cmd.Flags().StringVar(&includeUserProfileType, "include-user-profile-type", "", "If set to true, the API response will include the user profile")
+ cmd.Flags().StringVar(&includeCount, "include-count", "", "If set to true, the API response will include the count of each type of Contact Service Queue to which the user is assigned.")
+ cmd.Flags().StringVar(&includeUserProfileType, "include-user-profile-type", "", "If set to true, the API response includes the User Profile.")
cmd.Flags().StringVar(&includeSkillProfileAudit, "include-skill-profile-audit", "", "If set to true gives skill profile modification info.")
cmd.Flags().StringVar(&includeReskillAuditInfo, "include-reskill-audit-info", "", "If set to true gives skill profile and dynamic skill modification info.")
- cmd.Flags().StringVar(&includeSkillDetails, "include-skill-details", "", "If set to true,the response includes skill information for each dynamic skill assignment")
+ cmd.Flags().StringVar(&includeSkillDetails, "include-skill-details", "", "If set to true, the response includes skill information for each dynamic skill assignment.")
+ cmd.Flags().StringVar(&checkIfUserHasDynamicSkill, "check-if-user-has-dynamic-skill", "", "If set to true, checks if user has the specified dynamic skill")
+ cmd.Flags().StringVar(&dynamicSkillId, "dynamic-skill-id", "", "Dynamic skill ID to check if user has it assigned (required when checkIfUserHasDynamicSkill is true)")
usersCmd.AddCommand(cmd)
}
- { // update-id
+ { // update
var orgid string
var id string
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "update-id",
- Short: "Update specific User by ID",
- Long: `Update an existing User by ID in a given organization.`,
+ Use: "update",
+ Aliases: []string{"update-id"},
+ Short: "Update specific User by ID",
+ Long: `Update an existing User by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "PUT", "/organization/{orgid}/user/{id}")
req.PathParam("orgid", orgid)
@@ -466,16 +441,17 @@ func init() {
usersCmd.AddCommand(cmd)
}
- { // patch-id
+ { // patch
var orgid string
var id string
var valueType string
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "patch-id",
- Short: "Partially update User by ID",
- Long: `Partially update User by ID in a given organization.`,
+ Use: "patch",
+ Aliases: []string{"patch-id"},
+ Short: "Partially update User by ID",
+ Long: `Partially update User by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "PATCH", "/organization/{orgid}/user/{id}")
req.PathParam("orgid", orgid)
@@ -547,15 +523,16 @@ func init() {
usersCmd.AddCommand(cmd)
}
- { // bulk-update-dynamic-skills
+ { // bulk-partial-update-dynamic-skills
var orgid string
var skillId string
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "bulk-update-dynamic-skills",
- Short: "Bulk update User dynamic skills",
- Long: `Assign or unassign a dynamic skill to/from multiple users in bulk for a given organization.`,
+ Use: "bulk-partial-update-dynamic-skills",
+ Aliases: []string{"bulk-update-dynamic-skills"},
+ Short: "Bulk partial update Users with dynamic skills",
+ Long: `Assign or unassign a dynamic skill to/from multiple users in bulk for a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "PATCH", "/organization/{orgid}/user/bulk/update-dynamic-skill/{skillId}")
req.PathParam("orgid", orgid)
@@ -576,7 +553,7 @@ func init() {
}
cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID to be used for this operation. The specified security token must have permission to interact with the organization.")
cmd.MarkFlagRequired("orgid")
- cmd.Flags().StringVar(&skillId, "skill-id", "", "The unique identifier of the skill.")
+ cmd.Flags().StringVar(&skillId, "skill-id", "", "Dynamic skill ID used for bulk update")
cmd.MarkFlagRequired("skill-id")
cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
@@ -660,4 +637,42 @@ func init() {
usersCmd.AddCommand(cmd)
}
+ { // list-call-monitoring-id
+ var orgid string
+ var id string
+ var page string
+ var pageSize string
+ cmd := &cobra.Command{
+ Use: "list-call-monitoring-id",
+ Short: "List users by call monitoring id",
+ Long: `Fetch paginated users associated to the selected call monitoring team filters while enforcing team ACL.`,
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/user/by-call-monitoring-id/{id}")
+ req.PathParam("orgid", orgid)
+ req.PathParam("id", id)
+ req.QueryParam("page", page)
+ req.QueryParam("pageSize", pageSize)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(false)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&orgid, "orgid", "", "Organization ID to be used for this operation. The specified security token must have permission to interact with the organization.")
+ cmd.MarkFlagRequired("orgid")
+ cmd.Flags().StringVar(&id, "id", "", "Resource ID of the call monitoring.")
+ cmd.MarkFlagRequired("id")
+ cmd.Flags().StringVar(&page, "page", "", "Defines the number of displayed page. The page number starts from 0.")
+ cmd.Flags().StringVar(&pageSize, "page-size", "", "Defines the number of items to be displayed on a page. If the number specified is more than allowed max page size, the API will automatically adjust the page size to the max page size.")
+ usersCmd.AddCommand(cmd)
+ }
+
}
diff --git a/cmd/cc/work_types.go b/cmd/cc/work_types.go
index c9b5b5d..f877137 100644
--- a/cmd/cc/work_types.go
+++ b/cmd/cc/work_types.go
@@ -174,13 +174,14 @@ func init() {
workTypesCmd.AddCommand(cmd)
}
- { // get-id
+ { // get
var orgid string
var id string
cmd := &cobra.Command{
- Use: "get-id",
- Short: "Get specific Work Type by ID",
- Long: `Retrieve an existing Work Type by ID in a given organization.`,
+ Use: "get",
+ Aliases: []string{"get-id"},
+ Short: "Get specific Work Type by ID",
+ Long: `Retrieve an existing Work Type by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "GET", "/organization/{orgid}/work-type/{id}")
req.PathParam("orgid", orgid)
@@ -206,7 +207,7 @@ func init() {
workTypesCmd.AddCommand(cmd)
}
- { // update-id
+ { // update
var orgid string
var id string
var active bool
@@ -219,9 +220,10 @@ func init() {
var bodyRaw string
var bodyFile string
cmd := &cobra.Command{
- Use: "update-id",
- Short: "Update specific Work Type by ID",
- Long: `Update an existing Work Type by ID in a given organization.`,
+ Use: "update",
+ Aliases: []string{"update-id"},
+ Short: "Update specific Work Type by ID",
+ Long: `Update an existing Work Type by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "PUT", "/organization/{orgid}/work-type/{id}")
req.PathParam("orgid", orgid)
@@ -265,13 +267,14 @@ func init() {
workTypesCmd.AddCommand(cmd)
}
- { // delete-id
+ { // delete
var orgid string
var id string
cmd := &cobra.Command{
- Use: "delete-id",
- Short: "Delete specific Work Type by ID",
- Long: `Delete an existing Work Type by ID in a given organization.`,
+ Use: "delete",
+ Aliases: []string{"delete-id"},
+ Short: "Delete specific Work Type by ID",
+ Long: `Delete an existing Work Type by ID in a given organization.`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CcBaseURL, "DELETE", "/organization/{orgid}/work-type/{id}")
req.PathParam("orgid", orgid)
diff --git a/cmd/device/device_call.go b/cmd/device/device_call.go
index 26916af..ba57822 100644
--- a/cmd/device/device_call.go
+++ b/cmd/device/device_call.go
@@ -1072,7 +1072,7 @@ func init() {
cmd := &cobra.Command{
Use: "get-layout-id",
Short: "Get Device Layout by Device ID",
- Long: "Get layout information of a device by device ID in an organization.\n\nDevice layout customizes a user\u2019s programmable line keys (PLK) on the phone and any attached Key Expansion Modules (KEM) with the existing configured line members and the user\u2019s monitoring list.\n\nThis API requires a full or location administrator auth token with a scope of `spark-admin:telephony_config_read`.",
+ Long: "Get layout information of a device by device ID in an organization.\n\nDevice layout customizes a user\u2019s programmable line keys (PLK) on the phone and any attached Key Expansion Modules (KEM) with the existing configured line members and the user\u2019s monitoring list.\n\n**Note:** When `layoutMode` is DEFAULT, the response includes only `layoutMode` and `userReorderEnabled`. The `lineKeys` field is omitted as the device uses system-assigned default line-key assignments. When `layoutMode` is CUSTOM, the response includes the `lineKeys` array with the custom line-key configuration.\n\nThis API requires a full or location administrator auth token with a scope of `spark-admin:telephony_config_read`.",
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CallingBaseURL, "GET", "/telephony/config/devices/{deviceId}/layout")
req.PathParam("deviceId", deviceId)
@@ -1105,7 +1105,7 @@ func init() {
cmd := &cobra.Command{
Use: "update-layout-id",
Short: "Modify Device Layout by Device ID",
- Long: "Modify the layout of a device by device ID in an organization.\n\nDevice layout customizes a user\u2019s programmable line keys (PLK) on the phone and any attached Key Expansion Modules (KEM) with the existing configured line members and the user\u2019s monitoring list.\n\nThis API requires a full or location administrator auth token with a scope of `spark-admin:telephony_config_write`.",
+ Long: "Modify the layout of a device by device ID in an organization.\n\nDevice layout customizes a user\u2019s programmable line keys (PLK) on the phone and any attached Key Expansion Modules (KEM) with the existing configured line members and the user\u2019s monitoring list.\n\n**Note:** When setting `layoutMode` to DEFAULT, do not include the `lineKeys` field in the request body. The device will use system-assigned default line-key assignments. When setting `layoutMode` to CUSTOM, you must include the `lineKeys` array to specify the custom line-key configuration.\n\nThis API requires a full or location administrator auth token with a scope of `spark-admin:telephony_config_write`.",
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CallingBaseURL, "PUT", "/telephony/config/devices/{deviceId}/layout")
req.PathParam("deviceId", deviceId)
diff --git a/cmd/meetings/meetings.go b/cmd/meetings/meetings.go
index 956351e..e82b48c 100644
--- a/cmd/meetings/meetings.go
+++ b/cmd/meetings/meetings.go
@@ -284,7 +284,7 @@ func init() {
cmd := &cobra.Command{
Use: "patch",
Short: "Patch a Meeting",
- Long: "Updates details for a meeting with a specified meeting ID. This operation applies to meeting series and scheduled meetings. It doesn't apply to ended or in-progress meeting instances. Ad-hoc meetings created by [Create a Meeting](/docs/api/v1/meetings/create-a-meeting) with `adhoc` of `true` and a `roomId` cannot be updated.\n\n* If the `meetingId` value specified is for a scheduled meeting, the operation updates that scheduled meeting without impact on other scheduled meeting of the parent meeting series.\n\n* If the `meetingId` value specified is for a meeting series, the operation updates the entire meeting series. **Note**: If the value of `start`, `end`, or `recurrence` for the meeting series is changed, any exceptional scheduled meeting in this series is cancelled when the meeting series is updated.\n\n* The `agenda`, `recurrence`, and `trackingCodes` attributes can be specified as `null` so that these attributes become null and hidden from the response after the patch. Note that it's the keyword `null` not the string \"null\".\n\n* If the parameter `recurrence` has a value, a recurring meeting is created based on the rule defined by the value of `recurrence`. For a non-recurring meeting which has no `recurrence` value set, its `meetingType` is also `meetingSeries` which is a meeting series with only one occurrence in Webex meeting modeling. If you specify a `recurrence` like `FREQ=DAILY;INTERVAL=1` which never ends, the furthest date of the series is unlimited. You can also specify a `recurrence` with a very distant ending date in the future, e.g. `FREQ=DAILY;INTERVAL=1;UNTIL=21241001T000000Z`, but the actual furthest date accepted for the recurring meeting is five years from now. Specifically, if it has an ending date, there can be up to 5 occurrences for a yearly meeting, 60 occurrences for a monthly meeting, 261 occurrences for a weekly meeting, or 1826 occurrences for a daily meeting.\n\n* You can't update a meeting that starts 10 years or more in the future.\n\n* Updating a meeting in the API that was created via a calendar connector is not allowed. The meeting may be updated in Webex, but the calendar event may not be updated, resulting in duplicate entries. This action is therefore blocked. In case you must overwrite this behavior, please contact devsupport@webex.com.",
+ Long: "\nIf only guests are waiting in the lobby and the host or cohost has not started the meeting, the meeting state remains `inProgress` for 5 minutes after the last guest leaves. The meeting cannot be patched during this time. If the meeting is started by the host or cohost and then ended normally, it can be patched immediately after it ends.\n
\n\nUpdates details for a meeting with a specified meeting ID. This operation applies to meeting series and scheduled meetings. It doesn't apply to ended or in-progress meeting instances. Ad-hoc meetings created by [Create a Meeting](/docs/api/v1/meetings/create-a-meeting) with `adhoc` of `true` and a `roomId` cannot be updated.\n\n* If the `meetingId` value specified is for a scheduled meeting, the operation updates that scheduled meeting without impact on other scheduled meeting of the parent meeting series.\n\n* If the `meetingId` value specified is for a meeting series, the operation updates the entire meeting series. **Note**: If the value of `start`, `end`, or `recurrence` for the meeting series is changed, any exceptional scheduled meeting in this series is cancelled when the meeting series is updated.\n\n* The `agenda`, `recurrence`, and `trackingCodes` attributes can be specified as `null` so that these attributes become null and hidden from the response after the patch. Note that it's the keyword `null` not the string \"null\".\n\n* If the parameter `recurrence` has a value, a recurring meeting is created based on the rule defined by the value of `recurrence`. For a non-recurring meeting which has no `recurrence` value set, its `meetingType` is also `meetingSeries` which is a meeting series with only one occurrence in Webex meeting modeling. If you specify a `recurrence` like `FREQ=DAILY;INTERVAL=1` which never ends, the furthest date of the series is unlimited. You can also specify a `recurrence` with a very distant ending date in the future, e.g. `FREQ=DAILY;INTERVAL=1;UNTIL=21241001T000000Z`, but the actual furthest date accepted for the recurring meeting is five years from now. Specifically, if it has an ending date, there can be up to 5 occurrences for a yearly meeting, 60 occurrences for a monthly meeting, 261 occurrences for a weekly meeting, or 1826 occurrences for a daily meeting.\n\n* You can't update a meeting that starts 10 years or more in the future.\n\n* Updating a meeting in the API that was created via a calendar connector is not allowed. The meeting may be updated in Webex, but the calendar event may not be updated, resulting in duplicate entries. This action is therefore blocked. In case you must overwrite this behavior, please contact devsupport@webex.com.",
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CallingBaseURL, "PATCH", "/meetings/{meetingId}")
req.PathParam("meetingId", meetingId)
@@ -316,7 +316,7 @@ func init() {
cmd := &cobra.Command{
Use: "update",
Short: "Update a Meeting",
- Long: "\nThe PUT method is still supported and behaves the same as before, will be deprecated in the future. Use the PATCH method instead.\n
\n\nUpdates details for a meeting with a specified meeting ID. This operation applies to meeting series and scheduled meetings. It doesn't apply to ended or in-progress meeting instances. Ad-hoc meetings created by [Create a Meeting](/docs/api/v1/meetings/create-a-meeting) with `adhoc` of `true` and a `roomId` cannot be updated.\n\n* If the `meetingId` value specified is for a scheduled meeting, the operation updates that scheduled meeting without impact on other scheduled meeting of the parent meeting series.\n\n* If the `meetingId` value specified is for a meeting series, the operation updates the entire meeting series. **Note**: If the value of `start`, `end`, or `recurrence` for the meeting series is changed, any exceptional scheduled meeting in this series is cancelled when the meeting series is updated.\n\n* If the parameter `recurrence` has a value, a recurring meeting is created based on the rule defined by the value of `recurrence`. For a non-recurring meeting which has no `recurrence` value set, its `meetingType` is also `meetingSeries` which is a meeting series with only one occurrence in Webex meeting modeling. If you specify a `recurrence` like `FREQ=DAILY;INTERVAL=1` which never ends, the furthest date of the series is unlimited. You can also specify a `recurrence` with a very distant ending date in the future, e.g. `FREQ=DAILY;INTERVAL=1;UNTIL=21241001T000000Z`, but the actual furthest date accepted for the recurring meeting is five years from now. Specifically, if it has an ending date, there can be up to 5 occurrences for a yearly meeting, 60 occurrences for a monthly meeting, 261 occurrences for a weekly meeting, or 1826 occurrences for a daily meeting.\n\n* You can't update a meeting that starts 10 years or more in the future.\n\n* Updating a meeting created using the API via a calendar connector is not supported. While the meeting may be updated in Webex, the calendar event may not be updated resulting in duplicate entries. If you need to override this behavior, contact devsupport@webex.com.",
+ Long: "\nThe PUT method is still supported and behaves the same as before, will be deprecated in the future. Use the PATCH method instead.\n
\n\n\nIf only guests are waiting in the lobby and the host or cohost has not started the meeting, the meeting state remains `inProgress` for 5 minutes after the last guest leaves. The meeting cannot be updated during this time. If the meeting is started by the host or cohost and then ended normally, it can be updated immediately after it ends.\n
\n\nUpdates details for a meeting with a specified meeting ID. This operation applies to meeting series and scheduled meetings. It doesn't apply to ended or in-progress meeting instances. Ad-hoc meetings created by [Create a Meeting](/docs/api/v1/meetings/create-a-meeting) with `adhoc` of `true` and a `roomId` cannot be updated.\n\n* If the `meetingId` value specified is for a scheduled meeting, the operation updates that scheduled meeting without impact on other scheduled meeting of the parent meeting series.\n\n* If the `meetingId` value specified is for a meeting series, the operation updates the entire meeting series. **Note**: If the value of `start`, `end`, or `recurrence` for the meeting series is changed, any exceptional scheduled meeting in this series is cancelled when the meeting series is updated.\n\n* If the parameter `recurrence` has a value, a recurring meeting is created based on the rule defined by the value of `recurrence`. For a non-recurring meeting which has no `recurrence` value set, its `meetingType` is also `meetingSeries` which is a meeting series with only one occurrence in Webex meeting modeling. If you specify a `recurrence` like `FREQ=DAILY;INTERVAL=1` which never ends, the furthest date of the series is unlimited. You can also specify a `recurrence` with a very distant ending date in the future, e.g. `FREQ=DAILY;INTERVAL=1;UNTIL=21241001T000000Z`, but the actual furthest date accepted for the recurring meeting is five years from now. Specifically, if it has an ending date, there can be up to 5 occurrences for a yearly meeting, 60 occurrences for a monthly meeting, 261 occurrences for a weekly meeting, or 1826 occurrences for a daily meeting.\n\n* You can't update a meeting that starts 10 years or more in the future.\n\n* Updating a meeting created using the API via a calendar connector is not supported. While the meeting may be updated in Webex, the calendar event may not be updated resulting in duplicate entries. If you need to override this behavior, contact devsupport@webex.com.",
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CallingBaseURL, "PUT", "/meetings/{meetingId}")
req.PathParam("meetingId", meetingId)
@@ -348,7 +348,7 @@ func init() {
cmd := &cobra.Command{
Use: "delete",
Short: "Delete a Meeting",
- Long: "Deletes a meeting with a specified meeting ID. The deleted meeting cannot be recovered. This operation applies to meeting series and scheduled meetings. It doesn't apply to ended or in-progress meeting instances. Ad-hoc meetings created by [Create a Meeting](/docs/api/v1/meetings/create-a-meeting) with `adhoc` of `true` and a `roomId` cannot be deleted.\n\n* If the `meetingId` value specified is for a scheduled meeting, the operation deletes that scheduled meeting without impact on other scheduled meeting of the parent meeting series.\n\n* If the `meetingId` value specified is for a meeting series, the operation deletes the entire meeting series.",
+ Long: "\nIf only guests are waiting in the lobby and the host or cohost has not started the meeting, the meeting state remains `inProgress` for 5 minutes after the last guest leaves. The meeting cannot be deleted during this time. If the meeting is started by the host or cohost and then ended normally, it can be deleted immediately after it ends.\n
\n\nDeletes a meeting with a specified meeting ID. The deleted meeting cannot be recovered. This operation applies to meeting series and scheduled meetings. It doesn't apply to ended or in-progress meeting instances. Ad-hoc meetings created by [Create a Meeting](/docs/api/v1/meetings/create-a-meeting) with `adhoc` of `true` and a `roomId` cannot be deleted.\n\n* If the `meetingId` value specified is for a scheduled meeting, the operation deletes that scheduled meeting without impact on other scheduled meeting of the parent meeting series.\n\n* If the `meetingId` value specified is for a meeting series, the operation deletes the entire meeting series.",
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CallingBaseURL, "DELETE", "/meetings/{meetingId}")
req.PathParam("meetingId", meetingId)
@@ -1790,4 +1790,125 @@ func init() {
meetingsCmd.AddCommand(cmd)
}
+ { // list-group
+ var personId string
+ var meetingNumber string
+ var webLink string
+ var current string
+ var timezone string
+ var hostEmail string
+ cmd := &cobra.Command{
+ Use: "list-group",
+ Short: "List Group Meetings",
+ Long: "List group meetings with a specified meeting number or web link by a service app which has group meeting access. You can specify the `personId` parameter or `hostEmail` header of whom the meetings will be retrieved. Please note that there are various products in the [Webex Suite](https://www.webex.com/collaboration-suite.html) such as `Meetings` and `Events`. Currently, only meetings of the `Meetings` product are supported by this API, meetings of others in the suite are not supported. Ad-hoc meetings created by [Create a Meeting](/docs/api/v1/meetings/create-a-meeting) with `adhoc` of `true` and a `roomId` will not be listed.\n\n* One of the `personId` parameter and `hostEmail` header must be specified so that only meetings hosted by the person of `personId` or `hostEmail` will be listed.\n\n* `meetingNumber` and `webLink` are mutually exclusive and they cannot be specified simultaneously, but one of them must be specified. The operation returns an array of meeting objects specified by the `meetingNumber` or `webLink`.\n\n* Each object in the array can be a scheduled meeting or a meeting series depending on whether the `current` parameter is `true` or `false`. If it's `false`, the `start` and `end` attributes are for the first scheduled meeting of that series. If it's `true` or not specified, the `start` and `end` attributes are for the scheduled meeting which is ready to start or join or the upcoming scheduled meeting of that series.\n\n* To learn more about which attributes are available for different meeting states, please refer to [Available Meeting Attributes for Different Meeting States](/docs/meetings#available-meeting-attributes-for-different-meeting-states).\n\n#### Request Header\n\n* `timezone`: [Time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) for time stamps in response body, defined in conformance with the [IANA time zone database](https://www.iana.org/time-zones). The default value is `UTC` if not specified.\n\n* `hostEmail`: Email of the user whose meetings will be retrieved. The `hostEmail` parameter is optional, but one of the `personId` parameter and `hostEmail` header must be specified.",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CallingBaseURL, "GET", "/group/meetings")
+ req.QueryParam("personId", personId)
+ req.QueryParam("meetingNumber", meetingNumber)
+ req.QueryParam("webLink", webLink)
+ req.QueryParam("current", current)
+ req.Header("timezone", timezone)
+ req.Header("hostEmail", hostEmail)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(true)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&personId, "person-id", "", "Person ID of the user whose meetings will be retrieved. The person ID can be retrieved from the [People APIs](/docs/api/v1/people), e.g. [Lit People](/docs/api/v1/people/list-people). Note that a person ID retrieved from the People APIs is a Base64-encoded string, e.g. `Y2lzY29zcGFyazovL3VzL1BFT1BMRS9kNDdiMmU3ZC01ZTBmLTRmNjktYWVmNC1lNGZmOTBhZWE3Yzk`. The person ID in the raw UUID format which is the last part of the Base64-decoded string, e.g. `d47b2e7d-5e0f-4f69-aef4-e4ff90aea7c9`, is also supported. The `personId` parameter is optional, but one of the `personId` parameter and `hostEmail` header must be specified.")
+ cmd.Flags().StringVar(&meetingNumber, "meeting-number", "", "Meeting number for the meeting objects being requested. `meetingNumber` and `webLink` are mutually exclusive. If it's an exceptional meeting from a meeting series, the exceptional meeting instead of the primary meeting series is returned.")
+ cmd.Flags().StringVar(&webLink, "web-link", "", "URL encoded link to information page for the meeting objects being requested. `meetingNumber` and `webLink` are mutually exclusive.")
+ cmd.Flags().StringVar(¤t, "current", "", "Flag identifying to retrieve the current scheduled meeting of the meeting series or the entire meeting series. This parameter only applies to scenarios where the meeting is not an exceptional meeting from a meeting series. If it's `true`, return the scheduled meeting of the meeting series which is ready to join or start or the upcoming scheduled meeting of the meeting series; if it's `false`, return the entire meeting series. The default value is `true`.")
+ cmd.Flags().StringVar(&timezone, "timezone", "", "[Time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) for time stamps in response body, defined in conformance with the [IANA time zone database](https://www.iana.org/time-zones). The default value is `UTC` if not specified.")
+ cmd.Flags().StringVar(&hostEmail, "host-email", "", "Email of the user whose meetings will be retrieved. The `hostEmail` parameter is optional, but one of the `personId` parameter and `hostEmail` header must be specified.")
+ meetingsCmd.AddCommand(cmd)
+ }
+
+ { // patch-group
+ var meetingId string
+ var personId string
+ var hostEmail string
+ var bodyRaw string
+ var bodyFile string
+ cmd := &cobra.Command{
+ Use: "patch-group",
+ Short: "Patch a Group Meeting",
+ Long: "Patches details for a group meeting with a specified meeting ID by a service app which has group meeting access. This operation applies to meeting series and scheduled meetings. It doesn't apply to ended or in-progress meeting instances. Ad-hoc meetings created by [Create a Meeting](/docs/api/v1/meetings/create-a-meeting) with `adhoc` of `true` and a `roomId` cannot be updated.\n\n* One of the `personId` parameter and `hostEmail` header must be specified so that only meetings hosted by the person of `personId` or `hostEmail` will be patch.\n\n* If the `meetingId` value specified is for a scheduled meeting, the operation updates that scheduled meeting without impact on other scheduled meeting of the parent meeting series.\n\n* If the `meetingId` value specified is for a meeting series, the operation updates the entire meeting series. **Note**: If the value of `start`, `end`, or `recurrence` for the meeting series is changed, any exceptional scheduled meeting in this series is cancelled when the meeting series is updated.\n\n* The `agenda`, `recurrence`, and `trackingCodes` attributes can be specified as `null` so that these attributes become null and hidden from the response after the patch. Note that it's the keyword `null` not the string \"null\".\n\n* If the parameter `recurrence` has a value, a recurring meeting is created based on the rule defined by the value of `recurrence`. For a non-recurring meeting which has no `recurrence` value set, its `meetingType` is also `meetingSeries` which is a meeting series with only one occurrence in Webex meeting modeling. If you specify a `recurrence` like `FREQ=DAILY;INTERVAL=1` which never ends, the furthest date of the series is unlimited. You can also specify a `recurrence` with a very distant ending date in the future, e.g. `FREQ=DAILY;INTERVAL=1;UNTIL=21241001T000000Z`, but the actual furthest date accepted for the recurring meeting is five years from now. Specifically, if it has an ending date, there can be up to 5 occurrences for a yearly meeting, 60 occurrences for a monthly meeting, 261 occurrences for a weekly meeting, or 1826 occurrences for a daily meeting.\n\n* You can't update a meeting that starts 10 years or more in the future.\n\n* Updating a meeting in the API that was created via a calendar connector is not allowed. The meeting may be updated in Webex, but the calendar event may not be updated, resulting in duplicate entries. This action is therefore blocked. In case you must overwrite this behavior, please contact devsupport@webex.com.\n\n#### Request Header\n\n* `hostEmail`: Email of the user whose meeting will be patched. The `hostEmail` parameter is optional, but one of the `personId` parameter and `hostEmail` header must be specified.",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CallingBaseURL, "PATCH", "/group/meetings/{meetingId}")
+ req.PathParam("meetingId", meetingId)
+ req.QueryParam("personId", personId)
+ req.Header("hostEmail", hostEmail)
+ if bodyFile != "" {
+ if err := req.SetBodyFile(bodyFile); err != nil {
+ return err
+ }
+ } else if bodyRaw != "" {
+ req.SetBodyRaw(bodyRaw)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&meetingId, "meeting-id", "", "Unique identifier for the meeting to be updated. This parameter applies to meeting series and scheduled meetings. It doesn't apply to ended or in-progress meeting instances. Please note that currently meeting ID of a scheduled [personal room](https://help.webex.com/en-us/article/nul0wut/Webex-Personal-Rooms-in-Webex-Meetings) meeting is not supported for this API.")
+ cmd.MarkFlagRequired("meeting-id")
+ cmd.Flags().StringVar(&personId, "person-id", "", "Person ID of the user whose meeting will be patched. The person ID can be retrieved from the [People APIs](/docs/api/v1/people), e.g. [Lit People](/docs/api/v1/people/list-people). Note that a person ID retrieved from the People APIs is a Base64-encoded string, e.g. `Y2lzY29zcGFyazovL3VzL1BFT1BMRS9kNDdiMmU3ZC01ZTBmLTRmNjktYWVmNC1lNGZmOTBhZWE3Yzk`. The person ID in the raw UUID format which is the last part of the Base64-decoded string, e.g. `d47b2e7d-5e0f-4f69-aef4-e4ff90aea7c9`, is also supported. The `personId` parameter is optional, but one of the `personId` parameter and `hostEmail` header must be specified.")
+ cmd.Flags().StringVar(&hostEmail, "host-email", "", "Email of the user whose meetings will be patched. The `hostEmail` parameter is optional, but one of the `personId` parameter and `hostEmail` header must be specified.")
+ cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
+ cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
+ meetingsCmd.AddCommand(cmd)
+ }
+
+ { // update-group-control-status
+ var personId string
+ var hostEmail string
+ var meetingId string
+ var action string
+ var bodyRaw string
+ var bodyFile string
+ cmd := &cobra.Command{
+ Use: "update-group-control-status",
+ Short: "Update Group Meeting Control Status",
+ Long: "Update meeting recording control status by a service app which has group meeting access. The service app can use this API to start, stop, pause, or resume meeting recording by providing an `action` value. The `personId` parameter or `hostEmail` header of the person to whom the meeting belongs must be specified. The service app which invokes the API manages one or more groups, and it also manages one or more sites. The user specified by `hostEmail` or `personId` must be in a group that is managed by the service app. The meeting specified by `meetingId` must be on a site that is managed by the service app. Please note that once the meeting recording has been controlled by a person in the meeting, the recording control of this meeting can no longer be controlled by the service app via the API.",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CallingBaseURL, "POST", "/group/meetings/controls")
+ req.QueryParam("personId", personId)
+ req.Header("hostEmail", hostEmail)
+ if bodyFile != "" {
+ if err := req.SetBodyFile(bodyFile); err != nil {
+ return err
+ }
+ } else if bodyRaw != "" {
+ req.SetBodyRaw(bodyRaw)
+ } else {
+ req.BodyString("meetingId", meetingId)
+ req.BodyString("action", action)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&personId, "person-id", "", "Person ID of the user whose meeting control will be updated. The person ID can be retrieved from the [People APIs](/docs/api/v1/people), e.g. [Lit People](/docs/api/v1/people/list-people). Note that a person ID retrieved from the People APIs is a Base64-encoded string, e.g. `Y2lzY29zcGFyazovL3VzL1BFT1BMRS9kNDdiMmU3ZC01ZTBmLTRmNjktYWVmNC1lNGZmOTBhZWE3Yzk`. The person ID in the raw UUID format which is the last part of the Base64-decoded string, e.g. `d47b2e7d-5e0f-4f69-aef4-e4ff90aea7c9`, is also supported. The `personId` parameter is optional, but one of the `personId` parameter and `hostEmail` header must be specified.")
+ cmd.Flags().StringVar(&hostEmail, "host-email", "", "Email of the user whose meeting control will be updated. The `hostEmail` parameter is optional, but one of the `personId` parameter and `hostEmail` header must be specified.")
+ cmd.Flags().StringVar(&meetingId, "meeting-id", "", "")
+ cmd.Flags().StringVar(&action, "action", "", "")
+ cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
+ cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
+ meetingsCmd.AddCommand(cmd)
+ }
+
}
diff --git a/cmd/meetings/people.go b/cmd/meetings/people.go
index f5c40d5..33bc5be 100644
--- a/cmd/meetings/people.go
+++ b/cmd/meetings/people.go
@@ -153,7 +153,7 @@ func init() {
cmd := &cobra.Command{
Use: "update-person",
Short: "Update a Person",
- Long: "Update details for a person, by ID.\n\nSpecify the person ID in the `personId` parameter in the URI. Only an admin can update a person details.\n\nInclude all details for the person. This action expects all user details to be present in the request. A common approach is to first [GET the person's details](/docs/api/v1/people/get-person-details), make changes, then PUT both the changed and unchanged values.\n\nAdmin users can include `Webex Calling` (BroadCloud) user details in the response by specifying `callingData` parameter as true.\n\nWhen doing attendee management, to update a user from host role to an attendee for a site append `#attendee` to the respective `siteUrl` and remove the meeting host license for this site from the license array.\nTo update a person from an attendee role to a host for a site, add the meeting license for this site in the meeting array, and remove that site from the `siteurl` parameter.\n\nTo remove the attendee privilege for a user on a meeting site, remove the `sitename#attendee` from the `siteUrl`s array. The `showAllTypes` parameter must be set to `true`.\n\n**NOTE**:\n\n* The `locationId` can only be set when assigning a calling license to a user. It cannot be changed if a user is already an existing calling user.\n\n* The `extension` field should be used to update the Webex Calling extension for a person. The extension value should not include the location routing prefix. The `work_extension` type in the `phoneNumbers` object as seen in the response payload of [List People](/docs/api/v1/people/list-people) or [Get Person Details](/docs/api/v1/people/get-person-details), cannot be used to set the Webex Calling extension for a person.\n\n* When updating a user with multiple email addresses using a PUT request, ensure that the primary email address is listed first in the array. Note that the order of email addresses returned by a GET request is not guaranteed..\n\n* The People API is a combination of several microservices, each responsible for specific attributes of a person. As a result, a PUT request that returns an error response code may still have altered some values of the person's data. Therefore, it is recommended to perform a GET request after encountering an error to verify the current state of the resource. \n\n* Some licenses are implicitly assigned by the system and cannot be admin controlled. They are necessary for the baseline function of the Webex system. If you get an error about implicitly assigned licensed that cannot be removed, please ensure you have the corresponding license in your PUT request.\n\n* When assigning multiple licenses in a single request, the system will assign all valid and available licenses. If any requested licenses cannot be assigned, the operation will continue with the remaining licenses. As a result, it is possible that not all requested licenses are assigned to the user.",
+ Long: "Update details for a person, by ID.\n\nSpecify the person ID in the `personId` parameter in the URI. Only an admin can update a person details.\n\nInclude all details for the person. This action expects all user details to be present in the request. A common approach is to first [GET the person's details](/docs/api/v1/people/get-person-details), make changes, then PUT both the changed and unchanged values.\n\nAdmin users can include `Webex Calling` (BroadCloud) user details in the response by specifying `callingData` parameter as true.\n\nWhen doing attendee management, to update a user from host role to an attendee for a site append `#attendee` to the respective `siteUrl` and remove the meeting host license for this site from the license array.\nTo update a person from an attendee role to a host for a site, add the meeting license for this site in the meeting array, and remove that site from the `siteurl` parameter.\n\nTo remove the attendee privilege for a user on a meeting site, remove the `sitename#attendee` from the `siteUrl`s array. The `showAllTypes` parameter must be set to `true`.\n\n**NOTE**:\n\n* When assigning a Webex Calling license, either a telephone number or extension must already be assigned to the person or provided in the request payload.\n\n* When `callingData` is set to `true`, a Webex Calling license must be included in the `licenses` array.\n\n* The `locationId` can only be set when assigning a calling license to a user. It cannot be changed if a user is already an existing calling user.\n\n* The `extension` field should be used to update the Webex Calling extension for a person. The extension value should not include the location routing prefix. The `work_extension` type in the `phoneNumbers` object as seen in the response payload of [List People](/docs/api/v1/people/list-people) or [Get Person Details](/docs/api/v1/people/get-person-details), cannot be used to set the Webex Calling extension for a person.\n\n* When updating a user with multiple email addresses using a PUT request, ensure that the primary email address is listed first in the array. Note that the order of email addresses returned by a GET request is not guaranteed..\n\n* The People API is a combination of several microservices, each responsible for specific attributes of a person. As a result, a PUT request that returns an error response code may still have altered some values of the person's data. Therefore, it is recommended to perform a GET request after encountering an error to verify the current state of the resource. \n\n* Some licenses are implicitly assigned by the system and cannot be admin controlled. They are necessary for the baseline function of the Webex system. If you get an error about implicitly assigned licensed that cannot be removed, please ensure you have the corresponding license in your PUT request.\n\n* When assigning multiple licenses in a single request, the system will assign all valid and available licenses. If any requested licenses cannot be assigned, the operation will continue with the remaining licenses. As a result, it is possible that not all requested licenses are assigned to the user.",
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CallingBaseURL, "PUT", "/people/{personId}")
req.PathParam("personId", personId)
diff --git a/cmd/meetings/recordings.go b/cmd/meetings/recordings.go
index 155827e..9b8cff6 100644
--- a/cmd/meetings/recordings.go
+++ b/cmd/meetings/recordings.go
@@ -4,6 +4,7 @@ package meetings
import (
"fmt"
+ "strconv"
"strings"
cmd "github.com/Cloverhound/webex-cli/cmd"
@@ -18,6 +19,7 @@ import (
var _ = fmt.Sprintf
var _ = config.Token
var _ = output.Print
+var _ = strconv.Itoa
var _ = strings.Join
var _ = timeutil.ParseLastISO
@@ -46,7 +48,7 @@ func init() {
cmd := &cobra.Command{
Use: "list",
Short: "List Recordings",
- Long: "Lists recordings. You can specify a date range, a parent meeting ID, and the maximum number of recordings to return.\n\nOnly recordings of meetings hosted by or shared with the authenticated user will be listed.\n\nThe list returned is sorted in descending order by the date and time that the recordings were created.\n\nLong result sets are split into [pages](/docs/basics#pagination).\n\n* If `meetingId` is specified, only recordings associated with the specified meeting will be listed. **NOTE**: when `meetingId` is specified, parameter of `siteUrl` will be ignored.\n\n* If `siteUrl` is specified, recordings of the specified site will be listed; otherwise, the API lists recordings of all the user's sites. All available Webex sites and preferred site of the user can be retrieved by [Get Site List](/docs/api/v1/meeting-preferences/get-site-list) API.\n\n#### Request Header\n\n* `timezone`: *[Time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) in conformance with the [IANA time zone database](https://www.iana.org/time-zones). The default is UTC if `timezone` is not defined.*",
+ Long: "This API is still supported and behaves the same as before, but will be deprecated in the future. Due to limited support for special characters when filtering recordings by `topic`, it is recommended to use the new [Query Recordings](/docs/api/v1/recordings/query-recordings) API instead.
\n\nLists recordings. You can specify a date range, a parent meeting ID, and the maximum number of recordings to return.\n\nOnly recordings of meetings hosted by or shared with the authenticated user will be listed.\n\nThe list returned is sorted in descending order by the date and time that the recordings were created.\n\nLong result sets are split into [pages](/docs/basics#pagination).\n\n* If `meetingId` is specified, only recordings associated with the specified meeting will be listed. **NOTE**: when `meetingId` is specified, parameter of `siteUrl` will be ignored.\n\n* If `siteUrl` is specified, recordings of the specified site will be listed; otherwise, the API lists recordings of all the user's sites. All available Webex sites and preferred site of the user can be retrieved by [Get Site List](/docs/api/v1/meeting-preferences/get-site-list) API.\n\n#### Request Header\n\n* `timezone`: *[Time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) in conformance with the [IANA time zone database](https://www.iana.org/time-zones). The default is UTC if `timezone` is not defined.*",
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CallingBaseURL, "GET", "/recordings")
if last != "" {
@@ -114,7 +116,7 @@ func init() {
cmd := &cobra.Command{
Use: "list-admin-compliance-officer",
Short: "List Recordings For an Admin or Compliance Officer",
- Long: "List recordings for an admin or compliance officer. You can specify a date range, a parent meeting ID, and the maximum number of recordings to return.\n\nThe list returned is sorted in descending order by the date and time that the recordings were created.\n\nLong result sets are split into [pages](/docs/basics#pagination).\n\n* If `meetingId` is specified, only recordings associated with the specified meeting will be listed. Please note that when `meetingId` is specified, parameters of `siteUrl`, `from`, and `to` will be ignored.\n\n* If `siteUrl` is specified, all the recordings on the specified site are listed; otherwise, all the recordings on the admin user's or compliance officer's preferred site are listed. All the available Webex sites and the admin user's or compliance officer's preferred site can be retrieved by the [Get Site List](/docs/api/v1/meeting-preferences/get-site-list) API.\n\n#### Request Header\n\n* `timezone`: *[Time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) in conformance with the [IANA time zone database](https://www.iana.org/time-zones). The default is UTC if `timezone` is not defined.*",
+ Long: "This API is still supported and behaves the same as before, but will be deprecated in the future. Due to limited support for special characters when filtering recordings by `topic`, it is recommended to use the new [Query Recordings For an Admin or Compliance Officer](/docs/api/v1/recordings/query-recordings-for-an-admin-or-compliance-officer) API instead.
\n\nList recordings for an admin or compliance officer. You can specify a date range, a parent meeting ID, and the maximum number of recordings to return.\n\nThe list returned is sorted in descending order by the date and time that the recordings were created.\n\nLong result sets are split into [pages](/docs/basics#pagination).\n\n* If `meetingId` is specified, only recordings associated with the specified meeting will be listed. Please note that when `meetingId` is specified, parameters of `siteUrl`, `from`, and `to` will be ignored.\n\n* If `siteUrl` is specified, all the recordings on the specified site are listed; otherwise, all the recordings on the admin user's or compliance officer's preferred site are listed. All the available Webex sites and the admin user's or compliance officer's preferred site can be retrieved by the [Get Site List](/docs/api/v1/meeting-preferences/get-site-list) API.\n\n#### Request Header\n\n* `timezone`: *[Time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) in conformance with the [IANA time zone database](https://www.iana.org/time-zones). The default is UTC if `timezone` is not defined.*",
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CallingBaseURL, "GET", "/admin/recordings")
if last != "" {
@@ -436,7 +438,6 @@ func init() {
var to string
var siteUrl string
var integrationTag string
- var topic string
var format string
var serviceType string
var timezone string
@@ -461,7 +462,6 @@ func init() {
req.QueryParam("to", to)
req.QueryParam("siteUrl", siteUrl)
req.QueryParam("integrationTag", integrationTag)
- req.QueryParam("topic", topic)
req.QueryParam("format", format)
req.QueryParam("serviceType", serviceType)
req.Header("timezone", timezone)
@@ -486,7 +486,6 @@ func init() {
cmd.Flags().StringVar(&to, "to", "", "Ending date and time (exclusive) for List recordings to return, in any [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) compliant format. `to` cannot be before `from`. The interval between `from` and `to` must be within 30 days.")
cmd.Flags().StringVar(&siteUrl, "site-url", "", "URL of the Webex site which the API lists recordings from. If not specified, the API lists recordings from user's preferred site. All available Webex sites and preferred site of the user can be retrieved by [Get Site List](/docs/api/v1/meeting-preferences/get-site-list) API.")
cmd.Flags().StringVar(&integrationTag, "integration-tag", "", "External key of the parent meeting created by an integration application. This parameter is used by the integration application to query recordings by a key in its own domain such as a Zendesk ticket ID, a Jira ID, a Salesforce Opportunity ID, etc. An integrationTag created by one client cannot be accessed or used as a filtering parameter by another client. For example, if a meeting has an `integrationTag` of \"Sales\" which is created by the client behind the developer portal, then this integrationTag can't be accessed on the meeting or its recordings by another client. Neither can it be used to filter meetings or recordings by a client other than the one that created the integrationTag of \"Sales\".")
- cmd.Flags().StringVar(&topic, "topic", "", "Recording topic. If specified, the API filters recordings by topic in a case-insensitive manner.")
cmd.Flags().StringVar(&format, "format", "", "Recording's file format. If specified, the API filters recordings by format.")
cmd.Flags().StringVar(&serviceType, "service-type", "", "The service type for recordings. If specified, the API filters recordings by service type.")
cmd.Flags().StringVar(&timezone, "timezone", "", "e.g. UTC")
@@ -576,4 +575,132 @@ func init() {
recordingsCmd.AddCommand(cmd)
}
+ { // query
+ var timezone string
+ var max int64
+ var from string
+ var to string
+ var meetingId string
+ var siteUrl string
+ var integrationTag string
+ var hostEmail string
+ var topic string
+ var format string
+ var serviceType string
+ var status string
+ var bodyRaw string
+ var bodyFile string
+ cmd := &cobra.Command{
+ Use: "query",
+ Short: "Query Recordings",
+ Long: "Queries recordings with filters in the request body. You can specify a date range, a parent meeting ID, the maximum number of recordings to return, and additional filters such as siteUrl, integrationTag, hostEmail, topic, format, serviceType, and status.\n\nOnly recordings of meetings hosted by or shared with the authenticated user will be listed.\n\nThe list returned is sorted in descending order by the date and time that the recordings were created.\n\nLong result sets are split into [pages](/docs/basics#pagination).\n\n* If `meetingId` is specified, only recordings associated with the specified meeting will be listed. **NOTE**: when `meetingId` is specified, parameter of `siteUrl` will be ignored.\n\n* If `siteUrl` is specified, recordings of the specified site will be listed; otherwise, the API lists recordings of all the user's sites. All available Webex sites and preferred site of the user can be retrieved by [Get Site List](/docs/api/v1/meeting-preferences/get-site-list) API.\n\n#### Request Header\n\n* `timezone`: *[Time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) in conformance with the [IANA time zone database](https://www.iana.org/time-zones). The default is UTC if `timezone` is not defined.*",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CallingBaseURL, "POST", "/recordings/query")
+ req.Header("timezone", timezone)
+ if bodyFile != "" {
+ if err := req.SetBodyFile(bodyFile); err != nil {
+ return err
+ }
+ } else if bodyRaw != "" {
+ req.SetBodyRaw(bodyRaw)
+ } else {
+ req.BodyInt("max", max, cmd.Flags().Changed("max"))
+ req.BodyString("from", from)
+ req.BodyString("to", to)
+ req.BodyString("meetingId", meetingId)
+ req.BodyString("siteUrl", siteUrl)
+ req.BodyString("integrationTag", integrationTag)
+ req.BodyString("hostEmail", hostEmail)
+ req.BodyString("topic", topic)
+ req.BodyString("format", format)
+ req.BodyString("serviceType", serviceType)
+ req.BodyString("status", status)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&timezone, "timezone", "", "e.g. UTC")
+ cmd.Flags().Int64Var(&max, "max", 0, "")
+ cmd.Flags().StringVar(&from, "from", "", "")
+ cmd.Flags().StringVar(&to, "to", "", "")
+ cmd.Flags().StringVar(&meetingId, "meeting-id", "", "")
+ cmd.Flags().StringVar(&siteUrl, "site-url", "", "")
+ cmd.Flags().StringVar(&integrationTag, "integration-tag", "", "")
+ cmd.Flags().StringVar(&hostEmail, "host-email", "", "")
+ cmd.Flags().StringVar(&topic, "topic", "", "")
+ cmd.Flags().StringVar(&format, "format", "", "")
+ cmd.Flags().StringVar(&serviceType, "service-type", "", "")
+ cmd.Flags().StringVar(&status, "status", "", "")
+ cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
+ cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
+ recordingsCmd.AddCommand(cmd)
+ }
+
+ { // query-admin-compliance-officer
+ var timezone string
+ var max int64
+ var from string
+ var to string
+ var meetingId string
+ var siteUrl string
+ var integrationTag string
+ var topic string
+ var format string
+ var serviceType string
+ var status string
+ var bodyRaw string
+ var bodyFile string
+ cmd := &cobra.Command{
+ Use: "query-admin-compliance-officer",
+ Short: "Query Recordings For an Admin or Compliance Officer",
+ Long: "Queries recordings for an admin or compliance officer with filters in the request body. You can specify a date range, a parent meeting ID, the maximum number of recordings to return, and additional filters such as siteUrl, integrationTag, topic, format, serviceType, and status.\n\nThe list returned is sorted in descending order by the date and time that the recordings were created.\n\nLong result sets are split into [pages](/docs/basics#pagination).\n\n* If `meetingId` is specified, only recordings associated with the specified meeting will be listed. Please note that when `meetingId` is specified, parameters of `siteUrl`, `from`, and `to` will be ignored.\n\n* If `siteUrl` is specified, all the recordings on the specified site are listed; otherwise, all the recordings on the admin user's or compliance officer's preferred site are listed. All the available Webex sites and the admin user's or compliance officer's preferred site can be retrieved by the [Get Site List](/docs/api/v1/meeting-preferences/get-site-list) API.\n\n#### Request Header\n\n* `timezone`: *[Time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) in conformance with the [IANA time zone database](https://www.iana.org/time-zones). The default is UTC if `timezone` is not defined.*",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CallingBaseURL, "POST", "/admin/recordings/query")
+ req.Header("timezone", timezone)
+ if bodyFile != "" {
+ if err := req.SetBodyFile(bodyFile); err != nil {
+ return err
+ }
+ } else if bodyRaw != "" {
+ req.SetBodyRaw(bodyRaw)
+ } else {
+ req.BodyInt("max", max, cmd.Flags().Changed("max"))
+ req.BodyString("from", from)
+ req.BodyString("to", to)
+ req.BodyString("meetingId", meetingId)
+ req.BodyString("siteUrl", siteUrl)
+ req.BodyString("integrationTag", integrationTag)
+ req.BodyString("topic", topic)
+ req.BodyString("format", format)
+ req.BodyString("serviceType", serviceType)
+ req.BodyString("status", status)
+ req.BodyString("timezone", timezone)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&timezone, "timezone", "", "e.g. UTC")
+ cmd.Flags().Int64Var(&max, "max", 0, "")
+ cmd.Flags().StringVar(&from, "from", "", "")
+ cmd.Flags().StringVar(&to, "to", "", "")
+ cmd.Flags().StringVar(&meetingId, "meeting-id", "", "")
+ cmd.Flags().StringVar(&siteUrl, "site-url", "", "")
+ cmd.Flags().StringVar(&integrationTag, "integration-tag", "", "")
+ cmd.Flags().StringVar(&topic, "topic", "", "")
+ cmd.Flags().StringVar(&format, "format", "", "")
+ cmd.Flags().StringVar(&serviceType, "service-type", "", "")
+ cmd.Flags().StringVar(&status, "status", "", "")
+ cmd.Flags().StringVar(&bodyRaw, "body", "", "Raw JSON body")
+ cmd.Flags().StringVar(&bodyFile, "body-file", "", "Path to JSON body file")
+ recordingsCmd.AddCommand(cmd)
+ }
+
}
diff --git a/cmd/messaging/hds.go b/cmd/messaging/hds.go
index e7bb172..c8fa3e4 100644
--- a/cmd/messaging/hds.go
+++ b/cmd/messaging/hds.go
@@ -20,8 +20,9 @@ var _ = output.Print
var _ = timeutil.ParseLastISO
var hdsCmd = &cobra.Command{
- Use: "hds",
- Short: "Hds commands",
+ Use: "hds",
+ Aliases: []string{"hybrid-data-security"},
+ Short: "Hds commands",
}
func init() {
@@ -94,7 +95,7 @@ To obtain the Cluster ID needed for this API, use the [Get organization details
cmd := &cobra.Command{
Use: "get-org",
Short: "Get organization details",
- Long: `Retrieve details for an HDS organization, such as the organization name, type of organization, and clusters in the organization.
+ Long: `Retrieve details for an HDS organization, such as the organization name, type of organization.
To obtain the Organization ID needed for this API, use the [Organizations API]()`,
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CallingBaseURL, "GET", "/hds/organizations/{organizationId}")
@@ -249,11 +250,12 @@ To obtain the Cluster ID needed for this API, use the [Get organization details
hdsCmd.AddCommand(cmd)
}
- { // get-database-org-2
+ { // get-database-config-org
var organizationId string
cmd := &cobra.Command{
- Use: "get-database-org-2",
- Short: "Get database details for the HDS organization",
+ Use: "get-database-config-org",
+ Aliases: []string{"get-database-org-2"},
+ Short: "Get database details for the HDS organization",
Long: `Retrieve details of database information for an HDS organization, such as database type and version used.
To obtain the Organization ID needed for this API, use the [Organizations API]()`,
RunE: func(cmd *cobra.Command, args []string) error {
@@ -278,11 +280,12 @@ To obtain the Organization ID needed for this API, use the [Organizations API](<
hdsCmd.AddCommand(cmd)
}
- { // get-multi-tenant-org-2
+ { // list-tenants-org
var organizationId string
cmd := &cobra.Command{
- Use: "get-multi-tenant-org-2",
- Short: "Get Multi-Tenant HDS organization details",
+ Use: "list-tenants-org",
+ Aliases: []string{"get-multi-tenant-org-2"},
+ Short: "Get Multi-Tenant HDS organization details",
Long: `Retrieve details of Multi-Tenant HDS organization such as Organization Name and ID, CMK state and state of Tenants Organizations.
To obtain the Organization ID needed for this API, use the [Organizations API]()`,
RunE: func(cmd *cobra.Command, args []string) error {
@@ -307,4 +310,150 @@ To obtain the Organization ID needed for this API, use the [Organizations API](<
hdsCmd.AddCommand(cmd)
}
+ { // list-nodes-cluster
+ var clusterId string
+ cmd := &cobra.Command{
+ Use: "list-nodes-cluster",
+ Short: "List nodes for an HDS cluster",
+ Long: `Retrieve a list of all nodes for a specific HDS cluster, including availability, proxy details, deployment type, and release version.
+To obtain the Cluster ID needed for this API, use the [List clusters for an HDS organization API]()`,
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CallingBaseURL, "GET", "/hds/clusters/{clusterId}/nodes")
+ req.PathParam("clusterId", clusterId)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(true)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&clusterId, "cluster-id", "", "Unique ID of the HDS cluster.")
+ cmd.MarkFlagRequired("cluster-id")
+ hdsCmd.AddCommand(cmd)
+ }
+
+ { // list-clusters-org
+ var organizationId string
+ cmd := &cobra.Command{
+ Use: "list-clusters-org",
+ Short: "List clusters for an HDS organization",
+ Long: `Retrieve a list of all clusters for a specific HDS organization, including cluster status, release channel, and upgrade schedule details.
+To obtain the Organization ID needed for this API, use the [Organizations API]()`,
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CallingBaseURL, "GET", "/hds/organizations/{organizationId}/clusters")
+ req.PathParam("organizationId", organizationId)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(true)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&organizationId, "organization-id", "", "Unique ID of the HDS organization.")
+ cmd.MarkFlagRequired("organization-id")
+ hdsCmd.AddCommand(cmd)
+ }
+
+ { // get-alarms-node
+ var nodeId string
+ var from string
+ var to string
+ var last string
+ cmd := &cobra.Command{
+ Use: "get-alarms-node",
+ Short: "Get alarms for an HDS node",
+ Long: `Returns the alarm details for a single HDS node for the provided time range (last 24 hours).
+To obtain the Node ID needed for this API, use the [List nodes for an HDS cluster API]()`,
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CallingBaseURL, "GET", "/hds/nodes/{nodeId}/alarms")
+ if last != "" {
+ var err error
+ from, to, err = timeutil.ParseLastISO(last)
+ if err != nil {
+ return err
+ }
+ }
+ req.PathParam("nodeId", nodeId)
+ req.QueryParam("from", from)
+ req.QueryParam("to", to)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(true)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&nodeId, "node-id", "", "Unique ID of the HDS node.")
+ cmd.MarkFlagRequired("node-id")
+ cmd.Flags().StringVar(&from, "from", "", "The start date and time of the requested data in any [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) compliant format.")
+ cmd.Flags().StringVar(&to, "to", "", "The end date and time of the requested data in any [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) compliant format.")
+ cmd.Flags().StringVar(&last, "last", "", "Time range shorthand (e.g. 1h, 30m, 24h). Sets --from automatically.")
+ hdsCmd.AddCommand(cmd)
+ }
+
+ { // get-usage-node
+ var nodeId string
+ var from string
+ var to string
+ var last string
+ cmd := &cobra.Command{
+ Use: "get-usage-node",
+ Short: "Get resource usage for an HDS node",
+ Long: `Retrieve CPU, memory, and disk resource usage details for a specific HDS node over the requested time range.
+To obtain the Node ID needed for this API, use the [List nodes for an HDS cluster API]()`,
+ RunE: func(cmd *cobra.Command, args []string) error {
+ req := client.NewRequest(config.CallingBaseURL, "GET", "/hds/nodes/{nodeId}/resourceUsage")
+ if last != "" {
+ var err error
+ from, to, err = timeutil.ParseLastISO(last)
+ if err != nil {
+ return err
+ }
+ }
+ req.PathParam("nodeId", nodeId)
+ req.QueryParam("from", from)
+ req.QueryParam("to", to)
+ if config.Paginate() {
+ resp, statusCode, err := req.DoPaginated(true)
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ }
+ resp, statusCode, err := req.Do()
+ if err != nil {
+ return err
+ }
+ return output.Print(resp, statusCode)
+ },
+ }
+ cmd.Flags().StringVar(&nodeId, "node-id", "", "Unique ID of the HDS node.")
+ cmd.MarkFlagRequired("node-id")
+ cmd.Flags().StringVar(&from, "from", "", "The start date and time of the requested data in any [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) compliant format.")
+ cmd.Flags().StringVar(&to, "to", "", "The end date and time of the requested data in any [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) compliant format.")
+ cmd.Flags().StringVar(&last, "last", "", "Time range shorthand (e.g. 1h, 30m, 24h). Sets --from automatically.")
+ hdsCmd.AddCommand(cmd)
+ }
+
}
diff --git a/cmd/messaging/people.go b/cmd/messaging/people.go
index dbc56e3..7b454a2 100644
--- a/cmd/messaging/people.go
+++ b/cmd/messaging/people.go
@@ -153,7 +153,7 @@ func init() {
cmd := &cobra.Command{
Use: "update-person",
Short: "Update a Person",
- Long: "Update details for a person, by ID.\n\nSpecify the person ID in the `personId` parameter in the URI. Only an admin can update a person details.\n\nInclude all details for the person. This action expects all user details to be present in the request. A common approach is to first [GET the person's details](/docs/api/v1/people/get-person-details), make changes, then PUT both the changed and unchanged values.\n\nAdmin users can include `Webex Calling` (BroadCloud) user details in the response by specifying `callingData` parameter as true.\n\nWhen doing attendee management, to update a user from host role to an attendee for a site append `#attendee` to the respective `siteUrl` and remove the meeting host license for this site from the license array.\nTo update a person from an attendee role to a host for a site, add the meeting license for this site in the meeting array, and remove that site from the `siteurl` parameter.\n\nTo remove the attendee privilege for a user on a meeting site, remove the `sitename#attendee` from the `siteUrl`s array. The `showAllTypes` parameter must be set to `true`.\n\n**NOTE**:\n\n* The `locationId` can only be set when assigning a calling license to a user. It cannot be changed if a user is already an existing calling user.\n\n* The `extension` field should be used to update the Webex Calling extension for a person. The extension value should not include the location routing prefix. The `work_extension` type in the `phoneNumbers` object as seen in the response payload of [List People](/docs/api/v1/people/list-people) or [Get Person Details](/docs/api/v1/people/get-person-details), cannot be used to set the Webex Calling extension for a person.\n\n* When updating a user with multiple email addresses using a PUT request, ensure that the primary email address is listed first in the array. Note that the order of email addresses returned by a GET request is not guaranteed..\n\n* The People API is a combination of several microservices, each responsible for specific attributes of a person. As a result, a PUT request that returns an error response code may still have altered some values of the person's data. Therefore, it is recommended to perform a GET request after encountering an error to verify the current state of the resource. \n\n* Some licenses are implicitly assigned by the system and cannot be admin controlled. They are necessary for the baseline function of the Webex system. If you get an error about implicitly assigned licensed that cannot be removed, please ensure you have the corresponding license in your PUT request.\n\n* When assigning multiple licenses in a single request, the system will assign all valid and available licenses. If any requested licenses cannot be assigned, the operation will continue with the remaining licenses. As a result, it is possible that not all requested licenses are assigned to the user.",
+ Long: "Update details for a person, by ID.\n\nSpecify the person ID in the `personId` parameter in the URI. Only an admin can update a person details.\n\nInclude all details for the person. This action expects all user details to be present in the request. A common approach is to first [GET the person's details](/docs/api/v1/people/get-person-details), make changes, then PUT both the changed and unchanged values.\n\nAdmin users can include `Webex Calling` (BroadCloud) user details in the response by specifying `callingData` parameter as true.\n\nWhen doing attendee management, to update a user from host role to an attendee for a site append `#attendee` to the respective `siteUrl` and remove the meeting host license for this site from the license array.\nTo update a person from an attendee role to a host for a site, add the meeting license for this site in the meeting array, and remove that site from the `siteurl` parameter.\n\nTo remove the attendee privilege for a user on a meeting site, remove the `sitename#attendee` from the `siteUrl`s array. The `showAllTypes` parameter must be set to `true`.\n\n**NOTE**:\n\n* When assigning a Webex Calling license, either a telephone number or extension must already be assigned to the person or provided in the request payload.\n\n* When `callingData` is set to `true`, a Webex Calling license must be included in the `licenses` array.\n\n* The `locationId` can only be set when assigning a calling license to a user. It cannot be changed if a user is already an existing calling user.\n\n* The `extension` field should be used to update the Webex Calling extension for a person. The extension value should not include the location routing prefix. The `work_extension` type in the `phoneNumbers` object as seen in the response payload of [List People](/docs/api/v1/people/list-people) or [Get Person Details](/docs/api/v1/people/get-person-details), cannot be used to set the Webex Calling extension for a person.\n\n* When updating a user with multiple email addresses using a PUT request, ensure that the primary email address is listed first in the array. Note that the order of email addresses returned by a GET request is not guaranteed..\n\n* The People API is a combination of several microservices, each responsible for specific attributes of a person. As a result, a PUT request that returns an error response code may still have altered some values of the person's data. Therefore, it is recommended to perform a GET request after encountering an error to verify the current state of the resource. \n\n* Some licenses are implicitly assigned by the system and cannot be admin controlled. They are necessary for the baseline function of the Webex system. If you get an error about implicitly assigned licensed that cannot be removed, please ensure you have the corresponding license in your PUT request.\n\n* When assigning multiple licenses in a single request, the system will assign all valid and available licenses. If any requested licenses cannot be assigned, the operation will continue with the remaining licenses. As a result, it is possible that not all requested licenses are assigned to the user.",
RunE: func(cmd *cobra.Command, args []string) error {
req := client.NewRequest(config.CallingBaseURL, "PUT", "/people/{personId}")
req.PathParam("personId", personId)
diff --git a/codegen/README.md b/codegen/README.md
new file mode 100644
index 0000000..5264ae0
--- /dev/null
+++ b/codegen/README.md
@@ -0,0 +1,13 @@
+# Code generation
+
+Run `make codegen` from the repository root to extract API specifications, generate Go commands, and refresh skill command references. Run `make refresh` to download collections first.
+
+Generated files in the six command area packages must not be edited by hand. Change `generate_cli.py` for generation behavior or use `custom_*.go` with the generator skip lists for handwritten request implementations.
+
+## Naming overrides
+
+Define route-specific group names, command names, and compatibility aliases in `naming_overrides.py`. Overrides are keyed by collection, source group, HTTP method, and route so collection reordering does not affect names. Use meaningful resource/action names rather than numeric collision suffixes. IDs belong in flags; exact `get-id`, `delete-id`, `patch-id`, and `update-id` names are shortened centrally with compatibility aliases and collision checks.
+
+Preserve aliases when a name changes without changing the operation. Do not reuse an alias for a different operation or request format. Keep legacy FDL import/export distinct from current typed flow documents. Duplicate route exclusions must identify a replacement; extraction fails if that replacement disappears.
+
+After changes, run `make codegen`, `make check`, and `python3 -m unittest discover -s codegen -p 'test_*.py'`. Update the [command migration reference](../docs/command-migration.md), [command inventory](../docs/command-inventory.md), and affected documentation/skills when public commands change.
diff --git a/codegen/diff_spec.py b/codegen/diff_spec.py
index 3e9c87c..29fb68c 100644
--- a/codegen/diff_spec.py
+++ b/codegen/diff_spec.py
@@ -19,7 +19,7 @@
def load_spec(path):
- """Load spec and return {collection: {group: {command: method}}}."""
+ """Load spec and return {collection: {group: {command: endpoint}}}."""
with open(path) as f:
raw = json.load(f)
@@ -30,7 +30,7 @@ def load_spec(path):
group = g["group"]
result[coll][group] = {}
for ep in g["endpoints"]:
- result[coll][group][ep["command"]] = ep["method"]
+ result[coll][group][ep["command"]] = ep
return result
@@ -41,48 +41,63 @@ def cli_path(coll, group, command=None):
return f"webex {sub} {group}"
-def diff_specs(old, new):
- sections = []
+def endpoint_changes(old, new):
+ """Summarize executable contract changes, independently of request titles."""
+ changes = []
+ for field in ('method', 'path'):
+ if old.get(field) != new.get(field):
+ changes.append(f"{field}: `{old.get(field)}` → `{new.get(field)}`")
+ for field, label in [('path_params', 'path parameters'), ('query_params', 'query parameters'),
+ ('body_fields', 'body fields'), ('extra_headers', 'headers')]:
+ before = {p['name']: p for p in old.get(field, [])}
+ after = {p['name']: p for p in new.get(field, [])}
+ added, removed = sorted(after.keys() - before.keys()), sorted(before.keys() - after.keys())
+ modified = sorted(k for k in before.keys() & after.keys() if before[k] != after[k])
+ details = []
+ if added:
+ details.append('added ' + ', '.join(f'`{k}`' for k in added))
+ if removed:
+ details.append('removed ' + ', '.join(f'`{k}`' for k in removed))
+ if modified:
+ details.append('updated ' + ', '.join(f'`{k}`' for k in modified))
+ if details:
+ changes.append(label + ': ' + '; '.join(details))
+ for field, label in [('has_body', 'request body support'), ('complex_body', 'JSON body handling'),
+ ('aliases', 'compatibility aliases'), ('scopes', 'documented scopes'),
+ ('response_code', 'documented response code')]:
+ if old.get(field, [] if field in ('aliases', 'scopes') else None) != new.get(field, [] if field in ('aliases', 'scopes') else None):
+ changes.append(label + ' changed')
+ if old.get('description') != new.get('description'):
+ changes.append('help/description updated')
+ return changes
- all_colls = sorted(set(list(old.keys()) + list(new.keys())))
- for coll in all_colls:
- old_groups = old.get(coll, {})
- new_groups = new.get(coll, {})
-
- added_groups = sorted(set(new_groups) - set(old_groups))
- removed_groups = sorted(set(old_groups) - set(new_groups))
- common_groups = sorted(set(old_groups) & set(new_groups))
+def diff_specs(old, new):
+ sections = []
+ for coll in sorted(set(old) | set(new)):
+ old_groups, new_groups = old.get(coll, {}), new.get(coll, {})
lines = []
-
- for g in added_groups:
- cmds = new_groups[g]
- lines.append(f"- **Added group** `{cli_path(coll, g)}` ({len(cmds)} commands)")
- for cmd, method in sorted(cmds.items()):
- lines.append(f" - `{cli_path(coll, g, cmd)}` ({method})")
-
- for g in removed_groups:
- cmds = old_groups[g]
- lines.append(f"- **Removed group** `{cli_path(coll, g)}` ({len(cmds)} commands)")
-
- for g in common_groups:
- added_cmds = sorted(set(new_groups[g]) - set(old_groups[g]))
- removed_cmds = sorted(set(old_groups[g]) - set(new_groups[g]))
- if not added_cmds and not removed_cmds:
- continue
- lines.append(f"- `{cli_path(coll, g)}`")
- for cmd in added_cmds:
- lines.append(f" - **Added** `{cmd}` ({new_groups[g][cmd]})")
- for cmd in removed_cmds:
- lines.append(f" - **Removed** `{cmd}` ({old_groups[g][cmd]})")
-
+ for group in sorted(set(old_groups) | set(new_groups)):
+ before, after = old_groups.get(group, {}), new_groups.get(group, {})
+ entries = []
+ for name in sorted(after.keys() - before.keys()):
+ entries.append(f" - **Added** `{name}` ({after[name]['method']})")
+ for name in sorted(before.keys() & after.keys()):
+ changes = endpoint_changes(before[name], after[name])
+ if changes:
+ entries.append(f" - **Modified** `{name}` — " + '; '.join(changes))
+ for name in sorted(before.keys() - after.keys()):
+ aliases = [n for n, ep in after.items() if name in ep.get('aliases', [])]
+ if aliases:
+ entries.append(f" - **Renamed** `{name}` → " + ', '.join(f'`{n}`' for n in aliases) + ' (old spelling retained as an alias)')
+ else:
+ entries.append(f" - **Deleted** `{name}` ({before[name]['method']}; command removed, not necessarily the upstream API)")
+ if entries:
+ status = '**Added group** ' if group not in old_groups else '**Deleted group** ' if group not in new_groups else ''
+ lines.extend([f"- {status}`{cli_path(coll, group)}`", *entries, ''])
if lines:
- sub = COLLECTION_CLI.get(coll, coll)
- sections.append(f"### {coll} (`{sub}`)\n")
- sections.extend(lines)
- sections.append("")
-
- return "\n".join(sections)
+ sections.extend([f"### {coll} (`{COLLECTION_CLI.get(coll, coll)}`)", '', *lines])
+ return '\n'.join(sections)
def main():
diff --git a/codegen/extract_api_spec.py b/codegen/extract_api_spec.py
index 7407f67..728bf48 100644
--- a/codegen/extract_api_spec.py
+++ b/codegen/extract_api_spec.py
@@ -13,6 +13,7 @@
import glob
import os
import re
+from naming_overrides import NAMING_OVERRIDES, GROUP_ALIASES, COLLECTION_MOVES, SUPERSEDED_ROUTES
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
@@ -364,6 +365,61 @@ def merge_folders(folders):
return [merged[g] for g in order]
+def apply_naming_overrides(collection_name, folders):
+ """Resolve explicit naming exceptions and identical routes across merged groups."""
+ overrides = NAMING_OVERRIDES.get(collection_name, {})
+ shortened_groups = set()
+ superseded = SUPERSEDED_ROUTES.get(collection_name, {})
+ available = {(e['method'], e['path']) for f in folders for e in f['endpoints']}
+ merged = {}
+ for folder in folders:
+ source_group = folder['group']
+ for endpoint in folder['endpoints']:
+ ep = dict(endpoint)
+ key = (source_group, ep['method'], ep['path'])
+ if key in superseded:
+ if superseded[key] not in available:
+ raise ValueError(f"Missing replacement for {collection_name} {key}")
+ continue
+ group, command, aliases = overrides.get(
+ key, (source_group, ep['command'], ()))
+ ep['command'] = command
+ ep['aliases'] = list(aliases)
+ if command in ('get-id', 'delete-id', 'patch-id', 'update-id'):
+ ep['command'] = command[:-3]
+ ep['aliases'] = list(dict.fromkeys([command, *aliases]))
+ shortened_groups.add(group)
+ target = merged.setdefault(group, {
+ 'group': group, 'original_folders': [], 'endpoints': [],
+ 'aliases': GROUP_ALIASES.get(collection_name, {}).get(group, []),
+ })
+ for original in folder['original_folders']:
+ if original not in target['original_folders']:
+ target['original_folders'].append(original)
+ # Only collapse identical routes when deliberately merging groups.
+ # Other collections may document distinct request contracts at one URL.
+ if group in GROUP_ALIASES.get(collection_name, {}):
+ existing = next((e for e in target['endpoints']
+ if (e['method'], e['path']) == (ep['method'], ep['path'])), None)
+ if existing is not None:
+ for alias in [command, *aliases]:
+ if alias != existing['command'] and alias not in existing['aliases']:
+ existing['aliases'].append(alias)
+ continue
+ target['endpoints'].append(ep)
+ changed_groups = {value[0] for value in overrides.values()} | shortened_groups
+ for group in merged.values():
+ if group['group'] not in changed_groups:
+ continue
+ names = set()
+ for ep in group['endpoints']:
+ for name in [ep['command'], *ep['aliases']]:
+ if name in names:
+ raise ValueError(f"Duplicate command or alias: {collection_name} {group['group']} {name}")
+ names.add(name)
+ return list(merged.values())
+
+
def main():
pattern = os.path.join(SCRIPT_DIR, "postman", "*.postman_collection.json")
files = sorted(glob.glob(pattern))
@@ -376,12 +432,20 @@ def main():
for filepath in files:
name, raw_folders = extract_collection(filepath)
folders = merge_folders(raw_folders)
+ folders = apply_naming_overrides(name, folders)
result[name] = folders
total_groups = len(folders)
total_eps = sum(len(f['endpoints']) for f in folders)
print(f"{name}: {total_groups} groups, {total_eps} endpoints")
+ for (source, group), destination in COLLECTION_MOVES.items():
+ moved = [g for g in result[source] if g['group'] == group]
+ if any(g['group'] == group for g in result[destination]):
+ raise ValueError(f"Destination group already exists: {destination} {group}")
+ result[source] = [g for g in result[source] if g['group'] != group]
+ result[destination].extend(moved)
+
output_path = os.path.join(SCRIPT_DIR, "api_spec.json")
with open(output_path, "w") as f:
json.dump(result, f, indent=2)
diff --git a/codegen/generate_cli.py b/codegen/generate_cli.py
index d4b30e6..cf770b4 100644
--- a/codegen/generate_cli.py
+++ b/codegen/generate_cli.py
@@ -10,6 +10,7 @@
import re
import subprocess
import textwrap
+from naming_overrides import GROUP_ALIASES
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
CLI_DIR = os.path.dirname(SCRIPT_DIR) # repo root (parent of codegen/)
@@ -32,6 +33,7 @@
# Collection name → URL path prefix → Go expression for the base URL.
BASE_URL_OVERRIDES = {
"Webex Cloud Calling": {
+ "/v1/analytics/": "config.AnalyticsBaseURL",
# Detailed Call History (CDR) — region-specific analytics FQDN.
"/cdr_feed": "config.AnalyticsCallingBaseURL()",
"/cdr_stream": "config.AnalyticsCallingBaseURL()",
@@ -212,6 +214,9 @@ def generate_group_file(group, endpoints, pkg, parent_var, base_url_const, is_ca
lines.append(f'var {group_var} = &cobra.Command{{')
lines.append(f'\tUse: "{group}",')
+ aliases = GROUP_ALIASES.get(collection_name, {}).get(group, [])
+ if aliases:
+ lines.append('\tAliases: []string{' + ', '.join(escape_go_double_quoted(a) for a in aliases) + '},')
lines.append(f'\tShort: "{group_pascal} commands",')
lines.append(f'}}')
lines.append('')
@@ -349,6 +354,8 @@ def generate_command(ep, group_var, base_url_expr, is_calling):
lines.append(f'{indent2}cmd := &cobra.Command{{')
lines.append(f'{indent2}\tUse: {escape_go_double_quoted(cmd_name)},')
+ if ep.get('aliases'):
+ lines.append(f'{indent2}\tAliases: []string{{' + ', '.join(escape_go_double_quoted(a) for a in ep['aliases']) + '},')
lines.append(f'{indent2}\tShort: {escape_go_double_quoted(original_name)},')
if description:
@@ -360,6 +367,11 @@ def generate_command(ep, group_var, base_url_expr, is_calling):
lines.append(f'{indent3}req := client.NewRequest({base_url_expr}, "{method}", {escape_go_double_quoted(path)})')
+ # This endpoint returns a non-JSON deletion acknowledgement. Restricting
+ # Accept to application/json causes the service to reject it with HTTP 406.
+ if method == 'DELETE' and path == '/v1/usage-reports/{reportId}':
+ lines.append(f'{indent3}req.Header("Accept", "*/*")')
+
# --last → from/to conversion
if has_from:
parse_func = 'timeutil.ParseLastEpochMs' if path in EPOCH_MS_PATHS else 'timeutil.ParseLastISO'
diff --git a/codegen/generate_skills.py b/codegen/generate_skills.py
index 832b7c5..6f1cd8b 100644
--- a/codegen/generate_skills.py
+++ b/codegen/generate_skills.py
@@ -82,6 +82,8 @@ def format_flags(ep):
seen = set()
for p in ep.get('path_params', []):
+ if p['name'] in ('projectId', 'orgId', 'orgid'):
+ continue # Project is fixed; organization uses the global override.
flag = camel_to_kebab(p['name'])
if flag not in seen:
seen.add(flag)
@@ -119,7 +121,10 @@ def generate_command_reference(area_cmd, groups, collection_name):
"## Command Reference",
"",
"> Auto-generated from Postman collections. Run `make codegen` to update.",
+ "> Organization defaults to the authenticated account; use `--organization` to override.",
]
+ if area_cmd == 'cc':
+ lines.append('> The flow project ID is fixed internally; no project flag is needed.')
for group_data in groups:
group = group_data['group']
@@ -139,11 +144,18 @@ def generate_command_reference(area_cmd, groups, collection_name):
"",
f"### {group}",
"",
+ ]
+ if group_data.get('aliases'):
+ lines += ['Group aliases: ' + ', '.join(f'`{a}`' for a in group_data['aliases']) + '.', '']
+ lines += [
"| Command | Flags |",
"|---|---|",
]
for ep in visible:
- lines.append(f"| `{ep['command']}` | {format_flags(ep)} |")
+ name = f"`{ep['command']}`"
+ if ep.get('aliases'):
+ name += ' (aliases: ' + ', '.join(f'`{a}`' for a in ep['aliases']) + ')'
+ lines.append(f"| {name} | {format_flags(ep)} |")
return "\n".join(lines) + "\n"
diff --git a/codegen/naming_overrides.py b/codegen/naming_overrides.py
new file mode 100644
index 0000000..fa04106
--- /dev/null
+++ b/codegen/naming_overrides.py
@@ -0,0 +1,292 @@
+"""Stable CLI names for ambiguous or renamed Postman requests.
+
+Like BASE_URL_OVERRIDES, these exceptions use HTTP routes, not collection order.
+Current flow APIs use the unprefixed service routes verified in Cloverhound.
+Legacy FDL import/export keep their original /flow-store/ routes.
+Do not add aliases for unreleased numeric collision names.
+"""
+
+# collection -> (source group, method, path) -> (group, command, aliases)
+NAMING_OVERRIDES = {
+ 'Webex Admin': {
+ ('calling-metrics', 'GET', '/v1/analytics/callQualityStats'):
+ ('metrics', 'get-call-quality-stats', ()),
+ },
+ 'Webex Cloud Calling': {
+ ('call-controls', 'POST', '/telephony/calls/members/me/dial'):
+ ('call-controls-for-me', 'dial', ()),
+ ('call-controls', 'POST', '/telephony/calls/members/me/answer'):
+ ('call-controls-for-me', 'answer', ()),
+ ('call-controls', 'POST', '/telephony/calls/members/me/hangup'):
+ ('call-controls-for-me', 'hangup', ()),
+ ('call-controls', 'GET', '/telephony/calls/members/me/calls'):
+ ('call-controls-for-me', 'list', ()),
+ ('call-controls', 'GET', '/telephony/calls/members/me/calls/{callId}'):
+ ('call-controls-for-me', 'get', ()),
+ },
+ 'Webex Contact Center': {
+ ('flow', 'GET', '/flow-store/{orgId}/project/{projectId}/flows/{flowId}:export'): ('flow', 'export-legacy', ()),
+ ('flow', 'POST', '/flow-store/{orgId}/project/{projectId}/flows:import'): ('flow', 'import-legacy', ()),
+ ('contact-service-queue', 'GET', '/organization/{orgid}/contact-service-queue/by-skill-profile-id/{id}'):
+ ('contact-service-queue', 'list-by-skill-profile', ('list-skill-csqs-skill-profile',)),
+ ('contact-service-queue', 'POST', '/organization/{orgid}/contact-service-queue/delete-reference'):
+ ('contact-service-queue', 'delete-references', ('delete-csq-references',)),
+ ('contact-service-queue', 'POST', '/organization/{orgid}/contact-service-queue/fetch-manually-assignable-queues'):
+ ('contact-service-queue', 'list-manually-assignable', ('list-manually-assignable-csqs',)),
+ ('contact-service-queue', 'GET', '/organization/{orgid}/contact-service-queue/{id}/incoming-references'):
+ ('contact-service-queue', 'list-references', ('list-csq-references-id',)),
+ ('contact-service-queue', 'GET', '/organization/{orgid}/v2/contact-service-queue/by-user-id/{userid}/agent-based-queues'):
+ ('contact-service-queue', 'list-agent-based', ()),
+ ('contact-service-queue', 'GET', '/organization/{orgid}/v2/contact-service-queue/by-user-id/{userid}/skill-based-queues'):
+ ('contact-service-queue', 'list-skill-based', ()),
+ ('contact-service-queue', 'GET', '/organization/{orgid}/v2/contact-service-queue/by-user-id/{userid}/team-based-queues'):
+ ('contact-service-queue', 'list-team-based', ()),
+ ('contact-service-queue', 'POST', '/organization/{orgid}/contact-service-queue/fetch-by-dynamic-skills-and-skillProfile'):
+ ('contact-service-queue', 'list-by-dynamic-skills', ('list-csqs-skills-profile',)),
+ ('contact-service-queue', 'POST', '/organization/{orgid}/contact-service-queue/fetch-by-userId-skillProfileId'):
+ ('contact-service-queue', 'list-by-user-skill-profile', ('list-csqs-user-profile',)),
+ ('outdial-ani', 'GET', '/organization/{orgid}/outdial-ani/entry'):
+ ('outdial-ani', 'list-entries', ('list-entry',)),
+ ('outdial-ani', 'POST', '/organization/{orgid}/outdial-ani/{outDialAniId}/entry/bulk'):
+ ('outdial-ani', 'bulk-save-entries', ('bulk-save-entry',)),
+ ('outdial-ani', 'GET', '/organization/{orgid}/v2/outdial-ani/{outDialAniId}/entry'):
+ ('outdial-ani', 'list-entries-for-ani', ('list-entry-2',)),
+ ('users', 'POST', '/organization/{orgid}/user/fetch-user-details-by-ids'):
+ ('users', 'list-by-ids', ('get-ids',)),
+ ('users', 'PATCH', '/organization/{orgid}/user/bulk/update-dynamic-skill/{skillId}'):
+ ('users', 'bulk-partial-update-dynamic-skills', ('bulk-update-dynamic-skills',)),
+ ('tasks', 'POST', '/v1/tasks/{taskId}/unhold'):
+ ('tasks', 'unhold', ('resume',)),
+ ('tasks', 'POST', '/v2/tasks/{taskId}/messages'):
+ ('tasks', 'append-message', ('update-2',)),
+ ('tasks', 'POST', '/v1/tasks/{taskId}/pause'):
+ ('tasks', 'pause-digital', ()),
+ ('tasks', 'POST', '/v1/tasks/{taskId}/resume'):
+ ('tasks', 'resume-digital', ()),
+ ('agent-personal-greeting-files', 'POST', '/organization/{orgid}/v2/agent-personal-greeting'):
+ ('agent-personal-greeting-files', 'create', ('create-v2-api',)),
+ ('agent-personal-greeting-files', 'POST', '/organization/{orgid}/agent-personal-greeting/delete-reference'):
+ ('agent-personal-greeting-files', 'delete-references', ('delete-references-1',)),
+ ('agent-personal-greeting-files', 'GET', '/organization/{orgid}/v2/agent-personal-greeting/{id}'):
+ ('agent-personal-greeting-files', 'get-id', ('get-id-v2-api',)),
+ ('agent-personal-greeting-files', 'PUT', '/organization/{orgid}/v2/agent-personal-greeting/{id}'):
+ ('agent-personal-greeting-files', 'update-id', ('update-id-v2-api',)),
+ ('agent-personal-greeting-files', 'DELETE', '/organization/{orgid}/v2/agent-personal-greeting/{id}'):
+ ('agent-personal-greeting-files', 'delete-id', ('delete-id-v2-api',)),
+ ('agent-personal-greeting-files', 'PATCH', '/organization/{orgid}/v2/agent-personal-greeting/{id}'):
+ ('agent-personal-greeting-files', 'patch-id', ('patch-id-v2-api',)),
+ ('activities', 'GET', '/{orgId}/project/{projectId}/v2/activities'):
+ ('activities', 'list-definitions', ()),
+ ('activities', 'GET', '/{orgId}/project/{projectId}/v2/activities/{activityName}'):
+ ('activities', 'describe', ()),
+ ('activities', 'GET', '/{orgId}/project/{projectId}/v2/activities/{activityName}/inputs/{inputName}/choices'):
+ ('activities', 'get-input-choices', ()),
+ ('events', 'GET', '/{orgId}/project/{projectId}/v2/event-specifications'):
+ ('events', 'list-specifications', ()),
+ ('flows', 'GET', '/flow-store/{orgId}/project/{projectId}/flows'):
+ ('flow', 'list', ()),
+ ('flows', 'POST', '/flow-store/{orgId}/project/{projectId}/flows/{flowId}:publish'):
+ ('flow', 'publish', ()),
+ ('flows', 'POST', '/flow-store/{orgId}/project/{projectId}/flows/{flowId}:lock'):
+ ('flow', 'lock', ()),
+ ('flows', 'POST', '/flow-store/{orgId}/project/{projectId}/flows/{flowId}:unlock'):
+ ('flow', 'unlock', ()),
+ ('flows', 'POST', '/flow-store/{orgId}/project/{projectId}/v2/flows:validate'):
+ ('flow', 'validate', ()),
+ ('flows', 'POST', '/flow-store/{orgId}/project/{projectId}/v2/flows:import'):
+ ('flow', 'import', ()),
+ ('flows', 'GET', '/flow-store/{orgId}/project/{projectId}/v2/flows/{flowId}'):
+ ('flow', 'get', ()),
+ ('flows', 'POST', '/flow-store/{orgId}/project/{projectId}/v2/flows/{flowId}'):
+ ('flow', 'save-draft', ()),
+ ('flows', 'PATCH', '/flow-store/{orgId}/project/{projectId}/v2/flows/{flowId}'):
+ ('flow', 'patch-draft', ()),
+ ('flows', 'GET', '/flow-store/{orgId}/project/{projectId}/v2/flows/{flowId}:validate'):
+ ('flow', 'validate-draft', ()),
+ ('flows', 'GET', '/flow-store/{orgId}/project/{projectId}/v2/flows/{flowId}:export'):
+ ('flow', 'export', ()),
+ ('flows', 'GET', '/{orgId}/project/{projectId}/flows'):
+ ('flow', 'list', ()),
+ ('flows', 'POST', '/{orgId}/project/{projectId}/flows/{flowId}:publish'):
+ ('flow', 'publish', ()),
+ ('flows', 'POST', '/{orgId}/project/{projectId}/flows/{flowId}:lock'):
+ ('flow', 'lock', ()),
+ ('flows', 'POST', '/{orgId}/project/{projectId}/flows/{flowId}:unlock'):
+ ('flow', 'unlock', ()),
+ ('flows', 'POST', '/{orgId}/project/{projectId}/v2/flows:validate'):
+ ('flow', 'validate', ()),
+ ('flows', 'POST', '/{orgId}/project/{projectId}/v2/flows:import'):
+ ('flow', 'import', ()),
+ ('flows', 'GET', '/{orgId}/project/{projectId}/v2/flows/{flowId}'):
+ ('flow', 'get', ()),
+ ('flows', 'POST', '/{orgId}/project/{projectId}/v2/flows/{flowId}'):
+ ('flow', 'save-draft', ()),
+ ('flows', 'PATCH', '/{orgId}/project/{projectId}/v2/flows/{flowId}'):
+ ('flow', 'patch-draft', ()),
+ ('flows', 'GET', '/{orgId}/project/{projectId}/v2/flows/{flowId}:validate'):
+ ('flow', 'validate-draft', ()),
+ ('flows', 'GET', '/{orgId}/project/{projectId}/v2/flows/{flowId}:export'):
+ ('flow', 'export', ()),
+ ('flows', 'GET', '/{orgId}/project/{projectId}/flows:search'):
+ ('flow', 'search', ()),
+ ('flows', 'DELETE', '/{orgId}/project/{projectId}/flows/{flowId}'):
+ ('flow', 'delete', ()),
+ ('functions', 'GET', '/v1/{orgId}/functions'):
+ ('functions', 'list', ()),
+ ('functions', 'POST', '/v1/{orgId}/functions'):
+ ('functions', 'create', ()),
+ ('functions', 'GET', '/v1/{orgId}/functions/{id}'):
+ ('functions', 'get', ()),
+ ('functions', 'PUT', '/v1/{orgId}/functions/{id}'):
+ ('functions', 'update', ()),
+ ('functions', 'DELETE', '/v1/{orgId}/functions/{id}'):
+ ('functions', 'delete', ()),
+ ('functions', 'POST', '/v1/{orgId}/functions:import'):
+ ('functions', 'import', ()),
+ ('functions', 'POST', '/v1/{orgId}/functions/{id}:unlock'):
+ ('functions', 'unlock', ()),
+ ('functions', 'POST', '/v1/{orgId}/functions/{id}:lock'):
+ ('functions', 'lock', ()),
+ ('functions', 'POST', '/v1/{orgId}/functions/{id}:test'):
+ ('functions', 'test', ()),
+ ('functions', 'POST', '/v1/{orgId}/functions/{id}:publish'):
+ ('functions', 'publish', ()),
+ ('functions', 'POST', '/v1/{orgId}/functions/{id}:export'):
+ ('functions', 'export', ()),
+ ('legacy-flows', 'GET', '/flow-store/{orgId}/project/{projectId}/flows/{flowId}:export'):
+ ('flow', 'export-legacy', ()),
+ ('legacy-flows', 'POST', '/flow-store/{orgId}/project/{projectId}/flows:import'):
+ ('flow', 'import-legacy', ()),
+ ('templates', 'GET', '/templates'):
+ ('templates', 'list-flow', ()),
+ ('templates', 'GET', '/templates/{id}'):
+ ('templates', 'get-flow', ()),
+ ('usage-reports', 'GET', '/v1/usage-reports/resource-types'):
+ ('usage-reports', 'list-resource-types', ()),
+ ('activities', 'GET', '/flow-store/{orgId}/project/{projectId}/v2/activities'):
+ ('activities', 'list-definitions', ()),
+ ('activities', 'GET', '/flow-store/{orgId}/project/{projectId}/v2/activities/{activityName}'):
+ ('activities', 'describe', ()),
+ ('activities', 'GET', '/flow-store/{orgId}/project/{projectId}/v2/activities/{activityName}/inputs/{inputName}/choices'):
+ ('activities', 'get-input-choices', ()),
+ ('events', 'GET', '/flow-store/{orgId}/project/{projectId}/v2/event-specifications'):
+ ('events', 'list-specifications', ()),
+ ('functions', 'GET', '/v1/{orgId}/functions/options'):
+ ('functions', 'list-options', ()),
+ ('templates', 'GET', '/flow-store/{orgId}/project/{projectId}/v2/templates'):
+ ('templates', 'list-flow', ()),
+ ('templates', 'GET', '/flow-store/{orgId}/project/{projectId}/v2/templates/{id}'):
+ ('templates', 'get-flow', ()),
+ ('usage-reports', 'POST', '/v1/usage-reports'):
+ ('usage-reports', 'create', ()),
+ ('usage-reports', 'GET', '/v1/usage-reports'):
+ ('usage-reports', 'list', ()),
+ ('usage-reports', 'GET', '/v1/usage-reports/{reportId}'):
+ ('usage-reports', 'get', ()),
+ ('usage-reports', 'DELETE', '/v1/usage-reports/{reportId}'):
+ ('usage-reports', 'delete', ()),
+ ('usage-reports', 'GET', '/v1/usage-reports/{fileId}/download'):
+ ('usage-reports', 'download-file', ()),
+ },
+ 'Webex Messaging': {
+ ('hybrid-data-security', 'GET', '/hds/organizations/{organizationId}'):
+ ('hds', 'get-org', ()),
+ ('hybrid-data-security', 'GET', '/hds/organizations/{organizationId}/clusters'):
+ ('hds', 'list-clusters-org', ()),
+ ('hybrid-data-security', 'GET', '/hds/clusters/{clusterId}'):
+ ('hds', 'get-cluster', ()),
+ ('hybrid-data-security', 'GET', '/hds/clusters/{clusterId}/nodes'):
+ ('hds', 'list-nodes-cluster', ()),
+ ('hybrid-data-security', 'GET', '/hds/nodes/{nodeId}'):
+ ('hds', 'get-node', ()),
+ ('hybrid-data-security', 'GET', '/hds/organizations/{organizationId}/database'):
+ ('hds', 'get-database-config-org', ()),
+ ('hybrid-data-security', 'GET', '/hds/organizations/{organizationId}/tenants'):
+ ('hds', 'list-tenants-org', ()),
+ ('hybrid-data-security', 'GET', '/hds/nodes/{nodeId}/alarms'):
+ ('hds', 'get-alarms-node', ()),
+ ('hybrid-data-security', 'GET', '/hds/testResults/nodes/{nodeId}/networkTest'):
+ ('hds', 'get-test-results-node', ()),
+ ('hybrid-data-security', 'GET', '/hds/nodes/{nodeId}/resourceUsage'):
+ ('hds', 'get-usage-node', ()),
+ ('hybrid-data-security', 'GET', '/hds/clusters/{clusterId}/availability'):
+ ('hds', 'get-availability-cluster', ()),
+ ('hds', 'GET', '/hds/testResults/nodes/{nodeId}/networkTest'):
+ ('hds', 'get-test-results-node', ()),
+ ('hds', 'GET', '/hds/clusters/{clusterId}'):
+ ('hds', 'get-cluster', ()),
+ ('hds', 'GET', '/hds/organizations/{organizationId}'):
+ ('hds', 'get-org', ()),
+ ('hds', 'GET', '/hds/nodes/{nodeId}'):
+ ('hds', 'get-node', ()),
+ ('hds', 'GET', '/hds/organizations/{organizationId}/database/details'):
+ ('hds', 'get-database-org', ()),
+ ('hds', 'GET', '/hds/organizations/{organizationId}/multiTenant'):
+ ('hds', 'get-multi-tenant-org', ()),
+ ('hds', 'GET', '/hds/clusters/{clusterId}/availability'):
+ ('hds', 'get-availability-cluster', ()),
+ ('hds', 'GET', '/hds/organizations/{organizationId}/database'):
+ ('hds', 'get-database-config-org', ('get-database-org-2',)),
+ ('hds', 'GET', '/hds/organizations/{organizationId}/tenants'):
+ ('hds', 'list-tenants-org', ('get-multi-tenant-org-2',)),
+ ('hds', 'GET', '/hds/clusters/{clusterId}/nodes'):
+ ('hds', 'list-nodes-cluster', ()),
+ ('hds', 'GET', '/hds/organizations/{organizationId}/clusters'):
+ ('hds', 'list-clusters-org', ()),
+ ('hds', 'GET', '/hds/nodes/{nodeId}/alarms'):
+ ('hds', 'get-alarms-node', ()),
+ ('hds', 'GET', '/hds/nodes/{nodeId}/resourceUsage'):
+ ('hds', 'get-usage-node', ()),
+ },
+}
+
+GROUP_ALIASES = {'Webex Contact Center': {'flow': ['flows']}, 'Webex Messaging': {'hds': ['hybrid-data-security']}}
+
+# Place user-facing commands by product while retaining upstream collections.
+COLLECTION_MOVES = {("Webex Admin", "metrics"): "Webex Cloud Calling"}
+
+# Drop these duplicate source requests in favor of the listed unprefixed request.
+# Preserve the replacement request's body and query contract (not just its URL).
+# Fail extraction if a replacement disappears in a future collection refresh.
+SUPERSEDED_ROUTES = {
+ "Webex Contact Center": {
+ ('flow', 'GET', '/flow-store/{orgId}/project/{projectId}/flows'):
+ ('GET', '/{orgId}/project/{projectId}/flows'),
+ ('flow', 'POST', '/flow-store/{orgId}/project/{projectId}/flows/{flowId}:publish'):
+ ('POST', '/{orgId}/project/{projectId}/flows/{flowId}:publish'),
+ ('activities', 'GET', '/flow-store/{orgId}/project/{projectId}/v2/activities'):
+ ('GET', '/{orgId}/project/{projectId}/v2/activities'),
+ ('activities', 'GET', '/flow-store/{orgId}/project/{projectId}/v2/activities/{activityName}'):
+ ('GET', '/{orgId}/project/{projectId}/v2/activities/{activityName}'),
+ ('activities', 'GET', '/flow-store/{orgId}/project/{projectId}/v2/activities/{activityName}/inputs/{inputName}/choices'):
+ ('GET', '/{orgId}/project/{projectId}/v2/activities/{activityName}/inputs/{inputName}/choices'),
+ ('events', 'GET', '/flow-store/{orgId}/project/{projectId}/v2/event-specifications'):
+ ('GET', '/{orgId}/project/{projectId}/v2/event-specifications'),
+ ('flows', 'GET', '/flow-store/{orgId}/project/{projectId}/flows'):
+ ('GET', '/{orgId}/project/{projectId}/flows'),
+ ('flows', 'POST', '/flow-store/{orgId}/project/{projectId}/flows/{flowId}:publish'):
+ ('POST', '/{orgId}/project/{projectId}/flows/{flowId}:publish'),
+ ('flows', 'POST', '/flow-store/{orgId}/project/{projectId}/flows/{flowId}:lock'):
+ ('POST', '/{orgId}/project/{projectId}/flows/{flowId}:lock'),
+ ('flows', 'POST', '/flow-store/{orgId}/project/{projectId}/flows/{flowId}:unlock'):
+ ('POST', '/{orgId}/project/{projectId}/flows/{flowId}:unlock'),
+ ('flows', 'POST', '/flow-store/{orgId}/project/{projectId}/v2/flows:validate'):
+ ('POST', '/{orgId}/project/{projectId}/v2/flows:validate'),
+ ('flows', 'POST', '/flow-store/{orgId}/project/{projectId}/v2/flows:import'):
+ ('POST', '/{orgId}/project/{projectId}/v2/flows:import'),
+ ('flows', 'GET', '/flow-store/{orgId}/project/{projectId}/v2/flows/{flowId}'):
+ ('GET', '/{orgId}/project/{projectId}/v2/flows/{flowId}'),
+ ('flows', 'POST', '/flow-store/{orgId}/project/{projectId}/v2/flows/{flowId}'):
+ ('POST', '/{orgId}/project/{projectId}/v2/flows/{flowId}'),
+ ('flows', 'PATCH', '/flow-store/{orgId}/project/{projectId}/v2/flows/{flowId}'):
+ ('PATCH', '/{orgId}/project/{projectId}/v2/flows/{flowId}'),
+ ('flows', 'GET', '/flow-store/{orgId}/project/{projectId}/v2/flows/{flowId}:validate'):
+ ('GET', '/{orgId}/project/{projectId}/v2/flows/{flowId}:validate'),
+ ('flows', 'GET', '/flow-store/{orgId}/project/{projectId}/v2/flows/{flowId}:export'):
+ ('GET', '/{orgId}/project/{projectId}/v2/flows/{flowId}:export'),
+ ('templates', 'GET', '/flow-store/{orgId}/project/{projectId}/v2/templates'):
+ ('GET', '/templates'),
+ ('templates', 'GET', '/flow-store/{orgId}/project/{projectId}/v2/templates/{id}'):
+ ('GET', '/templates/{id}'),
+ },
+}
diff --git a/codegen/postman/Webex Admin.postman_collection.json b/codegen/postman/Webex Admin.postman_collection.json
index 38591e2..003f9ab 100644
--- a/codegen/postman/Webex Admin.postman_collection.json
+++ b/codegen/postman/Webex Admin.postman_collection.json
@@ -3930,7 +3930,7 @@
},
"raw": "{\n \"audience\": \"\",\n \"nonce\": \"\",\n \"schemaId\": \"\",\n \"subject\": \"\",\n \"tokenLifetimeMinutes\": \"\",\n \"url\": \"\"\n}"
},
- "description": "Register your data source to the Webex BYODS system. Authentication must happen via a Service App with the scope `spark-admin:datasource_write`.\nThe schema IDs determine what data types are sent from Webex to the DAP and the expected responses. The schemas can be inspected on developer.webex.com.",
+ "description": "Register a data source with the Webex BYODS system. Authenticate using a Service App with the `spark-admin:datasource_write` scope.\nSchema IDs determine the types of data Webex sends to the DAP and the expected responses. Use the Data Source Schemas endpoints to inspect the available schemas.",
"header": [
{
"key": "Content-Type",
@@ -4559,7 +4559,7 @@
{
"name": "Retrieve All Data Sources",
"request": {
- "description": "Show all data sources registered for this Service App with the scope `spark-admin:datasource_read`.",
+ "description": "Lists all data sources registered by the Service App. Requires the `spark-admin:datasource_read` scope.",
"header": [
{
"key": "Accept",
@@ -4945,7 +4945,7 @@
{
"name": "Retrieve Data Source Schemas",
"request": {
- "description": "Show available schemas. No specific scope is needed to retrieve the dataSource schemas, but a valid API token should be presented.",
+ "description": "Lists the available data source schemas. A valid API access token is required, but no specific scope is needed.",
"header": [
{
"key": "Accept",
@@ -5348,7 +5348,7 @@
{
"name": "Retrieve Details of a Specific Data Source Schema",
"request": {
- "description": "Retrieve details of a specific data source schema by schema id. No specific scope is needed to retrieve the dataSource schemas, but a valid API token should be presented.",
+ "description": "Retrieves details for a specific data source schema by schema ID. A valid API access token is required, but no specific scope is needed.",
"header": [
{
"key": "Accept",
@@ -5871,7 +5871,7 @@
{
"name": "Delete a Data Source",
"request": {
- "description": "Delete a Data Source, by Data Source ID.\n\nSpecify the Data Source ID in the `dataSourceId` parameter in the URI.",
+ "description": "Deletes a data source by ID.\n\nSpecify the data source ID in the `dataSourceId` URI parameter.",
"header": [],
"method": "DELETE",
"url": {
@@ -5885,7 +5885,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId",
"value": ""
}
@@ -5914,7 +5914,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -5943,7 +5943,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -5972,7 +5972,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6001,7 +6001,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6030,7 +6030,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6059,7 +6059,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6088,7 +6088,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6117,7 +6117,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6146,7 +6146,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6175,7 +6175,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6204,7 +6204,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6233,7 +6233,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6262,7 +6262,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6291,7 +6291,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6320,7 +6320,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6349,7 +6349,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6362,7 +6362,7 @@
{
"name": "Retrieve Data Source Details",
"request": {
- "description": "Show details for a data source, by dataSource id.\nTo see details for a data source, use the Service App token with the `spark-admin:datasource_read` scope.",
+ "description": "Retrieves details for a data source by ID. Use a Service App token with the `spark-admin:datasource_read` scope.",
"header": [
{
"key": "Accept",
@@ -6381,7 +6381,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId",
"value": ""
}
@@ -6410,7 +6410,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6449,7 +6449,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6478,7 +6478,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6507,7 +6507,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6536,7 +6536,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6565,7 +6565,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6594,7 +6594,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6623,7 +6623,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6652,7 +6652,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6681,7 +6681,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6710,7 +6710,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6739,7 +6739,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6768,7 +6768,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6797,7 +6797,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6826,7 +6826,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6855,7 +6855,7 @@
"raw": "{{baseUrl}}/dataSources/:dataSourceId",
"variable": [
{
- "description": "The unique identifier for the dataSource.",
+ "description": "The unique identifier for the data source.",
"key": "dataSourceId"
}
]
@@ -6878,7 +6878,7 @@
},
"raw": "{\n \"audience\": \"\",\n \"errorMessage\": \"\",\n \"nonce\": \"\",\n \"schemaId\": \"\",\n \"status\": \"\",\n \"subject\": \"\",\n \"tokenLifetimeMinutes\": \"\",\n \"url\": \"\"\n}"
},
- "description": "Updates a Data Source. The updateable fields are the `audience,` `subject,` `nonce,` `url` and `tokenLifetimeMinutes.`\nYou can update the `status` from `active` to `disabled` only when providing an `errorMessage` that may be shown to the customer admin in Control Hub. \nTokens must be regularly updated before their expiration to maintain system uptime.",
+ "description": "Updates a data source. The fields you can update are `audience`, `subject`, `nonce`, `url`, and `tokenLifetimeMinutes`.\nYou can set `status` from `active` to `disabled` only if you provide an `errorMessage`, which may be shown to the customer administrator in Control Hub.\nUpdate tokens before they expire to prevent service interruption.",
"header": [
{
"key": "Content-Type",
@@ -13629,558 +13629,528 @@
"status": "Unauthorized"
}
]
- }
- ],
- "name": "Identity Organization"
- },
- {
- "item": [
+ },
{
- "name": "List Events",
+ "name": "Update Organization Authentication Configuration Settings",
"request": {
- "description": "List events in your organization. Several query parameters are available to filter the events returned in the response.\n\nLong result sets will be split into [pages](/docs/basics#pagination).",
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "headerFamily": "json",
+ "language": "json"
+ }
+ },
+ "raw": "{\n \"schemas\": [\n \"\",\n \"\"\n ],\n \"RememberMyLoginId\": \"\",\n \"RememberMyLoginIdDuration\": \"\",\n \"mfaEnabled\": \"\"\n}"
+ },
+ "description": "Update the authentication configuration details, by organizationID.\nSpecify the organization ID in the `orgId` parameter in the URI.\n\n
\n\n**Authorization**\n\nOAuth token rendered by identity broker.\n\n
\n\nOne of the following OAuth scopes is required:\n\n- `identity:organizations_rw`\n\n
\n\nThe following administrators can use this API:\n\n- `id_full_admin`\n\n
\n\n**Usage**:\n\n1. Input JSON must contain schema: \"urn:cisco:codev:identity:idbroker:authnconfig:schemas:1.0\".",
"header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
{
"key": "Accept",
"value": "application/json"
}
],
- "method": "GET",
+ "method": "PATCH",
"url": {
"host": [
"{{baseUrl}}"
],
"path": [
- "events"
+ "identity",
+ "organizations",
+ ":orgId",
+ "authenticationConfig"
],
- "query": [
- {
- "description": "List events with a specific resource type.",
- "key": "resource",
- "value": "rooms"
- },
- {
- "description": "List events with a specific event type.",
- "key": "type",
- "value": "deleted"
- },
- {
- "description": "List events performed by this person, by person ID.",
- "key": "actorId",
- "value": ""
- },
- {
- "description": "List events which occurred after a specific date and time.",
- "key": "from",
- "value": ""
- },
+ "raw": "{{baseUrl}}/identity/organizations/:orgId/authenticationConfig",
+ "variable": [
{
- "description": "List events that occurred before a specific date and time. If not specified, events up to the present time will be listed. Cannot be set to a future date relative to the current time.",
- "key": "to",
+ "description": "A unique identifier for the org.",
+ "key": "orgId",
"value": ""
- },
- {
- "description": "Limit the maximum number of events in the response. Value must be between 1 and 1000, inclusive.",
- "key": "max",
- "value": "100"
- },
- {
- "description": "List events for a specific service type. This parameter is only applicable and mandatory when resource is set to `convergedRecordings`.",
- "key": "serviceType",
- "value": "calling"
}
- ],
- "raw": "{{baseUrl}}/events?resource=rooms&type=deleted&actorId=&from=&to=&max=100&serviceType=calling"
+ ]
}
},
"response": [
{
"_postman_previewlanguage": "text",
"body": null,
- "code": 404,
+ "code": 503,
"cookie": [],
"header": [],
- "name": "Not Found: The URI requested is invalid or the resource requested, such as a user, does not exist. Also returned when the requested format is not supported by the requested method.",
+ "name": "Service Unavailable: Server is overloaded with requests. Try again later.",
"originalRequest": {
- "header": [],
- "method": "GET",
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "headerFamily": "json",
+ "language": "json"
+ }
+ },
+ "raw": "{\n \"schemas\": [\n \"\",\n \"\"\n ],\n \"RememberMyLoginId\": \"\",\n \"RememberMyLoginIdDuration\": \"\",\n \"mfaEnabled\": \"\"\n}"
+ },
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "method": "PATCH",
"url": {
"host": [
"{{baseUrl}}"
],
"path": [
- "events"
+ "identity",
+ "organizations",
+ ":orgId",
+ "authenticationConfig"
],
- "query": [
- {
- "description": "List events with a specific resource type.",
- "key": "resource",
- "value": "rooms"
- },
- {
- "description": "List events with a specific event type.",
- "key": "type",
- "value": "deleted"
- },
- {
- "description": "List events performed by this person, by person ID.",
- "key": "actorId",
- "value": ""
- },
- {
- "description": "List events which occurred after a specific date and time.",
- "key": "from",
- "value": ""
- },
+ "raw": "{{baseUrl}}/identity/organizations/:orgId/authenticationConfig",
+ "variable": [
{
- "description": "List events that occurred before a specific date and time. If not specified, events up to the present time will be listed. Cannot be set to a future date relative to the current time.",
- "key": "to",
+ "description": "A unique identifier for the org.",
+ "key": "orgId",
"value": ""
- },
- {
- "description": "Limit the maximum number of events in the response. Value must be between 1 and 1000, inclusive.",
- "key": "max",
- "value": "100"
- },
- {
- "description": "List events for a specific service type. This parameter is only applicable and mandatory when resource is set to `convergedRecordings`.",
- "key": "serviceType",
- "value": "calling"
}
- ],
- "raw": "{{baseUrl}}/events?resource=rooms&type=deleted&actorId=&from=&to=&max=100&serviceType=calling"
+ ]
}
},
- "status": "Not Found"
+ "status": "Service Unavailable"
},
{
"_postman_previewlanguage": "text",
"body": null,
- "code": 410,
+ "code": 500,
"cookie": [],
"header": [],
- "name": "Gone: The requested resource is no longer available.",
+ "name": "Internal Server Error: Something went wrong on the server. If the issue persists, feel free to contact the [Webex Developer Support team](/explore/support).",
"originalRequest": {
- "header": [],
- "method": "GET",
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "headerFamily": "json",
+ "language": "json"
+ }
+ },
+ "raw": "{\n \"schemas\": [\n \"\",\n \"\"\n ],\n \"RememberMyLoginId\": \"\",\n \"RememberMyLoginIdDuration\": \"\",\n \"mfaEnabled\": \"\"\n}"
+ },
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "method": "PATCH",
"url": {
"host": [
"{{baseUrl}}"
],
"path": [
- "events"
+ "identity",
+ "organizations",
+ ":orgId",
+ "authenticationConfig"
],
- "query": [
- {
- "description": "List events with a specific resource type.",
- "key": "resource",
- "value": "rooms"
- },
- {
- "description": "List events with a specific event type.",
- "key": "type",
- "value": "deleted"
- },
- {
- "description": "List events performed by this person, by person ID.",
- "key": "actorId",
- "value": ""
- },
- {
- "description": "List events which occurred after a specific date and time.",
- "key": "from",
- "value": ""
- },
+ "raw": "{{baseUrl}}/identity/organizations/:orgId/authenticationConfig",
+ "variable": [
{
- "description": "List events that occurred before a specific date and time. If not specified, events up to the present time will be listed. Cannot be set to a future date relative to the current time.",
- "key": "to",
+ "description": "A unique identifier for the org.",
+ "key": "orgId",
"value": ""
- },
- {
- "description": "Limit the maximum number of events in the response. Value must be between 1 and 1000, inclusive.",
- "key": "max",
- "value": "100"
- },
- {
- "description": "List events for a specific service type. This parameter is only applicable and mandatory when resource is set to `convergedRecordings`.",
- "key": "serviceType",
- "value": "calling"
}
- ],
- "raw": "{{baseUrl}}/events?resource=rooms&type=deleted&actorId=&from=&to=&max=100&serviceType=calling"
+ ]
}
},
- "status": "Gone"
+ "status": "Internal Server Error"
},
{
"_postman_previewlanguage": "text",
"body": null,
- "code": 503,
+ "code": 428,
"cookie": [],
"header": [],
- "name": "Service Unavailable: Server is overloaded with requests. Try again later.",
+ "name": "Precondition Required: File(s) cannot be scanned for malware and need to be force downloaded.",
"originalRequest": {
- "header": [],
- "method": "GET",
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "headerFamily": "json",
+ "language": "json"
+ }
+ },
+ "raw": "{\n \"schemas\": [\n \"\",\n \"\"\n ],\n \"RememberMyLoginId\": \"\",\n \"RememberMyLoginIdDuration\": \"\",\n \"mfaEnabled\": \"\"\n}"
+ },
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "method": "PATCH",
"url": {
"host": [
"{{baseUrl}}"
],
"path": [
- "events"
+ "identity",
+ "organizations",
+ ":orgId",
+ "authenticationConfig"
],
- "query": [
- {
- "description": "List events with a specific resource type.",
- "key": "resource",
- "value": "rooms"
- },
- {
- "description": "List events with a specific event type.",
- "key": "type",
- "value": "deleted"
- },
- {
- "description": "List events performed by this person, by person ID.",
- "key": "actorId",
- "value": ""
- },
- {
- "description": "List events which occurred after a specific date and time.",
- "key": "from",
- "value": ""
- },
+ "raw": "{{baseUrl}}/identity/organizations/:orgId/authenticationConfig",
+ "variable": [
{
- "description": "List events that occurred before a specific date and time. If not specified, events up to the present time will be listed. Cannot be set to a future date relative to the current time.",
- "key": "to",
+ "description": "A unique identifier for the org.",
+ "key": "orgId",
"value": ""
- },
- {
- "description": "Limit the maximum number of events in the response. Value must be between 1 and 1000, inclusive.",
- "key": "max",
- "value": "100"
- },
- {
- "description": "List events for a specific service type. This parameter is only applicable and mandatory when resource is set to `convergedRecordings`.",
- "key": "serviceType",
- "value": "calling"
}
- ],
- "raw": "{{baseUrl}}/events?resource=rooms&type=deleted&actorId=&from=&to=&max=100&serviceType=calling"
+ ]
}
},
- "status": "Service Unavailable"
+ "status": "Precondition Required"
},
{
"_postman_previewlanguage": "text",
"body": null,
- "code": 504,
+ "code": 423,
"cookie": [],
"header": [],
- "name": "Gateway Timeout: An upstream server failed to respond on time. If your query uses max parameter, please try to reduce it.",
+ "name": "Locked: The requested resource is temporarily unavailable. A Retry-After header may be present that specifies how many seconds you need to wait before attempting the request again.",
"originalRequest": {
- "header": [],
- "method": "GET",
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "headerFamily": "json",
+ "language": "json"
+ }
+ },
+ "raw": "{\n \"schemas\": [\n \"\",\n \"\"\n ],\n \"RememberMyLoginId\": \"\",\n \"RememberMyLoginIdDuration\": \"\",\n \"mfaEnabled\": \"\"\n}"
+ },
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "method": "PATCH",
"url": {
"host": [
"{{baseUrl}}"
],
"path": [
- "events"
+ "identity",
+ "organizations",
+ ":orgId",
+ "authenticationConfig"
],
- "query": [
- {
- "description": "List events with a specific resource type.",
- "key": "resource",
- "value": "rooms"
- },
- {
- "description": "List events with a specific event type.",
- "key": "type",
- "value": "deleted"
- },
- {
- "description": "List events performed by this person, by person ID.",
- "key": "actorId",
- "value": ""
- },
- {
- "description": "List events which occurred after a specific date and time.",
- "key": "from",
- "value": ""
- },
+ "raw": "{{baseUrl}}/identity/organizations/:orgId/authenticationConfig",
+ "variable": [
{
- "description": "List events that occurred before a specific date and time. If not specified, events up to the present time will be listed. Cannot be set to a future date relative to the current time.",
- "key": "to",
+ "description": "A unique identifier for the org.",
+ "key": "orgId",
"value": ""
- },
- {
- "description": "Limit the maximum number of events in the response. Value must be between 1 and 1000, inclusive.",
- "key": "max",
- "value": "100"
- },
- {
- "description": "List events for a specific service type. This parameter is only applicable and mandatory when resource is set to `convergedRecordings`.",
- "key": "serviceType",
- "value": "calling"
}
- ],
- "raw": "{{baseUrl}}/events?resource=rooms&type=deleted&actorId=&from=&to=&max=100&serviceType=calling"
+ ]
}
},
- "status": "Gateway Timeout"
+ "status": "Locked (WebDAV) (RFC 4918)"
},
{
"_postman_previewlanguage": "text",
"body": null,
- "code": 423,
+ "code": 405,
"cookie": [],
"header": [],
- "name": "Locked: The requested resource is temporarily unavailable. A Retry-After header may be present that specifies how many seconds you need to wait before attempting the request again.",
+ "name": "Method Not Allowed: The request was made to a resource using an HTTP request method that is not supported.",
"originalRequest": {
- "header": [],
- "method": "GET",
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "headerFamily": "json",
+ "language": "json"
+ }
+ },
+ "raw": "{\n \"schemas\": [\n \"\",\n \"\"\n ],\n \"RememberMyLoginId\": \"\",\n \"RememberMyLoginIdDuration\": \"\",\n \"mfaEnabled\": \"\"\n}"
+ },
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "method": "PATCH",
"url": {
"host": [
"{{baseUrl}}"
],
"path": [
- "events"
+ "identity",
+ "organizations",
+ ":orgId",
+ "authenticationConfig"
],
- "query": [
- {
- "description": "List events with a specific resource type.",
- "key": "resource",
- "value": "rooms"
- },
- {
- "description": "List events with a specific event type.",
- "key": "type",
- "value": "deleted"
- },
- {
- "description": "List events performed by this person, by person ID.",
- "key": "actorId",
- "value": ""
- },
- {
- "description": "List events which occurred after a specific date and time.",
- "key": "from",
- "value": ""
- },
+ "raw": "{{baseUrl}}/identity/organizations/:orgId/authenticationConfig",
+ "variable": [
{
- "description": "List events that occurred before a specific date and time. If not specified, events up to the present time will be listed. Cannot be set to a future date relative to the current time.",
- "key": "to",
+ "description": "A unique identifier for the org.",
+ "key": "orgId",
"value": ""
- },
- {
- "description": "Limit the maximum number of events in the response. Value must be between 1 and 1000, inclusive.",
- "key": "max",
- "value": "100"
- },
- {
- "description": "List events for a specific service type. This parameter is only applicable and mandatory when resource is set to `convergedRecordings`.",
- "key": "serviceType",
- "value": "calling"
}
- ],
- "raw": "{{baseUrl}}/events?resource=rooms&type=deleted&actorId=&from=&to=&max=100&serviceType=calling"
+ ]
}
},
- "status": "Locked (WebDAV) (RFC 4918)"
+ "status": "Method Not Allowed"
},
{
"_postman_previewlanguage": "text",
"body": null,
- "code": 500,
+ "code": 401,
"cookie": [],
"header": [],
- "name": "Internal Server Error: Something went wrong on the server. If the issue persists, feel free to contact the [Webex Developer Support team](/explore/support).",
+ "name": "Unauthorized: Authentication credentials were missing or incorrect.",
"originalRequest": {
- "header": [],
- "method": "GET",
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "headerFamily": "json",
+ "language": "json"
+ }
+ },
+ "raw": "{\n \"schemas\": [\n \"\",\n \"\"\n ],\n \"RememberMyLoginId\": \"\",\n \"RememberMyLoginIdDuration\": \"\",\n \"mfaEnabled\": \"\"\n}"
+ },
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "method": "PATCH",
"url": {
"host": [
"{{baseUrl}}"
],
"path": [
- "events"
+ "identity",
+ "organizations",
+ ":orgId",
+ "authenticationConfig"
],
- "query": [
- {
- "description": "List events with a specific resource type.",
- "key": "resource",
- "value": "rooms"
- },
- {
- "description": "List events with a specific event type.",
- "key": "type",
- "value": "deleted"
- },
- {
- "description": "List events performed by this person, by person ID.",
- "key": "actorId",
- "value": ""
- },
- {
- "description": "List events which occurred after a specific date and time.",
- "key": "from",
- "value": ""
- },
+ "raw": "{{baseUrl}}/identity/organizations/:orgId/authenticationConfig",
+ "variable": [
{
- "description": "List events that occurred before a specific date and time. If not specified, events up to the present time will be listed. Cannot be set to a future date relative to the current time.",
- "key": "to",
+ "description": "A unique identifier for the org.",
+ "key": "orgId",
"value": ""
- },
- {
- "description": "Limit the maximum number of events in the response. Value must be between 1 and 1000, inclusive.",
- "key": "max",
- "value": "100"
- },
- {
- "description": "List events for a specific service type. This parameter is only applicable and mandatory when resource is set to `convergedRecordings`.",
- "key": "serviceType",
- "value": "calling"
}
- ],
- "raw": "{{baseUrl}}/events?resource=rooms&type=deleted&actorId=&from=&to=&max=100&serviceType=calling"
+ ]
}
},
- "status": "Internal Server Error"
+ "status": "Unauthorized"
},
{
"_postman_previewlanguage": "text",
"body": null,
- "code": 428,
+ "code": 403,
"cookie": [],
"header": [],
- "name": "Precondition Required: File(s) cannot be scanned for malware and need to be force downloaded.",
+ "name": "Forbidden: The request is understood, but it has been refused or access is not allowed.",
"originalRequest": {
- "header": [],
- "method": "GET",
- "url": {
- "host": [
- "{{baseUrl}}"
- ],
- "path": [
- "events"
- ],
- "query": [
- {
- "description": "List events with a specific resource type.",
- "key": "resource",
- "value": "rooms"
- },
- {
- "description": "List events with a specific event type.",
- "key": "type",
- "value": "deleted"
- },
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "headerFamily": "json",
+ "language": "json"
+ }
+ },
+ "raw": "{\n \"schemas\": [\n \"\",\n \"\"\n ],\n \"RememberMyLoginId\": \"\",\n \"RememberMyLoginIdDuration\": \"\",\n \"mfaEnabled\": \"\"\n}"
+ },
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "method": "PATCH",
+ "url": {
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "identity",
+ "organizations",
+ ":orgId",
+ "authenticationConfig"
+ ],
+ "raw": "{{baseUrl}}/identity/organizations/:orgId/authenticationConfig",
+ "variable": [
{
- "description": "List events performed by this person, by person ID.",
- "key": "actorId",
+ "description": "A unique identifier for the org.",
+ "key": "orgId",
"value": ""
- },
+ }
+ ]
+ }
+ },
+ "status": "Forbidden"
+ },
+ {
+ "_postman_previewlanguage": "text",
+ "body": null,
+ "code": 429,
+ "cookie": [],
+ "header": [],
+ "name": "Too Many Requests: Too many requests have been sent in a given amount of time and the request has been rate limited. A Retry-After header should be present that specifies how many seconds you need to wait before a successful request can be made.",
+ "originalRequest": {
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "headerFamily": "json",
+ "language": "json"
+ }
+ },
+ "raw": "{\n \"schemas\": [\n \"\",\n \"\"\n ],\n \"RememberMyLoginId\": \"\",\n \"RememberMyLoginIdDuration\": \"\",\n \"mfaEnabled\": \"\"\n}"
+ },
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "method": "PATCH",
+ "url": {
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "identity",
+ "organizations",
+ ":orgId",
+ "authenticationConfig"
+ ],
+ "raw": "{{baseUrl}}/identity/organizations/:orgId/authenticationConfig",
+ "variable": [
{
- "description": "List events which occurred after a specific date and time.",
- "key": "from",
+ "description": "A unique identifier for the org.",
+ "key": "orgId",
"value": ""
- },
+ }
+ ]
+ }
+ },
+ "status": "Too Many Requests"
+ },
+ {
+ "_postman_previewlanguage": "text",
+ "body": null,
+ "code": 502,
+ "cookie": [],
+ "header": [],
+ "name": "Bad Gateway: The server received an invalid response from an upstream server while processing the request. Try again later.",
+ "originalRequest": {
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "headerFamily": "json",
+ "language": "json"
+ }
+ },
+ "raw": "{\n \"schemas\": [\n \"\",\n \"\"\n ],\n \"RememberMyLoginId\": \"\",\n \"RememberMyLoginIdDuration\": \"\",\n \"mfaEnabled\": \"\"\n}"
+ },
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "method": "PATCH",
+ "url": {
+ "host": [
+ "{{baseUrl}}"
+ ],
+ "path": [
+ "identity",
+ "organizations",
+ ":orgId",
+ "authenticationConfig"
+ ],
+ "raw": "{{baseUrl}}/identity/organizations/:orgId/authenticationConfig",
+ "variable": [
{
- "description": "List events that occurred before a specific date and time. If not specified, events up to the present time will be listed. Cannot be set to a future date relative to the current time.",
- "key": "to",
+ "description": "A unique identifier for the org.",
+ "key": "orgId",
"value": ""
- },
- {
- "description": "Limit the maximum number of events in the response. Value must be between 1 and 1000, inclusive.",
- "key": "max",
- "value": "100"
- },
- {
- "description": "List events for a specific service type. This parameter is only applicable and mandatory when resource is set to `convergedRecordings`.",
- "key": "serviceType",
- "value": "calling"
}
- ],
- "raw": "{{baseUrl}}/events?resource=rooms&type=deleted&actorId=&from=&to=&max=100&serviceType=calling"
+ ]
}
},
- "status": "Precondition Required"
+ "status": "Bad Gateway"
},
{
"_postman_previewlanguage": "json",
- "body": "{\n \"items\": [\n {\n \"id\": \"\",\n \"resource\": \"tabs\",\n \"type\": \"updated\",\n \"actorId\": \"\",\n \"orgId\": \"\",\n \"created\": \"\",\n \"data\": {\n \"id\": \"\",\n \"roomId\": \"\",\n \"roomType\": \"\",\n \"orgId\": \"\",\n \"text\": \"\",\n \"personId\": \"\",\n \"personEmail\": \"\",\n \"meetingId\": \"\",\n \"creatorId\": \"\",\n \"host\": {},\n \"transcriptionEnabled\": \"\",\n \"recordingEnabled\": \"\",\n \"hasPostMeetingsChat\": \"\",\n \"corelationId\": \"\",\n \"callType\": \"\",\n \"userId\": \"\",\n \"userType\": \"\",\n \"callDirection\": \"\",\n \"isCallAnswered\": \"\",\n \"callDurationSeconds\": \"\",\n \"callStartTime\": \"\",\n \"callAnswerTime\": \"\",\n \"callTransferTime\": \"\",\n \"callingNumber\": \"\",\n \"callingLineId\": \"\",\n \"calledNumber\": \"\",\n \"calledLineId\": \"\",\n \"dialedDigits\": \"\",\n \"callRedirectingNumber\": \"\",\n \"callRedirectedReason\": \"\",\n \"created\": \"\",\n \"type\": \"\",\n \"breakoutSessionId\": \"\",\n \"recipients\": [\n {\n \"personId\": \"\",\n \"personEmail\": \"\",\n \"guestDisplayName\": \"\",\n \"guestEmail\": \"\"\n },\n {\n \"personId\": \"\",\n \"personEmail\": \"\",\n \"guestDisplayName\": \"\",\n \"guestEmail\": \"\"\n }\n ]\n },\n \"appId\": \"\"\n },\n {\n \"id\": \"\",\n \"resource\": \"file_transcodings\",\n \"type\": \"deleted\",\n \"actorId\": \"\",\n \"orgId\": \"\",\n \"created\": \"\",\n \"data\": {\n \"id\": \"\",\n \"roomId\": \"\",\n \"roomType\": \"\",\n \"orgId\": \"\",\n \"text\": \"\",\n \"personId\": \"\",\n \"personEmail\": \"\",\n \"meetingId\": \"\",\n \"creatorId\": \"\",\n \"host\": {},\n \"transcriptionEnabled\": \"\",\n \"recordingEnabled\": \"\",\n \"hasPostMeetingsChat\": \"\",\n \"corelationId\": \"\",\n \"callType\": \"\",\n \"userId\": \"\",\n \"userType\": \"\",\n \"callDirection\": \"\",\n \"isCallAnswered\": \"\",\n \"callDurationSeconds\": \"\",\n \"callStartTime\": \"\",\n \"callAnswerTime\": \"\",\n \"callTransferTime\": \"\",\n \"callingNumber\": \"\",\n \"callingLineId\": \"\",\n \"calledNumber\": \"\",\n \"calledLineId\": \"\",\n \"dialedDigits\": \"\",\n \"callRedirectingNumber\": \"\",\n \"callRedirectedReason\": \"\",\n \"created\": \"\",\n \"type\": \"\",\n \"breakoutSessionId\": \"\",\n \"recipients\": [\n {\n \"personId\": \"\",\n \"personEmail\": \"\",\n \"guestDisplayName\": \"\",\n \"guestEmail\": \"\"\n },\n {\n \"personId\": \"\",\n \"personEmail\": \"\",\n \"guestDisplayName\": \"\",\n \"guestEmail\": \"\"\n }\n ]\n },\n \"appId\": \"\"\n }\n ]\n}",
+ "body": "{\n \"schemas\": [\n \"\",\n \"\"\n ],\n \"LockoutDuration\": \"\",\n \"LockoutDurationMultiplier\": \"\",\n \"LockoutFailureCount\": \"\",\n \"LockoutFailureDuration\": \"\",\n \"RememberMyLoginId\": \"\",\n \"mfaEnabled\": \"\",\n \"RememberMyLoginIdDuration\": \"\"\n}",
"code": 200,
"cookie": [],
"header": [
{
"key": "Content-Type",
"value": "application/json"
- },
- {
- "description": {
- "content": "",
- "type": "text/plain"
- },
- "disabled": false,
- "key": "Link",
- "value": ""
}
],
"name": "OK",
"originalRequest": {
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "headerFamily": "json",
+ "language": "json"
+ }
+ },
+ "raw": "{\n \"schemas\": [\n \"\",\n \"\"\n ],\n \"RememberMyLoginId\": \"\",\n \"RememberMyLoginIdDuration\": \"\",\n \"mfaEnabled\": \"\"\n}"
+ },
"header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ },
{
"key": "Accept",
"value": "application/json"
}
],
- "method": "GET",
+ "method": "PATCH",
"url": {
"host": [
"{{baseUrl}}"
],
"path": [
- "events"
+ "identity",
+ "organizations",
+ ":orgId",
+ "authenticationConfig"
],
- "query": [
- {
- "description": "List events with a specific resource type.",
- "key": "resource",
- "value": "rooms"
- },
- {
- "description": "List events with a specific event type.",
- "key": "type",
- "value": "deleted"
- },
- {
- "description": "List events performed by this person, by person ID.",
- "key": "actorId",
- "value": ""
- },
- {
- "description": "List events which occurred after a specific date and time.",
- "key": "from",
- "value": ""
- },
+ "raw": "{{baseUrl}}/identity/organizations/:orgId/authenticationConfig",
+ "variable": [
{
- "description": "List events that occurred before a specific date and time. If not specified, events up to the present time will be listed. Cannot be set to a future date relative to the current time.",
- "key": "to",
+ "description": "A unique identifier for the org.",
+ "key": "orgId",
"value": ""
- },
- {
- "description": "Limit the maximum number of events in the response. Value must be between 1 and 1000, inclusive.",
- "key": "max",
- "value": "100"
- },
- {
- "description": "List events for a specific service type. This parameter is only applicable and mandatory when resource is set to `convergedRecordings`.",
- "key": "serviceType",
- "value": "calling"
}
- ],
- "raw": "{{baseUrl}}/events?resource=rooms&type=deleted&actorId=&from=&to=&max=100&serviceType=calling"
+ ]
}
},
"status": "OK"
@@ -14193,53 +14163,41 @@
"header": [],
"name": "Conflict: The request could not be processed because it conflicts with some established rule of the system. For example, a person may not be added to a room more than once.",
"originalRequest": {
- "header": [],
- "method": "GET",
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "headerFamily": "json",
+ "language": "json"
+ }
+ },
+ "raw": "{\n \"schemas\": [\n \"\",\n \"\"\n ],\n \"RememberMyLoginId\": \"\",\n \"RememberMyLoginIdDuration\": \"\",\n \"mfaEnabled\": \"\"\n}"
+ },
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "method": "PATCH",
"url": {
"host": [
"{{baseUrl}}"
],
"path": [
- "events"
+ "identity",
+ "organizations",
+ ":orgId",
+ "authenticationConfig"
],
- "query": [
- {
- "description": "List events with a specific resource type.",
- "key": "resource",
- "value": "rooms"
- },
- {
- "description": "List events with a specific event type.",
- "key": "type",
- "value": "deleted"
- },
- {
- "description": "List events performed by this person, by person ID.",
- "key": "actorId",
- "value": ""
- },
- {
- "description": "List events which occurred after a specific date and time.",
- "key": "from",
- "value": ""
- },
+ "raw": "{{baseUrl}}/identity/organizations/:orgId/authenticationConfig",
+ "variable": [
{
- "description": "List events that occurred before a specific date and time. If not specified, events up to the present time will be listed. Cannot be set to a future date relative to the current time.",
- "key": "to",
+ "description": "A unique identifier for the org.",
+ "key": "orgId",
"value": ""
- },
- {
- "description": "Limit the maximum number of events in the response. Value must be between 1 and 1000, inclusive.",
- "key": "max",
- "value": "100"
- },
- {
- "description": "List events for a specific service type. This parameter is only applicable and mandatory when resource is set to `convergedRecordings`.",
- "key": "serviceType",
- "value": "calling"
}
- ],
- "raw": "{{baseUrl}}/events?resource=rooms&type=deleted&actorId=&from=&to=&max=100&serviceType=calling"
+ ]
}
},
"status": "Conflict"
@@ -14247,442 +14205,280 @@
{
"_postman_previewlanguage": "text",
"body": null,
- "code": 429,
+ "code": 400,
"cookie": [],
"header": [],
- "name": "Too Many Requests: Too many requests have been sent in a given amount of time and the request has been rate limited. A Retry-After header should be present that specifies how many seconds you need to wait before a successful request can be made.",
+ "name": "Bad Request: The request was invalid or cannot be otherwise served. An accompanying error message will explain further.",
"originalRequest": {
- "header": [],
- "method": "GET",
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "headerFamily": "json",
+ "language": "json"
+ }
+ },
+ "raw": "{\n \"schemas\": [\n \"\",\n \"\"\n ],\n \"RememberMyLoginId\": \"\",\n \"RememberMyLoginIdDuration\": \"\",\n \"mfaEnabled\": \"\"\n}"
+ },
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "method": "PATCH",
"url": {
"host": [
"{{baseUrl}}"
],
"path": [
- "events"
+ "identity",
+ "organizations",
+ ":orgId",
+ "authenticationConfig"
],
- "query": [
- {
- "description": "List events with a specific resource type.",
- "key": "resource",
- "value": "rooms"
- },
- {
- "description": "List events with a specific event type.",
- "key": "type",
- "value": "deleted"
- },
- {
- "description": "List events performed by this person, by person ID.",
- "key": "actorId",
- "value": ""
- },
- {
- "description": "List events which occurred after a specific date and time.",
- "key": "from",
- "value": ""
- },
+ "raw": "{{baseUrl}}/identity/organizations/:orgId/authenticationConfig",
+ "variable": [
{
- "description": "List events that occurred before a specific date and time. If not specified, events up to the present time will be listed. Cannot be set to a future date relative to the current time.",
- "key": "to",
+ "description": "A unique identifier for the org.",
+ "key": "orgId",
"value": ""
- },
- {
- "description": "Limit the maximum number of events in the response. Value must be between 1 and 1000, inclusive.",
- "key": "max",
- "value": "100"
- },
- {
- "description": "List events for a specific service type. This parameter is only applicable and mandatory when resource is set to `convergedRecordings`.",
- "key": "serviceType",
- "value": "calling"
}
- ],
- "raw": "{{baseUrl}}/events?resource=rooms&type=deleted&actorId=&from=&to=&max=100&serviceType=calling"
+ ]
}
},
- "status": "Too Many Requests"
+ "status": "Bad Request"
},
{
"_postman_previewlanguage": "text",
"body": null,
- "code": 405,
+ "code": 404,
"cookie": [],
"header": [],
- "name": "Method Not Allowed: The request was made to a resource using an HTTP request method that is not supported.",
+ "name": "Not Found: The URI requested is invalid or the resource requested, such as a user, does not exist. Also returned when the requested format is not supported by the requested method.",
"originalRequest": {
- "header": [],
- "method": "GET",
+ "body": {
+ "mode": "raw",
+ "options": {
+ "raw": {
+ "headerFamily": "json",
+ "language": "json"
+ }
+ },
+ "raw": "{\n \"schemas\": [\n \"\",\n \"\"\n ],\n \"RememberMyLoginId\": \"\",\n \"RememberMyLoginIdDuration\": \"