Overview
The User API provides endpoints for retrieving and updating user information. All endpoints require authentication via token-based authentication. Base URL:/api/users/
Authentication: Token authentication required. Include the token in the Authorization header:
User Model
The User model includes the following fields:string
required
Unique username for the user
string
Full name of the user
string
API URL for the user detail endpoint
string
User’s email address (unique)
string
User’s biography text
string
User’s location
string
URL to user’s avatar image
boolean
Whether the user’s profile is private
datetime
Timestamp when the user was created
Endpoints
List Users
footycollect/users/api/views.py:17-19.
Authentication Required: Yes
Response
Retrieve User
string
required
The username of the user to retrieve
Get Current User (Me)
footycollect/users/api/views.py:21-24.
Authentication Required: Yes
Response
Update User
PUT for full updates or PATCH for partial updates.
Authentication Required: Yes
Path Parameters
string
required
The username of the user to update
string
Username (must be unique)
string
Full name of the user
Authentication
Obtain Auth Token
string
required
User’s username
string
required
User’s password
Error Codes
Bad Request
The request was malformed or contains invalid data
Unauthorized
Authentication credentials were not provided or are invalid
Forbidden
You don’t have permission to access this resource
Not Found
The requested resource was not found
Internal Server Error
An error occurred on the server
Notes
The UserViewSet uses username as the lookup field instead of the default ID. All user detail endpoints use the username in the URL path.
For full interactive API documentation with the ability to test endpoints, visit
/api/docs/ when running the FootyCollect server.