Project

General

Profile

Bug #6882

POST create responses should be 201

Added by Daniel Lobato Garcia about 5 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

All api/v2 create responses are 200, with the except of interfaces.
However, the RFC specifies that when a resource is created, the server should return a 201 code, and a Location header with the location of the newly created resource.

process_success in base_controller needs to be changed to match the RFC.


Related issues

Related to Foreman - Bug #10356: POST and PUT should use RABL templates for the response.Closed2015-05-04
Copied to Foreman - Bug #11100: POST create responses should contain Location header of new resourceNew2014-08-01

History

#1 Updated by Alon Goldboim about 4 years ago

  • Related to Bug #10356: POST and PUT should use RABL templates for the response. added

#2 Updated by Dominic Cleal about 4 years ago

  • Status changed from New to Closed
  • Assignee set to Alon Goldboim
  • % Done changed from 0 to 100
  • Legacy Backlogs Release (now unused) set to 63

Fixed via #10356.

#3 Updated by Dominic Cleal about 4 years ago

  • Copied to Bug #11100: POST create responses should contain Location header of new resource added

Also available in: Atom PDF