REST-API: Guides and Practical Know-how | Page 2 | mironsoft Blog
REST-API
-
Mar 21, 2026
Synchronous REST calls block PHP-FPM workers and run into HTTP timeouts on bulk data. The asynchronous bulk API in Magento 2 moves processing into the message queue, making mass imports, price updates and ERP integrations scalable without blocking the checkout thread.
-
Mar 21, 2026
A REST API tested in the office over a stable Wi-Fi connection behaves fundamentally differently on a smartphone on a train with fluctuating coverage. Large payloads, many individual requests, and missing offline behavior, barely noticeable in the office, become real usability problems on mobile networks, requiring deliberate, mobile-specific API design decisions.
-
Mar 19, 2026
Insecure REST APIs are not a rare occurrence. They do not arise from bad intentions but from missing security layers in a growing codebase. Authentication gaps, missing rate limiting, unvalidated input, SSRF vectors and mass assignment weaknesses are the most common findings in API security reviews, and they can be closed systematically with clear patterns.
-
Mar 19, 2026
Every public API has to change eventually. The question is not whether, but how, without breaking existing clients. API versioning is not a pure architecture decision, it is an operational process: from the URI strategy through content negotiation to structured deprecation cycles, the strategy determines how much technical debt an API accumulates over time.
-
Mar 18, 2026
Video transcoding, a large data export, or complex report generation rarely fits within the response time of a single synchronous HTTP request. The long-running operations pattern solves this by immediately confirming the operation with HTTP 202 Accepted, while the actual work runs asynchronously in the background and the client polls progress through a separate status endpoint.
-
Mar 17, 2026
Magento 2 exposes complex business logic through REST and GraphQL APIs. Anyone implementing custom endpoints, schema extensions, or API policies needs reliable integration tests, not manual Postman clicking, not "works on staging, fingers crossed".
-
Mar 15, 2026
Anyone who checks every field of an API response individually with expect often misses silent breaking changes such as new required fields, changed types or removed enum values. Schema validation against JSON Schema or OpenAPI catches exactly these cases automatically, cuts test code significantly, and integrates smoothly into Cypress, Playwright and the CI pipeline, so frontend and backend reliably honor the same contract.
-
Mar 10, 2026
The checkout flow in Magento GraphQL is complex: seven mutations from cart creation to order placement, sessionless state management via the cart ID, and a series of typical error sources that are hard to pinpoint without good debugging. This article shows how the flow works, where its limits lie, and how to systematically find errors.
-
Mar 7, 2026
A permissively set Access-Control-Allow-Origin header lifts exactly the browser protection the Same-Origin Policy is meant to guarantee. This article explains preflight requests, the dangerous combination of wildcard and credentials, origin reflection as the most common mistake, and how a clean, server-side allowlist keeps working reliably for Magento APIs behind a CDN and Varnish.
-
Mar 3, 2026
Manually generating client SDKs from an OpenAPI spec is error-prone and blocks releases. Running openapi-generator inside a CI/CD pipeline generates, validates and publishes SDKs automatically on every spec change, with Spectral linting, breaking change detection and contract tests acting as gates.