PINGWorks.SitecoreExperienceEdge.AdminSDK 2.2.0

dotnet add package PINGWorks.SitecoreExperienceEdge.AdminSDK --version 2.2.0
                    
NuGet\Install-Package PINGWorks.SitecoreExperienceEdge.AdminSDK -Version 2.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PINGWorks.SitecoreExperienceEdge.AdminSDK" Version="2.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PINGWorks.SitecoreExperienceEdge.AdminSDK" Version="2.2.0" />
                    
Directory.Packages.props
<PackageReference Include="PINGWorks.SitecoreExperienceEdge.AdminSDK" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PINGWorks.SitecoreExperienceEdge.AdminSDK --version 2.2.0
                    
#r "nuget: PINGWorks.SitecoreExperienceEdge.AdminSDK, 2.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PINGWorks.SitecoreExperienceEdge.AdminSDK@2.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PINGWorks.SitecoreExperienceEdge.AdminSDK&version=2.2.0
                    
Install as a Cake Addin
#tool nuget:?package=PINGWorks.SitecoreExperienceEdge.AdminSDK&version=2.2.0
                    
Install as a Cake Tool

PINGWorks.SitecoreExperienceEdge.AdminSDK

This is a .NET SDK for working with Sitecore's Experience Edge Admin API.<br /> More information about Sitecore's API is at Admin API Doc (official)

Features

  • Typed, DI-friendly services for interacting with Sitecore EE Admin API
  • Async-first APIs with CancellationToken support
  • NetStandard 2.1 for wide compatibility
  • Automatic token maintenance

Getting started

Prerequisites

To work with the SDK you will require credentials which are created in the SitecoreAI Deployment Portal.

Create an Environment credential of type Edge Administration for the project and environment combination for which you wish to grant access. At this time the SDK only supports connecting to a single environment.

Install

From your project directory:

dotnet add package PINGWorks.SitecoreExperienceEdge.AdminSDK

AppSettings

Properties are available to configure the SDK through configuration binding. The snippet below shows all options along with their default values. You do not need to include values where you wish to use the defaults.

{
	/* The base URL of the Admin API */
	"ServiceEndpoint": "https://edge.sitecorecloud.io/api/admin/v1/",

	/* The URL of the Token Request API */
	"TokenEndpoint": "https://auth.sitecorecloud.io/oauth/token",

	/* The auth audience */
	"Audience": "https://api.sitecorecloud.io",

	/* The auth grant type */
	"GrantType": "client_credentials",

	/* The value of ClientID from the SitecoreAI Deploy Portal */
	"ClientID": "[Created in SitecoreAI Deploy portal's Credentials pane]",

	/* The value of ClientSecret from the SitecoreAI Deploy Portal */
	"ClientSecret": "[Created in SitecoreAI Deploy portal's Credentials pane]",
}

When creating credentials for use with the SDK, ensure that you select the Edge Administration credential type.

We recommend the use of Visual Studio's User Secrets feature to store sensitive information such as ClientId and ClientSecret during development.

Register services

Register the SDK in Program.cs, e.g. when using the minimal hosting model:

// Program.cs
var builder = WebApplication.CreateBuilder(args);

// Register SDK services - set options through binding or manually
builder.Services.AddSitecoreEEAdminSdk( opt => config.GetSection( "mySettings" ).Bind( opt ) );

HttpClient defaults. This call (via AddSitecoreEECommon) applies AddStandardResilienceHandler() and a DEBUG-only console request/response logger to every HttpClient in your container — not just the SDK's own. See the PINGWorks.SitecoreExperienceEdge.Common README for how to customize the resilience options per-client.

This library uses Json serialization through System.Text.Json.

Available services

Injectable interface ISitecoreAdminSdk

Method Description
ClearCacheForTenant() Clears the entire cache for a given tenant.
DeleteContent() Removes tenant data from the data storage.
GetSettings() Lists all available settings for a tenant.
UpdateSettings( SettingsRequest ) Updates all available settings for a tenant.
PatchSettings( params PatchRequest<SettingsRequest>[] ) Updates a setting for a tenant using one or more Patch operations.
CreateWebhook( WebhookRequest ) Creates a new webhook.
UpdateWebhook( string, WebhookRequest ) Updates an existing webhook.
DeleteWebhook( string ) Deletes a specific webhook.
ListWebhooks() Lists all webhooks for a tenant.
GetWebhookById( string ) Gets a specific tenant webhook.

Upgrade notes

When upgrading from v1.x to v2.x you will need to change service references from IAdminSdk to ISitecoreAdminSdk.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.0 93 6/11/2026
2.1.1 94 4/18/2026
2.1.0 109 4/16/2026
2.0.0 98 4/8/2026
1.1.0 116 2/11/2026
1.0.0 111 2/4/2026

v2.2.0
✔️ Add CancellationToken support
🐛 Send correct RFC mime type for Patch requests

v2.1.1
🐛 Updated WebhookResponse as the `BodyInclude` property is sent from Sitecore as an object, not a string, for OnEnd configured webhooks

v2.1.0
✔️ Apply some missing attribute targeting attributes
✔️ Updated webhook processing

v2.0.0
🏆 Updates to work with standardised behaviours across Sitecore APIs, including Content API and Events API
🚨 IAdminSDK renamed to ISitecoreAdminSdk for better alignment with other libraries
✔️ Internal components shared with other SDKs are moved to `.Common` library
✔️ Library now has a dependency on `PINGWorks.SitecoreExperienceEdge.Common`

v1.1.0
🐛 Updated token resolver to not get stuck in an infinite loop if the credentials are not present or incorrect

v1.0.0
Initial release