HTTP 201 Created: Record the Resource Before Retrying an Upload
An upload receives HTTP 201, but the client treats the unfamiliar response as a failure and sends the same creation request again. Before retrying, record the returned resource identity and verify the endpoint contract. A created record and a completed engineering workflow are different acceptance questions.

Key takeaways Handle creation as its own response state. Preserve resource identity, then verify the required data and downstream outcome without blindly repeating the creation request.
1. Identify what the server created
RFC 9110 defines 201 as successful creation of one or more resources. The primary resource is identified by the response Location header, or the request target when that header is absent. That gives the receiving client a place to start reconciliation; it is not a promise that an uploaded dataset has passed every application check. A service might create an import record while further application work remains. Confirm the documented meaning of that particular resource before telling an operator that a report is complete.
Capture the request method, endpoint, response status, response headers and permitted response content together. Keep sensitive payloads and credentials out of shared diagnostic records. Note whether the upload concerned measurements, an asset definition or a work request. Those objects need different business acceptance checks even when the transport status is identical.
2. Separate creation from follow-up navigation
A Location value in a 201 response identifies a created resource; 201 is not itself an instruction to treat the original request as a redirect. Read the API contract for the supported retrieval operation, required authorisation and response format. Resolve any relative reference against the correct request context. Validate the intended destination before making another request, and never forward credentials to an unexpected host merely because a response contains a URL.
If an integration library accepts only 200 as success, test its status handling before changing the server. Conversely, do not replace a detailed acceptance check with a rule that every status beginning with 2 means the business transaction is finished. Preserve the distinction between protocol success, stored content and the receiving application's final decision.

3. Reconcile a hypothetical duplicate
Suppose an authorised test import returns 201 and identifies record A. The client then reports a parsing error and creates record B on retry. Two records are not evidence that the physical sensor produced two events. They may represent two creation requests for one source file. Compare the request history, documented source identifier and each resource's content before deciding which result is authoritative.
Do not delete either record automatically. Follow the application's correction and audit procedure, retaining the link between the source file and the accepted resource. For future requests, ask whether the service documents a safe deduplication or idempotency mechanism. Do not invent a header name or assume that a client-side retry token is honoured.
4. Test the acceptance path
Use a non-production dataset with an identifiable test record. Verify that the client retains the returned identity, handles permitted empty or structured response bodies correctly, and performs only the documented follow-up. Include a deliberately malformed response in the agreed test harness so an operator sees an accurate unresolved state rather than a misleading success message.
Check the uploaded record count, units, identifiers and timestamps against the source. A successful resource lookup can still reveal an application validation issue. Record that separately from a connection or authentication failure. The handover should explain where staff can find the source, created resource and acceptance result without exposing account secrets.
5. Recommended related solutions
Use the ProSight Software platform overview to frame the required monitoring outcome, and ProSight Custom to discuss the exact interface and acceptance tests. Ask for the deployed endpoint contract and supported retry behaviour; this guide does not assert that a particular upload API or idempotency feature is available in every ProSight deployment.
For related response handling, read the guide on HTTP 204 and no-content success. Bring a sanitised response example, resource identity and source reconciliation to the project discussion. That makes the next investigation specific enough to distinguish transport handling from data-quality work.
Observation | Check next |
201 then client error | Reconcile returned resource |
Repeated creation | Check retry behaviour |
Record exists; rows rejected | Review application validation |
Frequently asked questions
Does 201 prove every row was validated?
Only if the application contract explicitly defines that outcome. Verify the created resource and its acceptance state.
Should I repeat a POST after 201?
First reconcile the returned resource. Repeating a creation request can create another object; use the service's documented recovery method.
Primary technical reference
Read the official protocol reference. Test procedures above are project engineering recommendations.



.png)
Comments