Web Service Design

  • Thread starter Thread starter POB
  • Start date Start date

POB

POB

Soldato
Joined
27 May 2003
Posts
5,948
Location
Its a Small World
Hi,

When integrating a RESTful (ish not 100% to exact REST specs) service which would be your preferred option:

The end integration requires the user to enter a place name, which needs to be checked against a location database.

Then when the location has been validated you can then request the webservice to actually create a report of some kind (the major function of the webservice).

Up to two locations may need to be checked for one call of the end report creation method.

The location service would sometimes return duplicate places names like Newport, St Ives etc, the user would need to be prompted to pick the correct one.

So options I have for designing it are:

1) Keep the location checking function of the service separate from the main service action.

2) Merge the two.
 
Code:
GET /locations/search/{searchTerm}

returning any that match, with list of actions that can be performed on each/any (including the below)

Code:
GET /reports/location/{id-of-location-to-report-on}

returning report of exact location.
 
Back
Top Bottom