Skip to content

mayankbindas/rackspace-rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rackspace-rest Test

Running the service

To start this web service, install Maven and execute the following command

mvn package

A war will be created. Deploy it to an application server.

Once the web service is started, it can be reached at

http://localhost:8080/rackspace/service/vehicle

REST Endpoints

The following REST endpoints are available upon deployment:

HTTP Verb URL Description Status Codes
GET http://localhost:8080/rackspace/service/vehicle Obtains a list of all existing vehicles
  • 200 OK
GET http://localhost:8080/rackspace/service/vehicle/{id} Obtains the vehicle corresponding to the supplied vehicle ID
  • 200 OK if vehicle exists
  • 404 Not Found if vehicle does not exist
POST http://localhost:8080/rackspace/service/vehicle Creates a new vehicle based on the payload contained in the request body
  • 201 Created if vehicle successfully created
PUT http://localhost:8080/rackspace/service/vehicle/{id} Updated an existing vehicle with the data contained in the request body
  • 200 OK if vehicle successfully updated
  • 404 Not Found if vehicle does not exist
DELETE http://localhost:8080/rackspace/service/vehicle/{id} Deletes an existing vehicle that corresponds to the supplied vehicle ID
  • 203 No Content if vehicle successfully deleted
  • 404 Not Found if vehicle does not exist

Use the following JSON structure when making a POST or PUT call:

{ "type": "truck", "description": "This is a big truck!", "costInCents": 9148937489723 }

{ "type": "train", "description": "This is a bullet train!!", "costInCents": 3812391283098219380 }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages