You are on page 1of 1

Problem Statement:

Develop a backend API service that returns useful data about countries. For countries data, you
can use the REST Countries API (https://restcountries.com).

Requirement:

Your service should have API endpoints for following:

1. Auth: To generate a valid auth token (based on user credentials - username/password).


To avoid using a database, the username/password can be in the code itself.
2. All the following API endpoints should be protected by auth. It should give an
authentication error if the auth token is not present.
3. Fetch detailed information about a specific country by providing its name as a parameter.
4. Retrieve a list of all countries' names based on filters (population/area/language) and
sorting(asc/desc). It should have support for pagination.
5. Return the data as JSON responses.
6. Implement error handling for cases where the REST Countries API request fails or
returns an error.

Evaluation Criteria:

Your solution will be evaluated based on:

● Step by step and clear instructions provided in the README file to run the code.
● Correct implementation of the specified API endpoints.
● Effective error handling and informative error messages.
● Clear and well-organized code structure, along with comments.
● Adherence to API development best practices.

Additional Requirements:

1. Provide instructions in a README.md file on how to set up and run your application.
2. In your README.md file, document the curl requests for testing the APIs so that API
endpoints can be invoked and tested quickly from the command line.

Submission Deadline: 7 days from the date of receiving this assignment.

How to share the code: Push it on the git/bitbucket repository and share the link with us.

PrashantAdvait Foundation

You might also like