Metaforce.WebEditor.Api.Client 5.0.0

dotnet add package Metaforce.WebEditor.Api.Client --version 5.0.0                
NuGet\Install-Package Metaforce.WebEditor.Api.Client -Version 5.0.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="Metaforce.WebEditor.Api.Client" Version="5.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Metaforce.WebEditor.Api.Client --version 5.0.0                
#r "nuget: Metaforce.WebEditor.Api.Client, 5.0.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.
// Install Metaforce.WebEditor.Api.Client as a Cake Addin
#addin nuget:?package=Metaforce.WebEditor.Api.Client&version=5.0.0

// Install Metaforce.WebEditor.Api.Client as a Cake Tool
#tool nuget:?package=Metaforce.WebEditor.Api.Client&version=5.0.0                

Metaforce.WebEditor.Api clients

This client package aims to facilitate the integration with the Metaforce WebEditor/Pages api. There use to be two versions of this package, now there's only one. The one written in netstandard2.0 has been removed and now the nuget package is written for net8.0 + net9.0... It offers auntentication with either ClientId/ClientSecret or ClientId/CertificateThumbprint (mTLS).

Getting started

Download the package to include it in your project and enjoy 😃

Usage Metaforce.WebEditor.Api.Client

ClientId/ClientSecret authentication

Setup your appsettings.json with the following configuration structure:

{
  "WebEditorClientOptions": {
    "AuthorityEndpoint": "https://identity-v2.metaforce.net",
    "ApiBaseAddress": "https://api.webeditor.metaforce.net",
    "ClientId": "YOUR_CLIENT_ID",
    "ClientSecret": "YOUR_CLIENT_SECRET",
    "Scopes": "api.external",
    "CustomerEnvironment": "Test"
  }
}

mTLS authentication

Setup your appsettings.json with the following configuration structure:

{
  "WebEditorClientOptions": {
    "AuthorityEndpoint": "https://identity-v2.metaforce.net",
    "ApiBaseAddress": "https://api.webeditor.metaforce.net",
    "ClientId": "YOUR_CLIENT_ID",
    "CertificateThumbprint": "YOUR_THUMBPRINT",
    "Scopes": "api.external",
    "CustomerEnvironment": "Test"
  }
}

Configuration properties

  • AuthorityEndpoint - The URL of the Identity server. Should always be https://identity-v2.metaforce.net.
  • ApiBaseAddress - The base URL of the service. Should always be https://api.webeditor.metaforce.net.
  • ClientId - The ClientId of the api client. Get it from Centerpoint.
  • ClientSecret - The ClientSecret of the api client. Get it from Centerpoint.
  • CertificateThumbprint - The thumbprint of your client authentication certificate. Use it when you create your client in Centerpoint. The client certificate should be installed in the CurrentUser certificate store.
  • Scopes - The api client should always be scoped to "api.external". If one wants to further limit the scope of the api client one can also configure the api client to be scoped for webeditor.dev, webeditor.test, webeditor.stage, webeditor.demo and webeditor.prod. This scope should then be configured for a Pages environment to limit what clients can access the specific environment. This Scopes value will limit the client to access TEST environments: "api.external webeditor.test".
  • CustomerEnvironment - This value should point to the specific Pages environment the client should Pages with. Possible values are Development, Test, Test1, Test2, Test3, Test4, Test5, IntegrationTest, AcceptanceTest and Production.

Configure services

var hostBuilder = new HostBuilder()
.ConfigureServices((context, services) =>
{
    _ = services.WebEditorClient(context.Configuration);
});

var host = hostBuilder.Build();

Client services

Once configuration is done you can use the following clients (interfaces) via dependency injection. Each interface corresponds to the api:s exposed by the Metaforce WebEditor api.

  • IWebEditorApiClient - Corresponds to the Interact controller used to generate ondemand documents in PDF-, PDF with metadata and HTML-format, creating WebEditor instances and working with the Dynamo (postprocess database).
  • IWebEditorArchive - Corresponds to the Archive controller that views documents in the Viewpoint archiving system.
  • IWebEditorDistribution - Corresponds to Distribution controller used to generate and distribute documents to digital mailboxes, email and SMS notification and more services.
  • IWebEditorStatus - Corresponds to Status controller used to controll and manage WebEditor instances.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 is compatible. 
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
5.0.0 26 11/28/2024
5.0.0-beta3 27 11/28/2024
5.0.0-beta2 28 11/28/2024
5.0.0-beta 27 11/28/2024
4.0.0 71 11/17/2024
3.0.1 171 1/12/2024
3.0.0 157 12/31/2023
2.0.3 627 7/14/2023
2.0.2 167 7/14/2023
2.0.1 159 7/13/2023
2.0.0 164 7/13/2023
1.0.17 174 7/13/2023
1.0.16 633 10/24/2022
1.0.15 675 9/30/2022
1.0.14 420 9/30/2022
1.0.13 396 9/29/2022
1.0.12 404 9/29/2022
1.0.11 408 9/16/2022
1.0.10 709 4/27/2022
1.0.9 502 4/14/2022
1.0.8 448 4/14/2022
1.0.7 443 4/11/2022
1.0.6 437 4/11/2022
1.0.5 504 4/4/2022
1.0.4 438 4/1/2022
1.0.3 595 3/10/2022
1.0.2 609 1/24/2022
1.0.1 531 1/19/2022
1.0.0 455 1/19/2022
0.0.15 498 1/14/2022
0.0.14 460 1/13/2022
0.0.13 446 1/13/2022
0.0.12 482 1/11/2022
0.0.11 465 1/11/2022
0.0.10 301 1/5/2022
0.0.9 285 1/4/2022
0.0.8 291 1/4/2022
0.0.7 279 1/3/2022
0.0.6 296 1/2/2022
0.0.5 313 12/25/2021
0.0.4 397 12/14/2021
0.0.3 291 12/14/2021
0.0.2 295 12/14/2021
0.0.1 310 12/14/2021