Skip to main content

Using /latest Endpoint

In this tutorial, we will be using the /latest endpoint to get the latest circular in a category.

This endpoint returns a JSON object containing the latest circular's information.

Request Structure

Send a GET request to the following URL: https://bpsapi.rajtech.me/latest/**{category}**
or, send a GET request to: https://bpsapi.rajtech.me/latest?category={category} (not recommended, legacy way)

{category} here is either a category name (from https://bpsapi.rajtech.me/categories) or a category-id (In https://bpsdoha.com/circular/category/**52**-academic-year-2024-25, 52 is the id)

Example Requests

Here is an example request using Python's requests library:

import requests

category = "general"
url = f"https://bpsapi.rajtech.me/latest/{category}"

request = requests.get(url)
print(request.text)

Example Response

When getting circulars from the general category, the response is a dictionary with the following keys:

{
"status": "success",
"http_status": 200,
"data": {
"title": "Circular 01 - Public Holiday- Eid-Al-Fitr 2024",
"link": "https://bpsdoha.com/circular/category/52-academic-year-2024-25?download=1618",
"id": "1618"
}
}

Thanks for reading!