Use ZOWE Endevor plugin to list elements, the environment name has the leading pound sign '#'
$ zowe endevor list elements "SAMPLE" -i IBM4 --env "#T1A" --sn 2 --sys NUEF --sub NUEF --typ BPGCOB
Command Error:
Rest API failure with HTTP(S) status 400
Error Details:
HTTP(S) error status "400" received.
Review request details (resource, base path, credentials, payload) and ensure correctness.
Host: <hostname>
Port: <port>
Base Path: EndevorService/rest
Resource: IBM4/env/#T1A/stgnum/2/sys/NUEF/subsys/NUEF/type/BPGCOB/ele/SAMPLE?data=all
Request: GET
Headers: [{"Accept":"application/json"}]
Payload: undefined
Release : 18.1
Component : CA Endevor Software Change Manager
ZOWE 1.9
This issue is related to HTTP request string encoding. It removes everything after pound sign, and cause the Invalid request - HTTP(s) 400 error.
EWS0745E message found in JSON response - which means that there is a problem with request validation. that's old WS message. request validation logic was changed in July 2019 and before this update only A-Z,0-9 characters are allowed for environment name.