Hello,
I opened a case with support (0003712442) and they directed me here. There appears to be a bug in the CLI when using the -a option to autopaginate results of the GET /api/v2/architect/dependencytracking endpoint when there is only a single page of results. The CLI request will hang until the authentication token expires. If I force the result set to be multiple pages, the -a option works fine. Other endpoints seem to handle the -a option fine for a single page of results. I am using CLI version 125.0.0. Here is the command I am using. In my org, there are 6 items in the result set.
gc architect dependencytracking list --name "PROD - Block Caller" --consumingResources true --consumingResourceType INBOUNDCALLFLOW -a
If I turn on logging, I see this error which keeps repeating:
WARNING: 2025/03/21 09:14:36 Error parsing GateWay URL: unexpected end of JSON input ,
INFO: 2025/03/21 09:14:36 Calling API with method: GET, URI: /api/v2/architect/dependencytracking?consumingResources=true&consumingResourceType=INBOUNDCALLFLOW&pageNumber=1&pageSize=25&name=PROD+-+Block+Caller, data:
2025/03/21 09:14:37 http: panic serving [::1]:58184: send on closed channel
goroutine 8 [running]:
net/http.(*conn).serve.func1()
/var/build/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.23.1/src/net/http/server.go:1947 +0xbe
panic({0x20bd020?, 0x26662f0?})
/var/build/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.23.1/src/runtime/panic.go:785 +0x132
github.com/mypurecloud/platform-client-sdk-cli/build/gc/restclient.startLocalServerFunc.func1({0x2672cf0?, 0xc0001c82a0?}, 0xc000196280)
/var/build/workspace/build-platform-sdks-pipeline/output/clisdkclient/gc/restclient/restclient.go:539 +0x145
net/http.HandlerFunc.ServeHTTP(0x3211580?, {0x2672cf0?, 0xc0001c82a0?}, 0x132f696?)
/var/build/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.23.1/src/net/http/server.go:2220 +0x29
net/http.(*ServeMux).ServeHTTP(0x1048859?, {0x2672cf0, 0xc0001c82a0}, 0xc000196280)
/var/build/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.23.1/src/net/http/server.go:2747 +0x1ca
net/http.serverHandler.ServeHTTP({0xc000e801e0?}, {0x2672cf0?, 0xc0001c82a0?}, 0x6?)
/var/build/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.23.1/src/net/http/server.go:3210 +0x8e
net/http.(*conn).serve(0xc0000e4120, {0x2673cb0, 0xc0008684b0})
/var/build/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.23.1/src/net/http/server.go:2092 +0x5d0
created by net/http.(*Server).Serve in goroutine 51
/var/build/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.23.1/src/net/http/server.go:3360 +0x485
INFO: 2025/03/21 09:14:40 API response Correlation ID: 361bb8f0-8db3-493b-9913-c16a4ce0b6d1, method: GET, URI: /api/v2/architect/dependencytracking?consumingResources=true&consumingResourceType=INBOUNDCALLFLOW&pageNumber=1&pageSize=25&name=PROD+-+Block+Caller, timestamp(ms): 1742570080517
INFO: 2025/03/21 09:14:42 Paginating with URI: /api/v2/architect/dependencytracking?consumingResources=true&consumingResourceType=INBOUNDCALLFLOW&pageNumber=2&pageSize=25&name=PROD+-+Block+Caller
WARNING: 2025/03/21 09:14:42 Error parsing GateWay URL: unexpected end of JSON input ,
INFO: 2025/03/21 09:14:42 Calling API with method: GET, URI: /api/v2/architect/dependencytracking?consumingResources=true&consumingResourceType=INBOUNDCALLFLOW&pageNumber=2&pageSize=25&name=PROD+-+Block+Caller, data:
INFO: 2025/03/21 09:14:46 API response Correlation ID: 34362a37-3bf2-4c67-ae84-7492f27f608d, method: GET, URI: /api/v2/architect/dependencytracking?consumingResources=true&consumingResourceType=INBOUNDCALLFLOW&pageNumber=2&pageSize=25&name=PROD+-+Block+Caller, timestamp(ms): 1742570086214
INFO: 2025/03/21 09:14:47 Paginating with URI: /api/v2/architect/dependencytracking?consumingResources=true&consumingResourceType=INBOUNDCALLFLOW&pageNumber=3&pageSize=25&name=PROD+-+Block+Caller
WARNING: 2025/03/21 09:14:47 Error parsing GateWay URL: unexpected end of JSON input ,
INFO: 2025/03/21 09:14:47 Calling API with method: GET, URI: /api/v2/architect/dependencytracking?consumingResources=true&consumingResourceType=INBOUNDCALLFLOW&pageNumber=3&pageSize=25&name=PROD+-+Block+Caller, data:
INFO: 2025/03/21 09:14:51 API response Correlation ID: 7cc875a6-90bd-47dc-9737-8a580f3b2399, method: GET, URI: /api/v2/architect/dependencytracking?consumingResources=true&consumingResourceType=INBOUNDCALLFLOW&pageNumber=3&pageSize=25&name=PROD+-+Block+Caller, timestamp(ms): 1742570091256
Can someone take a look at this and see if it is a bug?
Thank you.
#PlatformCLI------------------------------
Chad Markle
Senior IT Director, Unified Communications
------------------------------