Opened 2 years ago

Closed 2 years ago

#12 closed defect (fixed)

API is not really RESTish - response status codes and bodies

Reported by: tomaz@… Owned by: dougfort
Priority: major Milestone:
Component: web server Version:
Keywords: Cc: alan, matt, dhain

Description

For example, "create collection" endpoint returns status code 200 with text "OK" in the body.

Ideally API would return 201 (created) with an empty response body and a 'Location' header would contain a URL to the newly created resource (e.g. http://api.nimbus.io/customers/<username>/collections/<collection-name>).

Another acceptable thing would be returning 201 and body would contain a JSON representation of the newly created container, e.g.:

{"name": "my_container", "date_created": 1111111}

Returning mixed content (some times plain text and some times JSON) is bad.

Change History (2)

comment:1 Changed 2 years ago by dougfort

  • Status changed from new to accepted

comment:2 Changed 2 years ago by dougfort

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.