HTTP Verb | Endpoint | Description |
---|---|---|
POST | /responses/ | Post a response to a question |
PATCH | /responses/:id/ | Modify a response |
DELETE | /responses/:id/ | Delete a response |
Adds a response to a question
/responses/
Parameter | Data Type | Required (Y/N) | Default | Notes |
---|---|---|---|---|
post | String/Integer | Yes | specify post id | |
body | String | Yes | Empty string | |
upvotes | Integer | No | 0 | |
downvotes | Integer | No | 0 | |
user | String/Integer | No | Null | specify user id |
POST https://developer-mental-health-org.herokuapp.com/api/v1/responses/
STATUS: 201 Created
Modify an existing response
/responses/:id/
Parameter | Data Type | Notes |
---|---|---|
body | String |
PATCH https://developer-mental-health-org.herokuapp.com/api/v1/responses/3/
STATUS: 200 OK
Delete an existing response
/responses/:id/
DELETE https://developer-mental-health-org.herokuapp.com/api/v1/responses/3/
STATUS: 204 No Content