E
dit
A
ttach
P
rintable
r2 - 2015-12-18 - 21:21:53 - Main.dmmckinn
You are here:
TWiki
>
Deployment Web
>
WebPreferences
>
ClmCurlUtilitySh
<div id="header-title" style="padding: 10px 15px; border-width:1px; border-style:solid; border-color:#FFD28C; background-image: url(<nop>https://jazz.net/wiki/pub/Deployment/WebPreferences/TLASE.jpg); background-size: cover; font-size:120%"> ---+!! Use !ClmCurlUtility.sh to access CLM server functions from a command line. %DKGRAY% Authors: Main.ErikMats <BR> Build basis: 4.0.3, 6.0. %ENDCOLOR%</div></sticky> <!-- Page contents top of page on right hand side in box --> <sticky><div style="float:right; border-width:1px; border-style:solid; border-color:#DFDFDF; background-color:#F6F6F6; margin:0 0 15px 15px; padding: 0 15px 0 15px;"> %TOC{title="Page contents"}% </div></sticky> <sticky><div style="margin:15px;"></sticky> !ClmCurlUtility.sh is a script that allows you to access POST, GET, PUT, DELETE operations on a CLM server from a command line. It handles logins and cookie management (for X-Jazz-CSRF-Prevent). The script uses "Curl" on Cygwin (Windows) or Linux systems. It allows you to automatically iterate to create N users or projects, which is handy for testing. This script uses the same command line parameters as !RqmUrlUtility. It does add an -iterations N option to run the same invocation N times. It adds special GET (stdout) and POST (stdin + stdout) options. Unlike !RqmUrlUtility, it does not require XML input. ---++ Examples <PRE> # DB Ping time once # 2>/dev/null means: disregard errors. Remove this from the end of the line to get more diagnostic output. ./ClmCurlUtility.sh -command GET -user jazzadmin -password jazzadmin -context ccm -filepath GET -url https://clm.example.com:9443/ccm/service/com.ibm.team.repository.service.internal.IServerConnectionStatusRestService/databasePingTime 2>/dev/null # DB Ping time three times: # -iterations 3 means: Run three times. ./ClmCurlUtility.sh -command GET -user jazzadmin -password jazzadmin -context ccm -filepath GET -url https://clm.example.com:9443/ccm/service/com.ibm.team.repository.service.internal.IServerConnectionStatusRestService/databasePingTime -iterations 3 2>/dev/null # DB Ping time Jazz.net Sandbox: # Just to make sure this works on multiple hosts ./ClmCurlUtility.sh -command GET -user jazzadmin -password jazzadmin -context sandbox02-qm -filepath GET -url https://jazz.net/sandbox02-qm/service/com.ibm.team.repository.service.internal.IServerConnectionStatusRestService/databasePingTime 2>/dev/null # Create 50 users, Charlie10000 through Charlie10049 # Echo data fetched from a Firebug request body. # The string REPLACEME will be replaced with the number of each iteration; 10000, 10001, ... # -filePath POST causes DATA to be read from stdin, output to go to stdout. echo "itemId=new&name=CharlieREPLACEME&userId=CharlieREPLACEME&emailAddress=CharlieREPLACEME%40clm.example.com&jsonRoles=%5B%22JazzUsers%22%5D&jsonLicenses=%7B%22add%22%3A%5B%5D%2C%22remove%22%3A%5B%5D%7D" | ./ClmCurlUtility.sh -command POST -user jazzadmin -password jazzadmin -context jts -filepath POST -url https://clm.example.com:9443/jts/service/com.ibm.team.repository.service.internal.IAdminRestService/contributor -iterations 50 2>/dev/null # Get all QM project areas # Link grabbed from Firebug log of performing the same operation in the web UI # Note double quotes around a URL that contains "&". # Output is saved to projectAreas.xml. ./ClmCurlUtility.sh -command GET -user jazzadmin -password jazzadmin -context qm -filepath projectAreas.xml -url "https://clm.example.com:9443/qm/service/com.ibm.team.process.internal.service.web.IProcessWebUIService/projectAreasPaged?hideArchivedProjects=true&owningApplicationKey=JTS-Sentinel-Id&pageNum=0&pageSize=1000" 2>/dev/null </PRE> ---++ The script ... to follow ---++ System Requirements ---+++ Linux Requires bash and Curl ---+++ Windows Requires Cygwin with bash and Curl. <sticky></div></sticky>
E
dit
|
A
ttach
|
P
rintable
|
V
iew topic
|
Backlinks:
We
b
,
A
l
l Webs
|
H
istory
: r2
<
r1
|
M
ore topic actions
Deployment
Deployment web
Planning and design
Installing and upgrading
Migrating and evolving
Integrating
Administering
Monitoring
Troubleshooting
Community information and contribution guidelines
Create new topic
Topic list
Search
Advanced search
Notify
RSS
Atom
Changes
Statistics
Web preferences
NOTE: Please use the Sandbox web for testing
Status icon key:
To do
Under construction
New
Updated
Constant change
None - stable page
Smaller versions of status icons for inline text:
Copyright © by IBM and non-IBM contributing authors. All material on this collaboration platform is the property of the contributing authors.
Contributions are governed by our
Terms of Use.
Please read the following
disclaimer
.
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more
here
.