A RESTful API implementation of a fictional dog sitting service where the user logs in with their Google+ account (Authorized and authenticated by Google).
You can check out the Oauth2.0 section here. The API is purely back-end, but feel free to use the provided Postman JSON files to play around with the database.
Postman generated documentation is available here
Please note, I am not affiliated with Snoop Dogg and I am not making any money off of this. I just thought it would be fun to use his name for a fictional dog sitting service. If you are affiliated with Snoop and would like me to remove his name please feel free to contact me.
-
- View main welcome page, get an authentication token from Google
-
- View current user’s clients
-
Header:
id_token: user’s google_authenticated id token
-
Returns:
- status code 200
- all client instances in JSON format including:
id: client idname: client’s nameage: client’s agecity: client’s cityrecurring_client: True or Falsedogs: list of user’s dogsself: URL path to the client
-
- View current user’s clients
-
- Create a new client for the current user
-
Header:
id_token: user’s google_authenticated id token
-
Body:
- Required:
name: client name, string
- Optional:
age: client’s age, integercity: client’s city, stringrecurring_client: True or False, bool
- Required:
-
Returns:
- Success:
- status code 200
- new client instance JSON including:
id: client idname: client’s nameage: client’s age or nullcity: client’s city or nullrecurring_client: True or False (default: False)dogs: list of user’s dogs (empty)self: URL path to the client
- Failure:
- status code 403: unauthorized
- status code 400: bad request
- Success:
-
- Create a new client for the current user
-
- View a specific client for current user
-
Header:
id_token: user’s google_authenticated id token
-
Returns:
- Success:
- status code 200
- client instance JSON including:
id: client idname: client’s nameage: client’s agecity: client’s cityrecurring_client: True or Falsedogs: list of user’s dogsself: URL path to the client
- Failure:
- status code 403: unauthorized
- status code 404: unable to locate resource
- status code 400: bad request
- Success:
-
- View a specific client for current user
-
- Modify an existing client
-
Header:
id_token: user’s google_authenticated id token
-
Optional Body Parameters:
name: client name, stringage: client’s age, integercity: client’s city, stringrecurring_client: True or False, bool
-
Returns:
- Success:
- status code 204
- modified client instance JSON including:
id: client idname: client’s nameage: client’s agecity: client’s cityrecurring_client: True or Falsedogs: list of user’s dogsself: URL path to the client
- Failure:
- status code 403: unauthorized
- status code 404: unable to locate resource
- status code 400: bad request
- Success:
-
- Modify an existing client
-
- Change a user’s client’s to/from a recurring client
-
Header:
id_token: user’s google_authenticated id token
-
Body:
recurring_client: True or False, bool
-
Returns:
- Success:
- status code 204
- client instance JSON including:
id: client idname: client’s nameage: client’s agecity: client’s cityrecurring_client: True or Falsedogs: list of user’s dogsself: URL path to the client
- Failure:
- status code 403: unauthorized
- status code 404: unable to locate resource
- status code 400: bad request
- Success:
-
- Change a user’s client’s to/from a recurring client
-
-
Permanently remove a specific client in the user’s database
- Header:
id_token: user’s google_authenticated id token
- Header:
-
Returns:
- Success:
- status code 204
- Failure:
- status code 403: unauthorized
- status code 404: unable to locate resource
- status code 400: bad request
- Success:
-
-
- View all current user’s client’s dogs
-
Header:
id_token: user’s google_authenticated id token
-
Returns:
- status code 200
- all dog instances in JSON format including:
id: dog idname: dog's nameowner: dog owner’s idage: dog’s agebreed: dog’s breedgender: dog’s gender: male (m) / female (f) _ neutered (n) / spayed (s) / intact (i)- ie
m_iis an intact male andm_nis a neutered male
- ie
appointment: approximate appointment time(s)self: URL path to the dog
-
- View all current user’s client’s dogs
-
- Create a new dog for the current user’s client
-
Header:
id_token: user’s google_authenticated id token
-
Body:
- Required:
name: dog’s name, stringowner: owner's id, string
- Optional:
age: dog's age, integerbreed: dog's breed, stringgender: dog’s gender, stringappointment: approximate appointment time(s), string
- Required:
-
Returns:
- Success:
- status code 200
- new dog instance JSON including:
id: dog idname: dog's nameowner: dog owner’s idage: dog’s agebreed: dog’s breedgender: dog’s gender: male (m) / female (f) _ neutered (n) / spayed (s) / intact (i)- ie
m_iis an intact male andm_nis a neutered male
- ie
appointment: approximate appointment time(s)self: URL path to the dog
- Failure:
- status code 403: unauthorized
- status code 400: bad request
- Success:
-
- Create a new dog for the current user’s client
-
- View specific client’s dog for current user
-
Header:
id_token: user’s google_authenticated id token
-
Returns:
- Success:
- status code 200
- dog instance JSON including:
id: dog idname: dog's nameowner: dog owner’s idage: dog’s agebreed: dog’s breedgender: dog’s gender: male (m) / female (f) _ neutered (n) / spayed (s) / intact (i)- ie
m_iis an intact male andm_nis a neutered male
- ie
appointment: approximate appointment time(s)self: URL path to the dog
- Failure:
- status code 403: unauthorized
- status code 404: unable to locate resource
- status code 400: bad request
- Success:
-
- View specific client’s dog for current user
-
- Modify an existing client
-
Header:
id_token: user’s google_authenticated id token
-
Optional Body Parameters:
name: dog’s name, stringage: dog's age, integerbreed: dog's breed, stringgender: dog’s gender, stringappointment: approximate appointment time(s), string
-
Returns:
- Success:
- status code 204
- modified dog instance JSON including:
id: dog idname: dog's nameowner: dog owner’s idage: dog’s agebreed: dog’s breedgender: dog’s gender: male (m) / female (f) _ neutered (n) / spayed (s) / intact (i)- ie
m_iis an intact male andm_nis a neutered male
- ie
appointment: approximate appointment time(s)self: URL path to the dog
- Failure:
- status code 403: unauthorized
- status code 404: unable to locate resource
- status code 400: bad request
- Success:
-
- Modify an existing client
-
- Make an appointment for the user’s client’s dog
-
Header:
id_token: user’s google_authenticated id token
-
Body:
appointment: approximate appointment time(s), string
-
Returns:
- Success:
- status code 204
- dog instance JSON including:
id: dog idname: dog's nameowner: dog owner’s idage: dog’s agebreed: dog’s breedgender: dog’s gender: male (m) / female (f) _ neutered (n) / spayed (s) / intact (i)- ie
m_iis an intact male andm_nis a neutered male
- ie
appointment: approximate appointment time(s)self: URL path to the dog
- Failure:
- status code 403: unauthorized
- status code 404: unable to locate resource
- status code 400: bad request
- Success:
-
- Make an appointment for the user’s client’s dog
-
- Permanently remove a specific client’s dog from the user’s database
-
Header:
id_token: user’s google_authenticated id token
-
Returns:
- Success:
- status code 204
- Failure:
- status code 403: unauthorized
- status code 404: unable to locate resource
- status code 400: bad request
- Success:
-
- Permanently remove a specific client’s dog from the user’s database