Metaforce.WebEditor.Api.Client
4.0.0
dotnet add package Metaforce.WebEditor.Api.Client --version 4.0.0
NuGet\Install-Package Metaforce.WebEditor.Api.Client -Version 4.0.0
<PackageReference Include="Metaforce.WebEditor.Api.Client" Version="4.0.0" />
paket add Metaforce.WebEditor.Api.Client --version 4.0.0
#r "nuget: Metaforce.WebEditor.Api.Client, 4.0.0"
// Install Metaforce.WebEditor.Api.Client as a Cake Addin #addin nuget:?package=Metaforce.WebEditor.Api.Client&version=4.0.0 // Install Metaforce.WebEditor.Api.Client as a Cake Tool #tool nuget:?package=Metaforce.WebEditor.Api.Client&version=4.0.0
Metaforce.WebEditor.Api clients
This client package aims to facilitate the integration with the Metaforce WebEditor api. There are two versions of this package:
- One written in netstandard2.0 aimed at .NET Framework implementations (but .NET Core as well) - Metaforce.WebEditor.Api.Client.
- One written in net6.0 aimed at .NET Core implementations - Metaforce.WebEditor.Api.Client.Core.
The main difference is that the .NET Core package offers the ability to authenticate using mTLS, otherwise both packages offers the exact same funtionality.
Getting started
Download the package to include it in your project and enjoy 😃
Upgrading from version 1 to version 2
Due to refactoring classes have changed namespaces. Let Visual Studio do its magic and guide after your upgrade...
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"
}
}
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. This only works with the .NET Core package.
- 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 can then be configured for an Interact environment to limit what clients can access the specific environment.
- CustomerEnvironment - This value should point to the specific Interact environment the client should interact 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();
Usage Metaforce.WebEditor.Api.Client.Core
ClientId/ClientSecret authentication (Core)
See ClientId/ClientSecret authentication configuration above...
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 (Core)
See Configuration properties above...
Configure services (Core)
var hostBuilder = new HostBuilder()
.ConfigureServices((context, services) =>
{
_ = services.WebEditorClientCore(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- and HTML-format, creating WebEditor instances and working with the Dynamo (postprocess database).
- IWebEditorArchive - Corresponds to the Archive controller used to interact with 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 | Versions 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. |
-
net8.0
- IdentityModel (>= 7.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http (>= 9.0.0)
- Microsoft.Extensions.Http.Polly (>= 9.0.0)
- Newtonsoft.Json (>= 13.0.3)
- ViewpointPro.Client (>= 7.2.0)
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 |
---|---|---|
4.0.0 | 69 | 11/17/2024 |
3.0.1 | 171 | 1/12/2024 |
3.0.0 | 154 | 12/31/2023 |
2.0.3 | 609 | 7/14/2023 |
2.0.2 | 166 | 7/14/2023 |
2.0.1 | 158 | 7/13/2023 |
2.0.0 | 163 | 7/13/2023 |
1.0.17 | 173 | 7/13/2023 |
1.0.16 | 632 | 10/24/2022 |
1.0.15 | 674 | 9/30/2022 |
1.0.14 | 419 | 9/30/2022 |
1.0.13 | 395 | 9/29/2022 |
1.0.12 | 403 | 9/29/2022 |
1.0.11 | 407 | 9/16/2022 |
1.0.10 | 708 | 4/27/2022 |
1.0.9 | 501 | 4/14/2022 |
1.0.8 | 447 | 4/14/2022 |
1.0.7 | 442 | 4/11/2022 |
1.0.6 | 436 | 4/11/2022 |
1.0.5 | 503 | 4/4/2022 |
1.0.4 | 437 | 4/1/2022 |
1.0.3 | 594 | 3/10/2022 |
1.0.2 | 608 | 1/24/2022 |
1.0.1 | 530 | 1/19/2022 |
1.0.0 | 454 | 1/19/2022 |
0.0.15 | 497 | 1/14/2022 |
0.0.14 | 459 | 1/13/2022 |
0.0.13 | 445 | 1/13/2022 |
0.0.12 | 481 | 1/11/2022 |
0.0.11 | 464 | 1/11/2022 |
0.0.10 | 300 | 1/5/2022 |
0.0.9 | 284 | 1/4/2022 |
0.0.8 | 290 | 1/4/2022 |
0.0.7 | 278 | 1/3/2022 |
0.0.6 | 295 | 1/2/2022 |
0.0.5 | 312 | 12/25/2021 |
0.0.4 | 396 | 12/14/2021 |
0.0.3 | 288 | 12/14/2021 |
0.0.2 | 294 | 12/14/2021 |
0.0.1 | 309 | 12/14/2021 |