Closed Bug 975908 Opened 9 years ago Closed 9 years ago

204 when trying to add content ratings to an app via the API


(Marketplace Graveyard :: API, defect, P2)



(Not tracked)



(Reporter: bsilverberg, Assigned: kngo)



(Whiteboard: [fromAutomation][qa-])

I am working on bug 975071 and have found that when I do a post to:

where 483843 is a valid app id, and I am using what I believe to be a valid submission_id and security_code, I get a 204 response and the content rating is not added, whereas a 201 response is expected. Unfortunately, as it is returning a 204, there is nothing else in the response that explains why that is happening (there is no content / message).

It is possible my submission id and code are not valid, and if that would result in a 204 please let me know. I can tell you that when using a different submission_id and security_code which are invalid I do receive a 400 response which tells me that the submission_id is invalid, so I think that is not what is happening here, but I am not sure.

Mat, would you be able to look into this for me?
Flags: needinfo?(mpillard)
Whether correct or not, the code [1] says to return a 204 rather than a 201 on a successful submission.

- Bob, can you check the app [2] after receiving a 204 to see if the content ratings have been accepted and attached as expected?
- Either a 201 with the full serialization of the Webapp or the ContentRating object would be most consistent with the rest of the API. CCing the two developers who worked on content ratings for their thoughts.

Flags: needinfo?(mpillard)
Thanks for the reply, Chuck. Now that I know that the 204 is expected, I checked again and yes, it is adding the content rating to the app.

I guess this is another thing that should be updated in the docs. Either that, or change the response code as you suggest above.
Assignee: nobody → kngo
Blocks: 929812
Target Milestone: --- → 2014-02-25
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: 2014-02-25 → 2014-03-04
Can you please add some STRs to this bug or mark it as [qa-]?
Whiteboard: [fromAutomation] → [fromAutomation][qa-]
You need to log in before you can comment on or make changes to this bug.