Skip to content

feat: add multi-region endpoint resolution via Endpoint static class#195

Merged
OMpawar-21 merged 1 commit into
enhc/betafrom
enhc/DX-7278
Jun 11, 2026
Merged

feat: add multi-region endpoint resolution via Endpoint static class#195
OMpawar-21 merged 1 commit into
enhc/betafrom
enhc/DX-7278

Conversation

@OMpawar-21

Copy link
Copy Markdown
Contributor

Summary

  • Adds Endpoint.GetContentstackEndpoint(region, service) static class
    (Contentstack.Management.Core.Endpoints) for dynamic CMA host resolution
    across all 7 supported regions — replaces hardcoded api.contentstack.io
  • regions.json registry is auto-downloaded from CDN on first use and cached
    on disk next to the DLL; self-heals if missing — no setup required
  • Scripts/refresh-region.cs is bundled inside the NuGet package via
    contentFiles + build/contentstack.management.csharp.targets; the
    script is automatically placed in the consumer's Scripts/ folder on first
    dotnet build and can be run anytime with dotnet run Scripts/refresh-region.cs

Usage

using Contentstack.Management.Core.Endpoints;

string host = Endpoint.GetContentstackEndpoint("eu", "contentManagement", omitHttps: true);
// → "eu-api.contentstack.com"

var client = new ContentstackClient(new ContentstackClientOptions
{
    Host      = host,
    Authtoken = "<MANAGEMENT_TOKEN>"
});

@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

@OMpawar-21 OMpawar-21 marked this pull request as ready for review June 11, 2026 10:59
@OMpawar-21 OMpawar-21 requested a review from a team as a code owner June 11, 2026 10:59
@OMpawar-21 OMpawar-21 merged commit f6f9843 into enhc/beta Jun 11, 2026
7 of 10 checks passed
@OMpawar-21 OMpawar-21 deleted the enhc/DX-7278 branch June 11, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants