Skip to content

Bosuu/AutotaskNET

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Autotask PSA

AutotaskNET GitHub License GitHub Release Travis Build Status

Autotask Web Services API .NET Interface

GitHub Last Commit GitHub Issues GitHub Pull Requests

.NET Framework Autotask Web Services

Documentation

Autotask Web Services API Version 1.5 User Guide

Bugs/Features/Contributing

Please open an issue or pull request in GitHub.

IRC Freenode #AutotaskNET

Examples

Connect
using AutotaskNET;
using AutotaskNET.Entities;

class Program
{
    private const string @USERNAME = "api.user@domain.com";
    private const string @PASSWORD = "P@ssw0rd";
    static void Main(string[] args)
    {
        try
        {
            ATWSInterface atAPI = new ATWSInterface(@USERNAME, @PASSWORD);
        }
        catch (Exception e)
        {
            Console.WriteLine($"Error: {e.Message}");
        }
    }
}
Get Account Types
List<PicklistValue> account_types = atAPI.GetPicklistValues(typeof(Account), "AccountType");
Get Customer Accounts
int account_types_customer = account_types.Find(type => type.Label == "Customer").Value;

List<Account> customer_accounts = atAPI.Query(typeof(Account), new List<QueryFilter> {
    new QueryFilter() { FieldName = "AccountType", Operation = "Equals", Value = account_types_customer }
}).OfType<Account>().ToList();
Get Tickets Updated Today
int activity_since = DateTime.Today; //search from the start of today

List<Ticket> tickets_updated_today = atAPI.Query(typeof(Ticket), new List<QueryFilter> {
    new QueryFilter() { FieldName = "LastActivityDate", Operation = "greaterthan", Value = activity_since }
}).OfType<Ticket>().ToList();
Get Tickets Updated Today For Specific Customer
int activity_since = DateTime.Today; //search from the start of today

List<Ticket> tickets_updated_today = atAPI.Query(typeof(Ticket), new List<QueryFilter> {
    new QueryFilter() { FieldName = "LastActivityDate", Operation = "greaterthan", Value = activity_since }
    new QueryFilter() { FieldName = "Account", Operation = "equals", Value = customer_accounts.Find(account => account.AccountName == "Customer Name").id }
}).OfType<Ticket>().ToList();

About

Autotask Web Services API .NET Interface

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%