Jeremy,
I tested a number of altered URLs on 2015 and 2016. To avoid listing every URL twice when I am referring to results from both 2015 and 2016, please note that while I am listing only the 2015 URLs I used, I did replace the "2015" part with "2016" when running it against a 2016 Revit server.
On Revit Server 2015, using a URL with the space ("http://RevitHost/RevitServerAdminRESTService2015/AdminRESTService.svc/ /Contents") I get the following expected response showing the folder names I need. Whereas using that URL on 2016 returns only a blank string.
{"Path":" ","DriveFreeSpace":43532005376,"DriveSpace":128479911936,"Files":[{"IsText":false,"Name":"ModelLocationTable.db3","Size":20480},{"IsText":false,"Name":"ModelLocationTable.db3-journal","Size":12896},{"IsText":true,"Name":"super.lock","Size":69}],"Folders":[{"HasContents":true,"LockContext":null,"LockState":0,"ModelLocksInProgress":null,"Name":"00_Prospects","Size":23955955},{"HasContents":true,"LockContext":null,"LockState":0,"ModelLocksInProgress":null,"Name":"01_Design Development","Size":23912193},{"HasContents":true,"LockContext":null,"LockState":0,"ModelLocksInProgress":null,"Name":"02_Jobs","Size":1477916658},{"HasContents":true,"LockContext":null,"LockState":0,"ModelLocksInProgress":null,"Name":"03_Completed Jobs","Size":290260866},{"HasContents":true,"LockContext":null,"LockState":0,"ModelLocksInProgress":null,"Name":"08_Standards","Size":23413224},{"HasContents":true,"LockContext":null,"LockState":0,"ModelLocksInProgress":null,"Name":"09_Internal","Size":86779847},{"HasContents":true,"LockC
ontext":null,"LockState":0,"ModelLocksInProgress":null,"Name":"XX_EOL","Size":86955491}],"LockContext":null,"LockState":0,"ModelLocksInProgress":null,"Models":[]}
On both a Revit 2015 and 2016 server, If I take the space out of the URL like this...
"http://RevitHost/RevitServerAdminRESTService2015/AdminRESTService.svc//Contents"
Or removing the space AND reducing the double slashes to just one, like this...
"http://RevitHost/RevitServerAdminRESTService2015/AdminRESTService.svc/Contents")
I get this response...
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Service</title>
<style>BODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; } #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; } A:link { color: #336699; font-weight: bold; text-decoration: underline; } A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; } A:active { color: #336699; font-weight: bold; text-decoration: underline; } .heading1 { background-color: #003366; border-bottom: #336699 6px solid; color: #ffffff; font-family: Tahoma; font-size: 26px; font-weight: normal;margin: 0em 0em 10px -20px; padding-bottom: 8px; padding-left: 30px;padding-top: 16px;} pre { font-size:small; background-color: #e5e5cc; padding: 5px; font-family: Courier New; margin-top: 0px; border: 1px #f0f0e0 solid; white-space: pre-wrap; white-space: -pre-wrap; word-wrap: break-word; } table { border-collapse: collapse; border-spacing: 0px; font-family: Verdana;} table th { border-right: 2px white solid; border-bottom: 2px white solid; font-weight:
bold; background-color: #cecf9c;} table td { border-right: 2px white solid; border-bottom: 2px white solid; background-color: #e5e5cc;}</style>
</head>
<body>
<div id="content">
<p class="heading1">Service</p>
<p>Method not allowed.</p>
</div>
</body>
</html>
On both a Revit 2015 and 2016 server, if I replace the space with an underscore ("http://RevitHost/RevitServerAdminRESTService2015/AdminRESTService.svc/_/Contents") , I get back a response in the right format, but no folder names. Like this response...
{"Path":"_","DriveFreeSpace":43878522880,"DriveSpace":128479911936,"Files":[],"Folders":[],"LockContext":null,"LockState":0,"ModelLocksInProgress":null,"Models":[]}
I know on the web, spaces often need to be replaced with a "%20", so I tried that too. ("http://RevitHost/RevitServerAdminRESTService2015/AdminRESTService.svc/%20/Contents"). On 2015, I get the right format, with no folders, just like using an underscore. However, on 2016, I get a blank response again.
Are there any other alternate URLs you think would be worth trying?
Thanks,
Ted