.NET SDK Library
The Digital.ai Agility .NET SDK is a library built using the .NET Framework that allows object-oriented access to the Agility API, which is inherently a REST-based web service. Using the SDK you can query for simple or complex sets of information, update information, and execute system-defined operations, without having to construct HTTP requests and responses or deal with parsing the data contained in the HTTP responses. The SDK serves as a wrapper to the Agility API, eliminating the need to code the infrastructure necessary for direct handling of HTTP requests and responses.
The SDK works with the same assets and attributes that make up the rest of the Agility data model, and the same Meta API for discovering asset types. When constructing your queries, you must use the system name for the asset type you would like to retrieve. This is true whether using the API directly or the SDK.
In terms of API authentication, the SDK supports using Basic(username and password), Windows Integrated(NTLM), Access Tokens, and OAuth2.
System Requirements
The .NET SDK requires .NET Framework 4.7.1 and Agility 8.0 or higher (though some features are only available with newer releases).
Getting the .NET SDK
There are two ways that you can get the SDK: by using NuGetor by downloading the SDK and it associated dependencies from the Agility AppCatalog and setting a reference to it manually from within your project.
The recommended approach is to use NuGet as it will take care of all the dependencies for you, plus make it easier to update the SDK as new versions become available.
Setting a reference using NuGet
Assuming that you are using Visual Studio as your IDE, use the following to steps to add the .NET SDK to your project using NuGet:
- Launch Visual Studio for your project.
- In the Solution Explorer, right click on References then select Manage NuGet Packages.
- Check that you are set to search online packages, then search using the term "VersionOne".
- Select "VersionOne.NET SDK" from the list, then click Install.
Setting a reference manually
Assuming that you are using Visual Studio as your IDE, use the following to steps to manually add the .NET SDK to your project:
- Download the latest stable build of the SDK from the AppCatalog page.
- Save the ZIP file to a known location on your hard drive.
- Unzip the SDK.
- Navigate to the \bin folder within the SDK directory structure and copy all the DLLs you find there to your project directory structure.
- Launch Visual Studio for your project.
- In the Solution Explorer, right click on References then select Add Reference.
- Click Browse.
- Navigate to where you copied the SDK DLLs and select all of them, then click Add.
While the .NET SDK is fully supported by Agility, it is also open-sourced. You can get the source code for the SDK from this GitHub repository:https://github.com/versionone/VersionOne.SDK.NET.APIClient
Using the .NET SDK
Once you properly set a reference to the SDK within your project, using it is simply a matter of making a connection to Agility, then writing the code to query, update, and create Agility assets, or execute operations against them.
The following topics discuss the major features of the SDK and demonstrate how you can make use of them:
- Creating a Connection
- Querying Assets
- Querying Asset History
- Querying Configurations and Localizations
- Creating Assets
- Updating Assets
- Executing Operations
- Executing Pass-Through Queries
- Working with Attachments and Images