The requester of a REST service identifies a resource and specifies an action. If the action involves creating or updating a resource, the requester provides a representation of the resource.
http://www.example.com/gateway/employee/0020
http://www.example.com/gateway/employee/Consumer/Sales
"/gateway/employee/{employeeNumber}"
You identify a path variable in a URI template by embedding the variable name in curly braces.
http://www.example.com/gateway/employee?division=Consumer&department=Sales
"/gateway/employee?division={divisionName}&department={departmentName}"
Compared to the use of path variables, the use of query strings is considered less ideal—less RESTful. Use of query strings is most appropriate when a service uses the name-value pairs as input to the service logic. In that situation, the logic might use the input to determine what resource to access.