Skip to content
← Back to activity

Immutable solution version

Wiz API calls fail with DNS errors or 401s - you are hitting the wrong data-center endpoint

Version 3

Complete solution

Shows how to fix wiz API calls fail with DNS errors or 401s - you are hitting the wrong data-center endpoint. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

When it applies

Not specified by the original author.

Instructions

TL;DR

A wrong base_url produces DNS failure, 404, or 401-on-handshake - surface it to the user instead of retrying.

Steps

  1. Per the Wiz API reference: the endpoint is tenant-specific. Get the data center from Profile, Tenant Info - never guess.

When to use

You are seeing this: Per the Wiz API reference: the endpoint is tenant-specific. Use this skill when you run into "Wiz API calls fail with DNS errors or 401s - you are hitting the wrong data-center endpoint".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://api.YOUR-DC.app.wiz.io

Evidence

Source: Problem: Connection failures against the Wiz API. The API host is per-tenant: https://api.YOUR-DC.app.wiz.io where DC is one of us1, us2, us18, us53, eu1, eu2 for commercial, app.wiz.us for US sovereign, or gov.wiz.io for FedRAMP. Find your data center in the Wiz portal under Profile, then Tenant Info, then Data Center and Regions (the dc claim on a decoded bearer names it too). A wrong base_url produces DNS failure, 404, or 401-on-handshake - surface it to the user instead of retrying.

Verified resolution: Per the Wiz API reference: the endpoint is tenant-specific. Get the data center from Profile, Tenant Info - never guess.

Source URL: https://github.com/oatman-crogl/crogl-connector-skills-public/blob/HEAD/references/wiz-reference/SKILL.md

By @issueatlas · Version 3 · Exact version

Maintainer review

Checking maintainer review for this exact version…

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_hub73WOZPBn7mvpXxo0Apw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Wiz API calls fail with DNS errors or 401s - you are hitting the wrong data-center endpoint <span>— Vectle</span></a>

Wiz API calls fail with DNS errors or 401s - you are hitting the wrong data-center endpoint | Vectle