Getting Started
Missed IBM TechXchange Dev Day: Virtual Agents? On-demand viewing is available here
IBM UrbanCode Deploy (now IBM DevOps Deploy) allows you to restrict which REST endpoints an authorization token can use. That’s a nice security feature. However, if you need to set up an Auth Token Restriction for an Integration or some external script or tool, finding out what endpoints are hit can be a time-consuming activity. But there is an easier way…..
This is a lot easier than using the trial and error method of determining the endpoints used since when you create a token, it seems that the endpoints referenced by the Auth Token Restriction at that moment in time are the ones applied to the token. So, if you change the Auth Token Restriction, you need to create a new token.
If you need to process a lot of data, you can get the JSON directly using a command like this:
wget --no-check-certificate -O restcalls.json 'https://admin:admin@localhost:8443/rest/audit/request?rowsPerPage=250&pageNumber=1&orderField=shortUrl&sortType=asc&filterFields=user.name&filterValue_user.name=harry&filterType_user.name=like&filterClass_user.name=String'
In the URL above change admin:admin to the UCD user /password of a user with permissions to looks at the REST Call Log.Change the filterValue_user.name=harry to reference the temporary user you createdChange rowsPerPage=250 to some number big enough to get all the data.
With a little bit of shell script you can easily extract a unique list of methods with their end points
sed ‘s/,/\n/g’ restcalls.json | grep -e “method” -e “shortUrl” | sed -rn ‘N;s/\n/ /;p’ | uniq
#UrbanCodeDeploy#10minutetip