Forum Discussion

richie's avatar
richie
Community Hero
6 years ago

Significance of Adding Parms at Resource vs Method Level - REST Parameters

Hey,

 

I'm prepping for an interview and I've just realised there's something else I don't know the answer to!

 

When you create REST request parameters - you have a variety of parm options, template, matrix, query, header and  plain options.

 

You can set these parms at either RESOURCE or METHOD level.

 

I was wondering the significance of setting these at RESOURCE vs METHOD level?  Is there any advantage/disadvantage to setting them at a particular level?  I've typically created them at RESOURCE level before now - simply thinking - set it at the parent level so that it filters down to any children - but I don't know if my idea about this is correct or if there's any advantages/disadvantages to setting the parms at a particular level.

 

Can anyone comment?

 

Thanks to all!

 

richie!

2 Replies

  • Lucian's avatar
    Lucian
    Community Hero

    hey,

     

    not sure where can you add parameters at method level?

    • richie's avatar
      richie
      Community Hero

      Hey Lucian

       

      I was reading https://www.soapui.org/rest-testing/understanding-rest-parameters.html

       

      If you check the section entitled 'Parameter Level: RESOURCE and METHOD' <-- this indicates what I'm talking about. 

       

      Here it indicates that you can specify the level of the parameter - either resource or method.

       

      I'm using ReadyAPI! and it doesn't appear to include a 'Level' column to support this - but within the Projects tag - you can specify the parameters at either resource or method level - hence the reason I am asking! :)

       

      Cheers,

       

      richie