Udom Ratiba API Documentation

Overview

Udom Ratiba API is a custom-made Flask application hosted on Vercel. It functions as a robust API, facilitating the extraction of schedule information from the University of Dodoma (Udom) Ratiba portal through web scraping. Developers are encouraged to leverage this API to seamlessly integrate Udom's schedule data into their applications and programs.

API Endpoints

API Endpoints

1. Get Categories

  • Endpoint: /get/category
  • Method: GET
  • Description: Retrieve categories for schedule data.

Python Example


        import requests
        
        url = 'https://udom-ratiba-api.vercel.app/get/category'
        response = requests.get(url)
        
        print(response.text)

2. Get Options

  • Endpoint: /get/option
  • Method: GET
  • Description: Retrieve options for schedule data.

Python Example


        import requests
        
        url = 'https://udom-ratiba-api.vercel.app/get/option'
        response = requests.get(url)
        
        print(response.text)

3. Get Programs

  • Endpoint: /get/programme
  • Method: GET
  • Description: Retrieve programs for schedule data.

Python Example


        import requests
        
        url = 'https://udom-ratiba-api.vercel.app/get/programme'
        response = requests.get(url)
        
        print(response.text)

4. Get Schedule Table

  • Endpoint: /api
  • Method: POST/GET
  • Form Data:
    • option: Option value
    • programme: Program value
  • Description: Retrieve a schedule table based on the selected option and program.

Python Example


        import requests
        
        url = 'https://udom-ratiba-api.vercel.app/api'
        data = {
            'option': 'programme',
            'programme': '9986'
        }
        response = requests.post(url, data=data)
        
        print(response.text)

How to Use?

Developers can integrate this API into their applications to access Udom Ratiba schedule data for various purposes, including but not limited to:

Developers can send a request using the following example:


import requests

url = 'https://udom-ratiba-api.vercel.app/api'

data = {
    'option': 'programme',
    'programme': '9986'
}

headers = {
    'User-Agent': 'YourCustomUserAgent/1.0',
    'Accept-Language': 'en-US,en;q=0.5',
    'Referer': 'https://ratiba.udom.ac.tz/',
    'Custom-Header': 'YourCustomValue'
}

responseFromServer = requests.post(url, data=data, headers=headers)

print(responseFromServer.text)

How to Use

Developers can integrate this API into their applications to access Udom Ratiba schedule data for various purposes, including but not limited to:

Invalid Request:

Option or Programme Empty:

Option or Programme Not Found:

False Post Values Not Found:

Internal Server Error:

Purpose of the Request Not Specified:

Values are Empty:

Invalid SSL Request:

Unexpected Error:

Option or Programme Values Not Found:

Server Settings

The application is effortlessly hosted on Vercel, eliminating the need for a separate server setup. Developers can seamlessly access and utilize the API without the hassle of intricate server configurations.

Author

This project is developed and maintained by masterplan. For inquiries or collaboration opportunities, feel free to contact Whatsapp.

License

This project is licensed under the MIT License. Feel free to explore and adapt the codebase to meet your specific requirements.