Valantines Day API
accounts
list
- List out all the accounts - Account created by user registration so no create account required
Query Parameters
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
page | A page number within the paginated result set. |
read
- Detail the specificly requested account - Uses same Accounts serializer - Uses IsOwnerOrReadOnly tailored permission class to ensure only owner can update profile info
Path Parameters
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
id required | A unique integer value identifying this account. |
update
- Detail the specificly requested account - Uses same Accounts serializer - Uses IsOwnerOrReadOnly tailored permission class to ensure only owner can update profile info
Path Parameters
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
id required | A unique integer value identifying this account. |
Request Body
The request body should be a "application/json" encoded object, containing the following items.
| Parameter | Description |
|---|---|
account_name | |
image |
partial_update
- Detail the specificly requested account - Uses same Accounts serializer - Uses IsOwnerOrReadOnly tailored permission class to ensure only owner can update profile info
Path Parameters
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
id required | A unique integer value identifying this account. |
Request Body
The request body should be a "application/json" encoded object, containing the following items.
| Parameter | Description |
|---|---|
account_name | |
image |
dj-rest-auth
login > create
Check the credentials and return the REST Token if the credentials are valid and authenticated. Calls Django Auth login method to register User ID in Django session framework Accept the following POST parameters: username, password Return the REST Framework Token Object's key.
Request Body
The request body should be a "application/json" encoded object, containing the following items.
| Parameter | Description |
|---|---|
username | |
email | |
password required |
logout > list
Calls Django logout method and delete the Token object assigned to the current User object. Accepts/Returns nothing.
logout > create_0
Calls Django logout method and delete the Token object assigned to the current User object. Accepts/Returns nothing.
password > change > create
Calls Django Auth SetPasswordForm save method. Accepts the following POST parameters: new_password1, new_password2 Returns the success/fail message.
Request Body
The request body should be a "application/json" encoded object, containing the following items.
| Parameter | Description |
|---|---|
new_password1 required | |
new_password2 required |
password > reset > create
Calls Django Auth PasswordResetForm save method. Accepts the following POST parameters: email Returns the success/fail message.
Request Body
The request body should be a "application/json" encoded object, containing the following items.
| Parameter | Description |
|---|---|
email required |
password > reset > confirm > create
Password reset e-mail link is confirmed, therefore this resets the user's password. Accepts the following POST parameters: token, uid, new_password1, new_password2 Returns the success/fail message.
Request Body
The request body should be a "application/json" encoded object, containing the following items.
| Parameter | Description |
|---|---|
new_password1 required | |
new_password2 required | |
uid required | |
token required |
registration > create
Request Body
The request body should be a "application/json" encoded object, containing the following items.
| Parameter | Description |
|---|---|
username required | |
email | |
password1 required | |
password2 required |
registration > verify-email > create
Request Body
The request body should be a "application/json" encoded object, containing the following items.
| Parameter | Description |
|---|---|
key required |
token > refresh > create
Request Body
The request body should be a "application/json" encoded object, containing the following items.
| Parameter | Description |
|---|---|
refresh | WIll override cookie. |
token > verify > create
Takes a token and indicates if it is valid. This view provides no information about a token's fitness for a particular use.
Request Body
The request body should be a "application/json" encoded object, containing the following items.
| Parameter | Description |
|---|---|
token required |
user > read
Reads and updates UserModel fields Accepts GET, PUT, PATCH methods. Default accepted fields: username, first_name, last_name Default display fields: pk, username, email, first_name, last_name Read-only fields: pk, email Returns UserModel fields.
user > update
Reads and updates UserModel fields Accepts GET, PUT, PATCH methods. Default accepted fields: username, first_name, last_name Default display fields: pk, username, email, first_name, last_name Read-only fields: pk, email Returns UserModel fields.
Request Body
The request body should be a "application/json" encoded object, containing the following items.
| Parameter | Description |
|---|---|
username required | Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. |
first_name | |
last_name |
user > partial_update
Reads and updates UserModel fields Accepts GET, PUT, PATCH methods. Default accepted fields: username, first_name, last_name Default display fields: pk, username, email, first_name, last_name Read-only fields: pk, email Returns UserModel fields.
Request Body
The request body should be a "application/json" encoded object, containing the following items.
| Parameter | Description |
|---|---|
username | Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. |
first_name | |
last_name |
partnerprofile
list
- List out all the accounts - Account created by user registration so no create account required
Query Parameters
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
page | A page number within the paginated result set. |
create
- List out all the accounts - Account created by user registration so no create account required
Request Body
The request body should be a "application/json" encoded object, containing the following items.
| Parameter | Description |
|---|---|
age | |
zodiac_sign | |
relationship | |
characteristics | |
interests | |
location |
read
- Detail the specificly requested account - Uses same Accounts serializer - Uses IsOwnerOrReadOnly tailored permission class to ensure only owner can update profile info
Path Parameters
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
id required | A unique integer value identifying this partner profile. |
update
- Detail the specificly requested account - Uses same Accounts serializer - Uses IsOwnerOrReadOnly tailored permission class to ensure only owner can update profile info
Path Parameters
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
id required | A unique integer value identifying this partner profile. |
Request Body
The request body should be a "application/json" encoded object, containing the following items.
| Parameter | Description |
|---|---|
age | |
zodiac_sign | |
relationship | |
characteristics | |
interests | |
location |
partial_update
- Detail the specificly requested account - Uses same Accounts serializer - Uses IsOwnerOrReadOnly tailored permission class to ensure only owner can update profile info
Path Parameters
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
id required | A unique integer value identifying this partner profile. |
Request Body
The request body should be a "application/json" encoded object, containing the following items.
| Parameter | Description |
|---|---|
age | |
zodiac_sign | |
relationship | |
characteristics | |
interests | |
location |
delete
- Detail the specificly requested account - Uses same Accounts serializer - Uses IsOwnerOrReadOnly tailored permission class to ensure only owner can update profile info
Path Parameters
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
id required | A unique integer value identifying this partner profile. |