﻿# Argo HTTP successCondition evaluates the response contract

Argo HTTP templates export the response body as result and evaluate successCondition over scoped response variables; a body string alone is not validated document evidence.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/guide-argo-http-successcondition-result/
Language: en

## Decide what the endpoint's answer must mean

A research workflow calls an extraction endpoint through an Argo HTTP template. The endpoint can return a document, an acknowledgement that work was queued or a message explaining failure. The [HTTP-template guide](https://argo-workflows.readthedocs.io/en/latest/http-template/) exports the response body as the `result` output. Receiving that body does not by itself establish that it contains completed extraction suitable for a cited report.

## Express the accepted response condition

The [field reference](https://argo-workflows.readthedocs.io/en/latest/fields/) defines `successCondition` as an expression whose true evaluation counts as success. Choose a predicate consistent with the endpoint's documented response contract. A substring demonstration can illustrate expression syntax, but a familiar word in an error page or queued-job acknowledgement may satisfy a weak predicate. Distinguish the transport response being acceptable from the substantive document evidence being complete.

## Use response variables in their documented scope

The [variables reference](https://argo-workflows.readthedocs.io/en/latest/variables/) lists request method, URL, body and headers, together with response status code, body and headers, for HTTP success conditions. It identifies the body as a string and headers as a collection-valued map. Do not assume these names are general workflow variables available everywhere. Use the exported task output to pass the result onward under the consumer's intended data contract.

## Validate structured contents after the string boundary

If the service returns a structured document envelope, parse it and check the fields needed for analysis: source identity, extraction state and actual content. A success expression checking a response-level condition does not automatically perform every application validation. [Task contracts](/journal/learn-codex-task-contract/) identify what a downstream summarizer needs. Treat a job receipt as a receipt and obtain its eventual result through the appropriate external workflow rather than feeding the acknowledgement into generation as extracted text.

## Distinguish request execution from a rejected condition

The HTTP guide explains that requests execute through the Argo Agent with its own permissions and coordination resources. A request that could not run is different from a returned response failing the condition. [Tool observations](/journal/learn-codex-tool-observation/) should preserve the execution outcome and relevant response evidence. The report can then explain unavailable extraction without claiming an empty document, and a green HTTP node can be assessed against the actual predicate rather than assumed to certify every downstream property of the source material.
