AutotaskNet 1.0.10-alpha

This is a prerelease version of AutotaskNet.
dotnet add package AutotaskNet --version 1.0.10-alpha
                    
NuGet\Install-Package AutotaskNet -Version 1.0.10-alpha
                    
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="AutotaskNet" Version="1.0.10-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AutotaskNet" Version="1.0.10-alpha" />
                    
Directory.Packages.props
<PackageReference Include="AutotaskNet" />
                    
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 AutotaskNet --version 1.0.10-alpha
                    
#r "nuget: AutotaskNet, 1.0.10-alpha"
                    
#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 AutotaskNet@1.0.10-alpha
                    
#: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=AutotaskNet&version=1.0.10-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=AutotaskNet&version=1.0.10-alpha&prerelease
                    
Install as a Cake Tool

AutotaskNet

This library assists in reading and writing from the Autotask REST API.

This library is currently in beta and is not recommended for production environments.

Getting Started

Add a reference to the NuGet package in your application:

Install-Package AutotaskNet
dotnet add package AutotaskNet

Register the library in the dependency injection container:

using AutotaskNet.Api;

builder.Services.AddAutotask(new AutotaskCredentials
{
    ApiIntegrationCode = "asdf",
    UserName = "asdf",
    Secret = "asdf"
});

If you have not yet set up your Autotask API User, refer to their documentation.

Finally, inject the IAutotaskNet interface as a dependency.

Usage Examples

Creating Entities

using IAutotaskNet service;

// Root entity
var ticket = new Ticket { ... };
await service.CreateAsync(ticket);

// Child entity
var ticketNote = new TicketNote { ... };
await service.CreateAsync(ticket.Id, ticketNote);

Querying Entities

// Root entity
Ticket ticket = await service.GetAsync<Ticket>(12345);
IEnumerable<Ticket> tickets = await service.QueryAsync<Ticket>(QueryFilter.All, 5); // 5 pages of 500 entities
int ticketUdfMatches = await service.QueryCountAsync<Ticket>(new QueryFilter
{
    Filters =
    [
        new QueryFilter.Filter
        {
            Operator = Operator.Equal,
            Field = "MyUdf",
            Value = "Value",
            IsUdf = true
        }
    ]
});

// Child entity
TicketNote ticketNotes = await service.QueryAsync<TicketNote>(ticket.Id);
TicketNote ticketNote = await service.GetAsync<TicketNote>(ticket.Id, 12345);

Updating Entities

// Root entity
Ticket ticket = await service.GetAsync<Ticket>(12345);
ticket.Title = "New title";
await service.UpdateAsync(ticket);

// Child entity
TicketNote ticketNote = await service.GetAsync<TicketNote>(ticket.Id, 12435);
ticketNote.Description = "New description";
await service.UpdateAsync(ticket.Id, ticketNote);

Deleting Entities

// Root entity
Ticket ticket = await service.GetAsync<Ticket>(12345);
await service.DeleteAsync<Ticket>(ticket.Id);

// Child entity
TicketNote ticketNote = await service.GetAsync<TicketNote>(ticket.Id, 12435);
await service.DeleteAsync<TicketNote>(ticket.Id, ticketNote.Id);

Retrieving Entity Metadata

// Root entity
EntityInformationResult entityInformation = await service.GetEntityInformationAsync<Ticket>();
EntityFieldsResult entityFields = await service.GetEntityFieldsAsync<Ticket>();
EntityUserDefinedFieldsResult entityUserDefinedFields = await service.GetEntityUserDefinedFieldsAsync<Ticket>();

// Child entity
EntityInformationResult entityInformation = await service.GetEntityInformationAsync<TicketNote>(ticket.Id);
EntityFieldsResult entityFields = await service.GetEntityFieldsAsync<TicketNote>(ticket.Id);
EntityUserDefinedFieldsResult entityUserDefinedFields = await service.GetEntityUserDefinedFieldsAsync<TicketNote>(ticket.Id);

Integration Testing

The dependency injection container may not always be available. This is especially the case when writing integration tests without the proper boilerplate for your application's testing framework already set up.

To make this process easier, we have a helper method you can use to create an instance of the IAutotaskNet interface:

using var service = AutotaskNetTestHelper.CreateAutotaskNet(new AutotaskCredentials
{
    ApiIntegrationCode = "", 
    UserName = "",
    Secret = ""
});

This method is recommended to only be used in testing. All other uses of IAutotaskNet should rely on the dependency injection container.

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
1.0.10-alpha 39 9/16/2025