Encountering a 409 Conflict during programmatic deployment of flow definitions via PUT to /api/v2/flows/{flowId}. The pipeline parses the JSON, validates against the Flow API schema, and executes the request. Validation succeeds until the version hash check. The API returns a 409 Conflict despite the If-Match header matching the etag retrieved from the initial GET request. The conflict occurs specifically when a child node references a modified routing group ID.
RequestBody body = RequestBody.create(jsonFlow.toString(), MediaType.get("application/json"));
Request request = new Request.Builder()
.url("https://myorg.mygenesyscloud.com/api/v2/flows/12345")
.header("If-Match", etagFromRepo)
.put(body)
.build();
The deployment process includes a rollback handler that intercepts 400 and 409 responses, reverting to the last known good JSON configuration. Upon successful deployment, the pipeline invokes the Flow Analytics API for a dry-run simulation and dispatches a Slack webhook payload containing the flow name and updated version number. Timezone offset drift has been ruled out. The OkHttp client returns a raw 409 response body without a detailed stack trace.
Does the Flow API require fetching the current flow definition, merging local changes, and re-submitting to satisfy etag validation? Alternatively, does the If-Match header require a specific format beyond the standard etag string? Seeking clarification on the expected etag behavior for programmatic node updates.