Skip to content

Prepare/Academies API: Excel exports fail if too many UKPRNs are queried #724

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

saziadfe
Copy link
Contributor

@saziadfe saziadfe commented Jun 3, 2025

Added POST endpoints to two existing GET endpoints

Ticket: https://dfe-gov-uk.visualstudio.com/Academies-and-Free-Schools-SIP/_workitems/edit/215979

@FrostyApeOne
Copy link
Collaborator

@saziadfe
Please follow a consistent pattern for the routes, like

POST /establishments/bulk/ukprns
POST /establishments/bulk/urns

Make sure the name matches too

So it would be like

[HttpPost("establishments/bulk/ukprns", Name = "EstablishmentsByUkprns")]
public IActionResult GetEstablishmentsByUkprns([FromBody] UkprnRequestModel model) { … }

[HttpPost("establishments/bulk/urns", Name = "EstablishmentsByUrns")]
public IActionResult GetEstablishmentsByUrns([FromBody] UrnRequestModel model)   { … }

and the models are

public class UkprnRequestModel
{
    public List<string> Ukprns { get; set; }
}

public class UrnRequestModel
{
    public List<string> Urns { get; set; }
}

@FrostyApeOne FrostyApeOne self-requested a review June 4, 2025 16:05
Copy link

sonarqubecloud bot commented Jun 5, 2025

@saziadfe saziadfe merged commit ae132df into main Jun 5, 2025
3 checks passed
@saziadfe saziadfe deleted the bugfix/215979-excel-exports-fail-if-too-many-UKPRNs-are-queried branch June 5, 2025 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants