fetch-url
Purpose
Section titled “Purpose”Ask the agent to perform an HTTP GET to a target URL and stream the response back to the
caller. The request runs from the agent host’s network vantage point (its egress IP), which
lets a pipeline fetch a resource from where the agent sits rather than from the CI runner.
Config
Section titled “Config”Unlike the other commands, fetch-url uses a single, fixed config file — config/fetch-url.json
— regardless of the URL. It only carries apiKeys:
{ "type": "FETCH_URL", "apiKeys": { "REPLACE_WITH_A_LONG_RANDOM_SECRET": "gitlab-ci" }}type: FETCH_URLapiKeys: REPLACE_WITH_A_LONG_RANDOM_SECRET: gitlab-ciThere are no other configurable fields; the connect/read/write timeouts are fixed at 30 seconds.
curl \ --fail \ -H "api-key: $FETCH_KEY" \ "https://dc-agent.example.com/dc-agent/fetch-url/https://internal.example.com/health"GET /dc-agent/fetch-url/{targetUrl} — the target URL is taken from the request: the part of
the path after /fetch-url/ together with any query string.
Parameters
Section titled “Parameters”| Name | Description | Default | Required |
|---|---|---|---|
apiKeys |
Accepted secrets → owner labels (in config/fetch-url.json) |
— | yes (without it every call gets 401) |
type |
FETCH_URL; must match the endpoint — another type gets 401, a missing or misspelled one is accepted with a warning in the agent log |
— | recommended |
Result
Section titled “Result”The upstream response body is streamed back to the caller.