AutotaskNet 1.0.10-alpha
dotnet add package AutotaskNet --version 1.0.10-alpha
NuGet\Install-Package AutotaskNet -Version 1.0.10-alpha
<PackageReference Include="AutotaskNet" Version="1.0.10-alpha" />
<PackageVersion Include="AutotaskNet" Version="1.0.10-alpha" />
<PackageReference Include="AutotaskNet" />
paket add AutotaskNet --version 1.0.10-alpha
#r "nuget: AutotaskNet, 1.0.10-alpha"
#:package AutotaskNet@1.0.10-alpha
#addin nuget:?package=AutotaskNet&version=1.0.10-alpha&prerelease
#tool nuget:?package=AutotaskNet&version=1.0.10-alpha&prerelease
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 | Versions 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. |
-
.NETStandard 2.1
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Options (>= 8.0.2)
- System.Text.Json (>= 8.0.6)
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 |