HTTP Verb | Endpoint | Description |
---|---|---|
POST | /users/ | Create a new user |
GET | /users/:id | Get a single user |
DELETE | /users/:id/ | Delete a user |
Create a new user
/users/
Parameter | Data Type | Required (Y/N) | Default | Notes |
---|---|---|---|---|
username | String | Yes | ||
title | String | No | Null |
POST https://developer-mental-health-org.herokuapp.com/api/v1/users/
STATUS: 201 Created
Return a single user and their attributes
/users/:id
GET https://developer-mental-health-org.herokuapp.com/api/v1/users/3
STATUS: 200 OK
{
"id": 4,
"username": "scuba steve",
"title": "counselor",
"created_at": "2021-10-25T19:52:44.016116Z",
"updated_at": "2021-10-25T19:52:59.289063Z"
}
Delete an existing user
/users/:id/
DELETE https://developer-mental-health-org.herokuapp.com/api/v1/users/3/
STATUS: 204 No Content