# ORDS Quirks - slashes and feeds

Returning to the stated purpose of this blog, "specific solutions to isolated problems," I've run into a few quirks with Oracle REST Data Services recently. The first is simply figuring out exactly what version of ORDS I am running. There are (at least) two components, the mid-tier java (ords.war) and the database metadata and packages (in ORDS\_METADATA). Does anyone know the best way to get these? (Edit: See comments for answer to this.)  
  
Next, I've run into quirks around exactly where to put slashes. In an earlier post (http://c2anton.blogspot.com/2016/06/super-quick-oracle-rest-service-with.html) I demonstrated how to use the APIs to create ORDS modules, templates and handlers. I tried to use the exact commands in a newer ORDS version and ran into issues when using bind variables. I kept getting THE "ORACLE REST DATA SERVICES" banner along with "404 not found" whenever I created a template and handler with a bind variable.  
  

[![](https://cdn.hashnode.com/res/hashnode/image/upload/v1669915162138/jaZyy4vsV.png)](https://3.bp.blogspot.com/-iFLadcp0z2Y/WG2MIIxE_FI/AAAAAAAABIc/dX3FLmmputc1IB4B1qE9ahgiiKc8ByOuwCLcB/s1600/Screen%2BShot%2B2017-01-04%2Bat%2B6.57.47%2BPM.png)

  
  
This used to work:  
  

1.  begin
  ORDS.DEFINE\_MODULE(  
   p\_module\_name    => 'antonModule',  
   p\_base\_path      => '/antonmodule',  
   p\_items\_per\_page => 25,  
   p\_status         => 'PUBLISHED',  
   p\_comments       => NULL );  
  
  commit;  
end;

  

begin    
  ORDS.DEFINE\_TEMPLATE(  
   p\_module\_name => 'antonModule',  
   p\_pattern     => '/sqltest/{abc}/{def}',  
   p\_priority    => 0,  
   p\_etag\_type   => 'HASH',  
   p\_etag\_query  => NULL,  
   p\_comments    => NULL );  
  
  commit;  
end;

  
But in the new version I have to put a trailing slash in define\_module ( p\_base\_path => '/antonmodule/' ) and remove it from the beginning of p\_pattern in define\_template (  p\_pattern => 'sqltest/{abc}/{def}'   ).  
  
It took my more time that I wish to admit to figure that out.  
  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
  
The next issue is with the feed handler. The feed should create a $ref of this format  
  
https://mymachine/ords/myuser/mymodule/myfeed/{uid}  
  
but it is creating this  
https://mymachine/ords/myuser/mymodule/{uid}  
  
Maybe I just need to upgrade (edit: I upgraded to latest ORDS, 3.0.9. I still have the same issues.), but yikes, these two issues have made for a long day today. Hopefully this helps someone spend a little less time on this than I did :)
