Skip to content
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:

Manage Services

GET /services

Retrieve a list of services.

Example

GET /services

Response:

  { "id": "<id>", "name": "<name>", "description": "<description>" }

POST /services

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.

Example

POST /services

Request:

  { "name": "Documentation", "description": "Creating a decent documentation." }

Response:

  { "id": "42", "name": "Documentation", "description": "Creating a decent documentation." }

GET /services/

Retrieve a single service object. You MUST supply an existing id.

Example

GET /services/42

Response:

  { "id": "42", "name": "Documentation", "description": "Creating a decent documentation." }

PUT /services/

Update an existing service. You MUST supply a valid id.

Example

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." }

Clone this wiki locally