DeltaV.EdgeClient.Authentication 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package DeltaV.EdgeClient.Authentication --version 0.1.0                
NuGet\Install-Package DeltaV.EdgeClient.Authentication -Version 0.1.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="DeltaV.EdgeClient.Authentication" Version="0.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DeltaV.EdgeClient.Authentication --version 0.1.0                
#r "nuget: DeltaV.EdgeClient.Authentication, 0.1.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 DeltaV.EdgeClient.Authentication as a Cake Addin
#addin nuget:?package=DeltaV.EdgeClient.Authentication&version=0.1.0

// Install DeltaV.EdgeClient.Authentication as a Cake Tool
#tool nuget:?package=DeltaV.EdgeClient.Authentication&version=0.1.0                

Edge Client SDK

Table of Contents

About

This repository contains a C# Edge REST API Client SDK implemented via HttpClient to simplify Edge REST API consumption. The currently available Edge endpoints covered in this SDK are Authentication, Graph, History, and Alarm and Events.

Getting Started

Prerequisites

Before working with this SDK, please ensure that you have setup the following with your Edge installation:

1. A working and reachable Edge REST API endpoint
2. Authorized Credentials for your Edge REST API endpoint

For more information, please consult the Edge Environment User Guide.

Usage

Authentication

Emerson.EdgeClient.Authentication

var handler = new HttpClientHandler();
var client = new HttpClient(handler);

var edgeUrl = "https://localhost/"; //add your Edge REST API IP here
var user = "user"; //add your REST API username here
var pass = "pass"; //add your REST API password here

client.BaseAddress = new Uri(edgeUrl);
var token = await edgeClient.RequestClientTokenAsync(new Emerson.EdgeClient.Authentication.Models.Credentials()
        {
            Username = user,
            Password = pass
        });

edgeClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token.AccessToken);

Graph

Emerson.EdgeClient.Graph

var client = GetAuthenticatedClient(); //see Authentication sample.

var entity = await client.GetGraphByEntityIdAsync(entityId, propertyList, relationshipList);

History

Emerson.EdgeClient.History

var client = GetAuthenticatedClient(); //see Authentication sample.

var history = await client.GetHistoryByIdAsync(entityId, field);

Alarm and Events

Emerson.EdgeClient.AE

var client = GetAuthenticatedClient(); //see Authentication sample.

var history = await client.GetAeAsync(pageSize, pageNumber);

Authors

  • Lawrence Benitez
  • Peter Balanag
  • Gershon Young
  • Carlo Tamayo
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
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
0.1.1 117 5/10/2024
0.1.0 153 4/29/2024