FIXME
Name | Type | Description | Example |
---|---|---|---|
created_at | date-time | when user was created | "2012-01-01T12:00:00Z" |
id | uuid | unique identifier of user | "01234567-89ab-cdef-0123-456789abcdef" |
name | string | unique name of user | "name" |
updated_at | date-time | when user was updated | "2012-01-01T12:00:00Z" |
Create a new user.
POST /users
$ curl -n -X POST https://api.hello.com/users \
-H "Content-Type: application/json" \
\
-d '{
}'
HTTP/1.1 201 Created
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"name": "name",
"updated_at": "2012-01-01T12:00:00Z"
}
Delete an existing user.
DELETE /users/{user_id_or_name}
$ curl -n -X DELETE https://api.hello.com/users/$USER_ID_OR_NAME \
-H "Content-Type: application/json" \
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"name": "name",
"updated_at": "2012-01-01T12:00:00Z"
}
Info for existing user.
GET /users/{user_id_or_name}
$ curl -n https://api.hello.com/users/$USER_ID_OR_NAME
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"name": "name",
"updated_at": "2012-01-01T12:00:00Z"
}
List existing users.
GET /users
$ curl -n https://api.hello.com/users
HTTP/1.1 200 OK
[
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"name": "name",
"updated_at": "2012-01-01T12:00:00Z"
}
]
Update an existing user.
PATCH /users/{user_id_or_name}
$ curl -n -X PATCH https://api.hello.com/users/$USER_ID_OR_NAME \
-H "Content-Type: application/json" \
\
-d '{
}'
HTTP/1.1 200 OK
{
"created_at": "2012-01-01T12:00:00Z",
"id": "01234567-89ab-cdef-0123-456789abcdef",
"name": "name",
"updated_at": "2012-01-01T12:00:00Z"
}