Expected Location to be configured. Is this the right way to configure a location with VPN credentials?
VPN was configured correctly. Activation is not done as part of the test code.
The same config is successful via postman.
@gauravv9 Please take a look at the test suite for vpn credential creation here
For context: A location is not required when creating a VPN credential; however, a VPN Credential may be required when creating a location. Please refer to the ZIA API Swagger documentation here
Thanks
Confirmation
zscaler-sdk-go version
2.3.9
Go environment
GO111MODULE='' GOARCH='amd64' GOBIN='' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='amd64' GOHOSTOS='darwin' GOINSECURE='' GONOPROXY='' GONOSUMDB='' GOOS='darwin' GOPRIVATE='' GOPROXY='https://proxy.golang.org,direct' GOSUMDB='sum.golang.org' GOTMPDIR='' GOTOOLCHAIN='auto' GOVCS='' GOVERSION='go1.21.3' GCCGO='gccgo' GOAMD64='v1' AR='ar' CC='clang' CXX='clang++' CGO_ENABLED='1' GOWORK='' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' PKG_CONFIG='pkg-config' GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/zc/07hyz5qs2qg1b9ymjmyzqm140000gq/T/go-build2681715156=/tmp/go-build -gno-record-gcc-switches -fno-common'
Expected output
Expected Location to be configured. Is this the right way to configure a location with VPN credentials? VPN was configured correctly. Activation is not done as part of the test code. The same config is successful via postman.
Actual output
Error configuring location:FAILED: POST, https://zsapi.zscalerbeta.net/api/v1/locations, 400, 400 , {"message":"Request body is invalid."}, api responded with code: 400
Code demonstrating the issue
Steps to reproduce
By running the sample code.
References
NA