Challenge Overview
Welcome to Quartz Energy - Offset Operator Frac Schedule Swagger Mock Service API Code Challenge
The purpose of this challenge is to designing create Swagger API Mock Service for the Quartz Energy - Offset Operator Frac Schedule App by using Swagger 2.0 Spec.
For this challenge submission, you are highly encouraged to review the storyboard workflow/content and suggest any improvements. You also need create Database schema for each table/collections.
General Requirements
- Submission file should be named swagger.yaml
- App spec should written in Swagger 2.0 with YAML format.
- Create Database schema for each table/collections based data/fields displayed on provided storyboard screens
- The requests and responses should properly list all fields.
- For responses, you should cover all the cases, not just 200 status code, like 404
- Descriptions should be properly written for APIs, request input and responses etc
- You can use editor.swagger.io for validation.
- Create some sample body request for each API paths
Technology Stacks:
We will use following technology stack in the application:
- NodeJS
- AngularJS
- MS SQL Server on AWS
- Stand-alone SMTP Email Server
Swagger Mock Service API for Quartz Energy - Offset Operator Frac Schedule Application
Swagger doc should contain definitions for the following:
1). Login
- Create the following endpoints to create, update, delete, retrieve, and retrieve all user collections.
Screenshot: https://marvelapp.com/cb7ggce/screen/40847868
Route: POST /login
Parameters :
- username
- password
Logics:
- Create some sample data for users
- Validate username/password and login the user.
- If the authorization are valid, then use JWT to generate token, with configurable expiration date, then return generated authorization token in response.
2). Learn More
- Create the following endpoints to create, update, retrieve learn more collections.
Screenshot: https://marvelapp.com/cb7ggce/screen/40847870
Route: GET /learnmore
Parameters :
- n/a
Logics:
- Pull data for title, description & image
- No need authentication
3). Dashboard - Map View
- Create the following endpoints to create, update, delete, retrieve, retrieve all data.
Screenshot: https://marvelapp.com/cb7ggce/screen/40847869
Route: GET /dashboard
Parameters :
- refer to filtering information below
Logics:
- Endpoints require valid authorization header
- Display Schedule summary like on top left of screenshot
- Need use clusterer marker on map, you can see some numbers on dot represents total operator.
- When zoom in the map need display scattered dots on map.
- If there’s 1 operator need display the details information like this: https://marvelapp.com/cb7ggce/screen/40847872 & https://marvelapp.com/cb7ggce/screen/40847871
Filtering
Screenshot: https://marvelapp.com/cb7ggce/screen/40847874
- Region (default all)
- Operator (default all)
- Date Range (default 30)
- Custom Range
The parameters should be returned in the response with the total count of matching records as well, It is preferred if the default values are configurable.
User information
- Based on screenshot we need store user information that will be displayed on the bottom left of left sidebar
- Click the Logout button need logout the user
Search
- This is out of challenge scope.
4). Dashboard - List View
- Create the following endpoints to create, update, delete, retrieve, retrieve all data.
Screenshot: https://marvelapp.com/cb7ggce/screen/40847875
Route: As possible need re-use same endpoint like on /dashboard but we need able to sort and set pagination for this list view
Parameters :
- refer to filtering information below
- refer to pagination information below
- Need able to sort the result based on all table columns
Logics:
- Endpoints require valid authorization header
- Display all fields like on screenshot
Filtering
Screenshot: https://marvelapp.com/cb7ggce/screen/40847874
- Region (default all)
- Operator (default all)
- Date Range (default 30)
- Custom Range
The parameters should be returned in the response with the total count of matching records as well, It is preferred if the default values are configurable.
Pagination
We need to add pagination when user scrolling the page, these endpoint should have the following parameters :
- offset (default 0)
- limit (default 15)
The parameters should be returned in the response with the total count of matching records as well, It is preferred if the default values are configurable.
5). Dashboard - Chart View
- Create the following endpoints to create, update, delete, retrieve, retrieve all data.
Screenshot: https://marvelapp.com/cb7ggce/screen/40847878
Route: As possible need re-use same endpoint like on /dashboard but we need able to filtering for this chart view
Parameters :
- refer to filtering information below
Logics:
- Endpoints require valid authorization header
- Display all fields like on screenshot
Filtering
Screenshot: https://marvelapp.com/cb7ggce/screen/40847874
- Region (default all)
- Operator (default all)
- Date Range (default 30)
- Custom Range
The parameters should be returned in the response with the total count of matching records as well, It is preferred if the default values are configurable.
6) Upload Data
- Create the following endpoints to create, update, delete, retrieve, retrieve all upload data.
Screenshot: https://marvelapp.com/cb7ggce/screen/40847879
- Route: POST /upload
Parameters:
- Need able to detect Single Upload or Batch Upload
Single Upload
- companyname (required)
- wellname (required)
- fracstartdate (required)
- fracsenddate (required)
Batch upload Upload
- document (required)
Logics:
- Need able to capture both Single Upload and Batch Upload everytime user submitted the form
- As part of this challenge you need create SMTP Email Server that will send email message after successfully upload data
- Might need call another routes for auto suggest well name, refer details below.
- Suggest best solution to store the document file in MS SQL Server
- Response should display the created data.
Auto suggest Well Name
Screenshot: https://marvelapp.com/cb7ggce/screen/40847882 & https://marvelapp.com/cb7ggce/screen/40847881
- Route: GET /well
Parameters:
- wellname
Response:
- surfacelat (required)
- surfacelong (required)
- bottomholelat (required)
- bottomholelong (required)
- targetinformationtvd (required)
7). Company Page
- Create the following endpoints to create, update, delete, retrieve, and retrieve all company collections.
Screenshot: https://marvelapp.com/cb7ggce/screen/40847886
Retrieve All company and contacts list
Route: GET /companies
Parameters:
- n/a
Response:
- companyid
- companyname
- lastsubmission
- contactlist:
-- contactid
-- contactorder
-- contactname
-- contactrole
-- contactemail
-- contactephone
-- contactlocation
-- contactemail
Add new company
Route: PUT /companies
Parameters:
- companyname
- lastsubmission
Response:
- Response should be created company
Edit company
Route: PUT /companies/{id}/contact/
Parameters:
- companyname
Response:
- Response should be updated company
8). Contact
- Create the following endpoints to create, update, delete, retrieve, and retrieve all contacts collections.
Add Contact
Screenshot: https://marvelapp.com/cb7ggce/screen/40847864
Route: POST /companies/{id}/contact/
Parameters:
- companyid
- contactorder
- fullname
- email
- phone
- city
- state
Logic:
- Suggest best solution to store the picture file in MS SQL Server
- Response should be created contact and company information.
Edit Contact
Screenshot: https://marvelapp.com/cb7ggce/screen/40847864
Route: POST /companies/{id}/contact/
Parameters:
- companyid
- contactorder
- fullname
- email
- phone
- city
- state
Logic:
- Suggest best solution to store the picture file in MS SQL Server
- Response should be created contact and company information.
9). Upcoming Schedule
- Create the following endpoints to create, update, delete, retrieve, and retrieve all upcoming collections.
Screenshot: https://marvelapp.com/cb7ggce/screen/40847866
Route: GET /upcoming
Parameters :
- refer to filtering information below
- refer to pagination information below
- Need able to sort the result based on all table columns
Logics:
- Endpoints require valid authorization header
- Need grouping per month
- Display all fields like on screenshot
Filtering
Screenshot: https://marvelapp.com/cb7ggce/screen/40847874
- Operator (default all)
- Date Range (default 30)
- Custom Range
The parameters should be returned in the response with the total count of matching records as well, It is preferred if the default values are configurable.
Pagination
We need to add pagination when user scrolling the page, these endpoint should have the following parameters :
- offset (default 0)
- limit (default 15)
The parameters should be returned in the response with the total count of matching records as well, It is preferred if the default values are configurable.
We’ll follow a subjective scorecard (1-10) for this challenge. The submissions will be evaluated on the basis of
- Completeness of Swagger file with respect to storyboard screens
- Adherence to best practices for designing REST API
- Accuracy of screen to API mapping
- Sample data on each endpoints.
Final Submission Guidelines
- Swagger file
- Feel free to include any other document(s) that you think will help coders better understand how to implement the API
The purpose of this challenge is to designing create Swagger API Mock Service for the Quartz Energy - Offset Operator Frac Schedule App by using Swagger 2.0 Spec.
For this challenge submission, you are highly encouraged to review the storyboard workflow/content and suggest any improvements. You also need create Database schema for each table/collections.
General Requirements
- Submission file should be named swagger.yaml
- App spec should written in Swagger 2.0 with YAML format.
- Create Database schema for each table/collections based data/fields displayed on provided storyboard screens
- The requests and responses should properly list all fields.
- For responses, you should cover all the cases, not just 200 status code, like 404
- Descriptions should be properly written for APIs, request input and responses etc
- You can use editor.swagger.io for validation.
- Create some sample body request for each API paths
Technology Stacks:
We will use following technology stack in the application:
- NodeJS
- AngularJS
- MS SQL Server on AWS
- Stand-alone SMTP Email Server
Swagger Mock Service API for Quartz Energy - Offset Operator Frac Schedule Application
Swagger doc should contain definitions for the following:
1). Login
- Create the following endpoints to create, update, delete, retrieve, and retrieve all user collections.
Screenshot: https://marvelapp.com/cb7ggce/screen/40847868
Route: POST /login
Parameters :
- username
- password
Logics:
- Create some sample data for users
- Validate username/password and login the user.
- If the authorization are valid, then use JWT to generate token, with configurable expiration date, then return generated authorization token in response.
2). Learn More
- Create the following endpoints to create, update, retrieve learn more collections.
Screenshot: https://marvelapp.com/cb7ggce/screen/40847870
Route: GET /learnmore
Parameters :
- n/a
Logics:
- Pull data for title, description & image
- No need authentication
3). Dashboard - Map View
- Create the following endpoints to create, update, delete, retrieve, retrieve all data.
Screenshot: https://marvelapp.com/cb7ggce/screen/40847869
Route: GET /dashboard
Parameters :
- refer to filtering information below
Logics:
- Endpoints require valid authorization header
- Display Schedule summary like on top left of screenshot
- Need use clusterer marker on map, you can see some numbers on dot represents total operator.
- When zoom in the map need display scattered dots on map.
- If there’s 1 operator need display the details information like this: https://marvelapp.com/cb7ggce/screen/40847872 & https://marvelapp.com/cb7ggce/screen/40847871
Filtering
Screenshot: https://marvelapp.com/cb7ggce/screen/40847874
- Region (default all)
- Operator (default all)
- Date Range (default 30)
- Custom Range
The parameters should be returned in the response with the total count of matching records as well, It is preferred if the default values are configurable.
User information
- Based on screenshot we need store user information that will be displayed on the bottom left of left sidebar
- Click the Logout button need logout the user
Search
- This is out of challenge scope.
4). Dashboard - List View
- Create the following endpoints to create, update, delete, retrieve, retrieve all data.
Screenshot: https://marvelapp.com/cb7ggce/screen/40847875
Route: As possible need re-use same endpoint like on /dashboard but we need able to sort and set pagination for this list view
Parameters :
- refer to filtering information below
- refer to pagination information below
- Need able to sort the result based on all table columns
Logics:
- Endpoints require valid authorization header
- Display all fields like on screenshot
Filtering
Screenshot: https://marvelapp.com/cb7ggce/screen/40847874
- Region (default all)
- Operator (default all)
- Date Range (default 30)
- Custom Range
The parameters should be returned in the response with the total count of matching records as well, It is preferred if the default values are configurable.
Pagination
We need to add pagination when user scrolling the page, these endpoint should have the following parameters :
- offset (default 0)
- limit (default 15)
The parameters should be returned in the response with the total count of matching records as well, It is preferred if the default values are configurable.
5). Dashboard - Chart View
- Create the following endpoints to create, update, delete, retrieve, retrieve all data.
Screenshot: https://marvelapp.com/cb7ggce/screen/40847878
Route: As possible need re-use same endpoint like on /dashboard but we need able to filtering for this chart view
Parameters :
- refer to filtering information below
Logics:
- Endpoints require valid authorization header
- Display all fields like on screenshot
Filtering
Screenshot: https://marvelapp.com/cb7ggce/screen/40847874
- Region (default all)
- Operator (default all)
- Date Range (default 30)
- Custom Range
The parameters should be returned in the response with the total count of matching records as well, It is preferred if the default values are configurable.
6) Upload Data
- Create the following endpoints to create, update, delete, retrieve, retrieve all upload data.
Screenshot: https://marvelapp.com/cb7ggce/screen/40847879
- Route: POST /upload
Parameters:
- Need able to detect Single Upload or Batch Upload
Single Upload
- companyname (required)
- wellname (required)
- fracstartdate (required)
- fracsenddate (required)
Batch upload Upload
- document (required)
Logics:
- Need able to capture both Single Upload and Batch Upload everytime user submitted the form
- As part of this challenge you need create SMTP Email Server that will send email message after successfully upload data
- Might need call another routes for auto suggest well name, refer details below.
- Suggest best solution to store the document file in MS SQL Server
- Response should display the created data.
Auto suggest Well Name
Screenshot: https://marvelapp.com/cb7ggce/screen/40847882 & https://marvelapp.com/cb7ggce/screen/40847881
- Route: GET /well
Parameters:
- wellname
Response:
- surfacelat (required)
- surfacelong (required)
- bottomholelat (required)
- bottomholelong (required)
- targetinformationtvd (required)
7). Company Page
- Create the following endpoints to create, update, delete, retrieve, and retrieve all company collections.
Screenshot: https://marvelapp.com/cb7ggce/screen/40847886
Retrieve All company and contacts list
Route: GET /companies
Parameters:
- n/a
Response:
- companyid
- companyname
- lastsubmission
- contactlist:
-- contactid
-- contactorder
-- contactname
-- contactrole
-- contactemail
-- contactephone
-- contactlocation
-- contactemail
Add new company
Route: PUT /companies
Parameters:
- companyname
- lastsubmission
Response:
- Response should be created company
Edit company
Route: PUT /companies/{id}/contact/
Parameters:
- companyname
Response:
- Response should be updated company
8). Contact
- Create the following endpoints to create, update, delete, retrieve, and retrieve all contacts collections.
Add Contact
Screenshot: https://marvelapp.com/cb7ggce/screen/40847864
Route: POST /companies/{id}/contact/
Parameters:
- companyid
- contactorder
- fullname
- phone
- city
- state
Logic:
- Suggest best solution to store the picture file in MS SQL Server
- Response should be created contact and company information.
Edit Contact
Screenshot: https://marvelapp.com/cb7ggce/screen/40847864
Route: POST /companies/{id}/contact/
Parameters:
- companyid
- contactorder
- fullname
- phone
- city
- state
Logic:
- Suggest best solution to store the picture file in MS SQL Server
- Response should be created contact and company information.
9). Upcoming Schedule
- Create the following endpoints to create, update, delete, retrieve, and retrieve all upcoming collections.
Screenshot: https://marvelapp.com/cb7ggce/screen/40847866
Route: GET /upcoming
Parameters :
- refer to filtering information below
- refer to pagination information below
- Need able to sort the result based on all table columns
Logics:
- Endpoints require valid authorization header
- Need grouping per month
- Display all fields like on screenshot
Filtering
Screenshot: https://marvelapp.com/cb7ggce/screen/40847874
- Operator (default all)
- Date Range (default 30)
- Custom Range
The parameters should be returned in the response with the total count of matching records as well, It is preferred if the default values are configurable.
Pagination
We need to add pagination when user scrolling the page, these endpoint should have the following parameters :
- offset (default 0)
- limit (default 15)
The parameters should be returned in the response with the total count of matching records as well, It is preferred if the default values are configurable.
Final Submission Guidelines
Scorecard & Review CriteriaWe’ll follow a subjective scorecard (1-10) for this challenge. The submissions will be evaluated on the basis of
- Completeness of Swagger file with respect to storyboard screens
- Adherence to best practices for designing REST API
- Accuracy of screen to API mapping
- Sample data on each endpoints.
Final Submission Guidelines
- Swagger file
- Feel free to include any other document(s) that you think will help coders better understand how to implement the API