GithubHelp home page GithubHelp logo

apiv1-usr's Introduction

apiv1-usr

ftc 5202 (NOT SURE IF ILL INCLUDE THE SOURCE CODE FOR THE API)


API Challenge README

Overview

This API is designed for a Capture The Flag (CTF) challenge, providing a set of functionalities to interact with user data stored in CSV format. It supports operations to retrieve specific files or data based on given parameters.

Features

  • File Retrieval: GET requests allow for the retrieval of specific files from the server, given a valid file name.
  • Data Querying: POST requests enable querying specific data from a CSV file, based on a given region ID.

Getting Started

Prerequisites

  • Python 3.x
  • Flask

Installation

  1. Clone the repository to your local machine.
  2. Install the required dependencies by running pip install flask.
  3. Start the server with python api.py. The API will be available at http://localhost:8000.

API Endpoints

GET /apiV1-usr

Retrieves files from the server.

Parameters:

  • debugPin (optional): A debug pin for testing purposes.
  • fileName: The name of the file to retrieve. Use * to list all available files.

Responses:

  • 200 OK: File or file list successfully retrieved.
  • 400 Bad Request: Required parameters are missing.
  • 403 Forbidden: Invalid request due to incorrect debugPin.
  • 404 Not Found: The specified file was not found.

POST /apiV1-usr

Queries data from a CSV file based on the provided region ID.

Body:

  • RegionID: The ID of the region to query.

Responses:

  • 200 OK: Data successfully retrieved.
  • 404 Not Found: The specified region ID was not found.

Error and Debugging

In case of encountering errors, the API provides descriptive error messages to assist in debugging. For testing and debugging purposes, a default debugPin is provided: 123-456-789. This pin should be used cautiously and only in a secure testing environment to prevent unintended data exposure.

Security Considerations

Ensure that the API is not exposed to the public internet without proper security measures in place, especially when using the debugPin feature.

Documentation

For further details on request formats and additional parameters, refer to the API source-code.

Support

For support or to report issues, please file an issue on the GitHub repository associated with this challenge.

apiv1-usr's People

Contributors

mmo-kali avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.