-
Notifications
You must be signed in to change notification settings - Fork 15
RestProposal
Sebastian Schulze edited this page Nov 12, 2011
·
6 revisions
Proposal for the Dime REST API
We will provide a JSON REST API. JSON REST APIs are cool. This is a first guess, what endpoints might be useful for managing the Dime Entities:
Retrieve a list of services.
GET /services
Response:
{ "id": "<id>", "name": "<name>", "description": "<description>" }Create a new service. If a value for id is supplied, it SHOULD be ignored.
The API will respond with a service object that has the created id.
POST /services
Request:
{ "name": "Documentation", "description": "Creating a decent documentation." }Response:
{ "id": "42", "name": "Documentation", "description": "Creating a decent documentation." }Retrieve a single service object. You MUST supply an existing id.
GET /services/42
Response:
{ "id": "42", "name": "Documentation", "description": "Creating a decent documentation." }Update an existing service. You MUST supply a valid id.
POST /services/42
Request:
{ "id": "42", "name": "Pimped docs", "description": "Made the documentation 23% more awesome." }Response:
{ "id": "42", "name": "Pimped docs", "description": "Made the documentation 23% more awesome." }