Forum Discussion

Awesome's avatar
Awesome
Frequent Contributor
14 years ago

Best way to build out REST methods

Hi All,

Please see attached screen shot for better description.

In SoapUI, i'm building out the REST Methods that let me talk to the RightScale API:
( http://support.rightscale.com/12-Guides ... tScale_API )

I'm a bit unclear what the best practice is to build out the methods for an API:

In the attached image you can see outlined in RED that i've added a new RESOURCE for EACH RightScale API call and EACH of it's associated METHOD.
VS
the outlined in PURPLE in the image, where i have ONE RESOURCE with all the methods contained. each method uses a TEMPLATE override parameter to handle the different path endpoints for each method call.

QUESTION: which of the above is the best way to build out the methods for the RightScale API (or any REST API). or is there a 3rd and better method?

thank you!
  • I suppose this is a matter of taste, but personally I would prefer the first alternative.

    Would love to hear anyone else's input on this though.


    /Henrik
    eviware