Skip to content

Download API

The Download API provides endpoints for downloading AGMRI files. Below are the available endpoints along with examples

  • Download the scouting report

Each section includes the endpoint details, request methods, descriptions, and example code snippets in Bash, Python, and JavaScript.

Download the scouting report

  • Endpoint: https://api.ia-2024b.algo-rythmn.ai/download/scouting_report
  • Method: GET
  • Description: Download the scouting report for a specific scouting report Id.
  • Request Parameters:
    • reportIds: The ID of the scouting report to download.

Example

curl -X GET "https://api.ia-2024b.algo-rythmn.ai/download/scouting_report?reportIds=58802" \
-H "agmri-access-token: $YOUR_AGMRI_ACCESS_TOKEN"
import requests

response = requests.get(
    "https://api.ia-2024b.algo-rythmn.ai/download/scouting_report?reportIds=58802",
    headers={"agmri-access-token": YOUR_AGMRI_ACCESS_TOKEN},
    params={"reportIds": "58802"}
)
with open("scouting_report.pdf", "wb") as f:
    f.write(response.content)
fetch("https://api.ia-2024b.algo-rythmn.ai/download/scouting_report", {
    method: "GET",
    headers: {
        agmri-access-token: `${YOUR_AGMRI_ACCESS_TOKEN}`
    },
    params: {
        reportIds: "58802"
    }
})
.then(response => response.blob())
.then(blob => {
    const url = window.URL.createObjectURL(blob);
    const link = document.createElement('a');
    link.href = url;
    link.setAttribute('download', 'scouting_report.pdf');
    document.body.appendChild(link);
    link.click();
    link.parentNode.removeChild(link);
    // Clean up the created URL
    window.URL.revokeObjectURL(url);
});

Response

The response will be the scouting report file in PDF format.