/getReturns the current snapshot for a city. Query parameters and request headers are echoed back under `args` and `headers`, which makes this the cheapest way to prove that the gateway forwarded exactly what the agent sent — including the upstream credential it injected.
Look up a city snapshot
Returns the current snapshot for a city. Query parameters and request headers are echoed back under args and headers, which makes this the cheapest way to prove that the gateway forwarded exactly what the agent sent — including the upstream credential it injected.
**Operation ID:** lookupCitySnapshot
**Tags:** lookup
**Authentication:** API key in header X-Api-Key.
Parameters
| Name | In | Required | Type | Description | Example |
|---|---|---:|---|---|---|
| city | query | yes | string | City to look up, as a free-form name. | Amsterdam |
| units | query | no | string | Unit system for numeric values. | metric |
| X-Client-Id | header | yes | string | Identifier of the calling agent or app. | agent-demo-1 |
| X-Trace-Id | header | no | string (uuid) | Optional correlation id, echoed back for debugging. | 0f1d8b6c-7c2c-4a4e-9c1e-3a6f5b0d2e11 |
Responses
| Status | Description | Content types |
|---|---|---|
| 200 | The echoed request — query args, headers and resolved URL. | application/json |
| 400 | Missing or malformed query parameters. | |
| 402 | Payment required — returned by the Apiosk gateway, not the upstream. | |
API key in header `X-Api-Key`.
{
"properties": {
"city": {
"description": "City to look up, as a free-form name.",
"example": "Amsterdam",
"required": true,
"type": "string",
"x-parameter-location": "query"
},
"units": {
"default": "metric",
"description": "Unit system for numeric values.",
"enum": [
"metric",
"imperial"
],
"example": "metric",
"required": false,
"type": "string",
"x-parameter-location": "query"
}
},
"required": [
"city"
],
"type": "object"
}{
"description": "What the echo upstream mirrors back for every request.",
"properties": {
"args": {
"additionalProperties": {
"type": "string"
},
"description": "Query parameters as received.",
"type": "object"
},
"headers": {
"additionalProperties": {
"type": "string"
},
"description": "Request headers as received, lowercased.",
"type": "object"
},
"json": {
"description": "Parsed JSON request body, when one was sent.",
"nullable": true,
"type": "object"
},
"url": {
"description": "Fully resolved upstream URL.",
"example": "https://postman-echo.com/get?city=Amsterdam&units=metric",
"type": "string"
}
},
"type": "object",
"x-apiosk-content-type": "application/json",
"x-apiosk-content-types": [
"application/json"
]
}{
"properties": {
"X-Client-Id": {
"description": "Identifier of the calling agent or app.",
"example": "agent-demo-1",
"required": true,
"type": "string",
"x-parameter-location": "header"
},
"X-Trace-Id": {
"description": "Optional correlation id, echoed back for debugging.",
"example": "0f1d8b6c-7c2c-4a4e-9c1e-3a6f5b0d2e11",
"format": "uuid",
"required": false,
"type": "string",
"x-parameter-location": "header"
}
},
"required": [
"X-Client-Id"
],
"type": "object"
}{
"X-Client-Id": "agent-demo-1",
"X-Trace-Id": "0f1d8b6c-7c2c-4a4e-9c1e-3a6f5b0d2e11",
"city": "Amsterdam",
"units": "metric"
}{
"args": {
"city": "Amsterdam",
"units": "metric"
},
"headers": {
"host": "postman-echo.com",
"x-api-key": "demo-secret-123",
"x-client-id": "agent-demo-1",
"x-trace-id": "0f1d8b6c-7c2c-4a4e-9c1e-3a6f5b0d2e11"
},
"url": "https://postman-echo.com/get?city=Amsterdam&units=metric"
}