This documentation describes the endpoints, parameters, and responses for the Example RESTful API.
The API uses an API key for authentication. To obtain an API key, please contact support@example.com.
All requests require the API key to be included in the Authorization header in the format Bearer .
Get a list of all users.
None
{
"users": [
{
"id": 1,
"name": "John Doe",
"email": "john.doe@example.com"
},
{
"id": 2,
"name": "Jane Smith",
"email": "jane.smith@example.com"
}
]
}
{
"error": "Unauthorized"
}
Get information for a specific user.
id
(required) - the ID of the user to retrieve.
{
"id": 1,
"name": "John Doe",
"email": "john.doe@example.com"
}
{
"error": "User not found"
}
Create a new user.
name
(required) - the name of the user.email
(required) - the email address of the user.
{
"id": 3,
"name": "Bob Smith",
"email": "bob.smith@example.com"
}
{
"error": "Invalid parameters"
}
Update an existing user.
id
(required) - the ID of the user to update.name
(optional) - the updated name of the user.email
(optional) - the updated email address of the user.
{
"id": 1,
"name": "John Smith",
"email": "john.smith@example.com"
}
{
"error": "User not found"
}
Delete a user.
id
(required) - the ID of the user to delete.
None
{
"error": "User not found"
}
This documentation provides an overview of the Example RESTful API, including its authentication method, endpoints, and responses. Please contact support@example.com if you have any questions or issues with the API.