# phyco1991/autotaskapi architecture

> Architecture diagram of the GitHub repository phyco1991/autotaskapi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/phyco1991/autotaskapi
- Repository: https://github.com/phyco1991/autotaskapi

## Overview

AutotaskAPI is a PowerShell wrapper for the Autotask REST API. Its principal workflow is to configure authentication and a zone-specific base URI, then query resources or create, update, and delete them. Queries support IDs and filters, automatic pagination, and optional local-time conversion, URL generation, and picklist-label resolution. Separate metadata commands expose entity information and picklist values; body construction supports creating request objects. The README documents these capabilities, but no source excerpts were provided, so internal helper call relationships are not inferred.

Main entry points: [`Public/Get-AutotaskAPIResource.ps1`](https://github.com/phyco1991/autotaskapi/blob/master/Public/Get-AutotaskAPIResource.ps1) (Get resource), [`Public/New-AutotaskAPIResource.ps1`](https://github.com/phyco1991/autotaskapi/blob/master/Public/New-AutotaskAPIResource.ps1) (Create resource), [`Public/Set-AutotaskAPIResource.ps1`](https://github.com/phyco1991/autotaskapi/blob/master/Public/Set-AutotaskAPIResource.ps1) (Update resource), [`Public/Remove-AutotaskAPIResource.ps1`](https://github.com/phyco1991/autotaskapi/blob/master/Public/Remove-AutotaskAPIResource.ps1) (Delete resource)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Connection setup"]
  node_auth["Configure authentication"]
  node_baseuri["Set base URI"]
end

subgraph group_queries["Resource queries"]
  node_getresource["Get resource"]
  node_searchsql["Build simple query"]
  node_entityurl["Build entity URL"]
  node_resolve_labels["Resolve picklist labels"]
end

subgraph group_writes["Resource changes"]
  node_newresource["Create resource"]
  node_setresource["Update resource"]
  node_removeresource["Delete resource"]
  node_body["Build request body"]
end

subgraph group_metadata["Metadata and helpers"]
  node_entityinfo["Get entity information"]
  node_picklistvalues["Get picklist values"]
  node_recurring["Recurring service units"]
  node_resourcelist["List API resources"]
  node_picklistmeta["Read picklist metadata"]
  node_udfnames["Read UDF names"]
  node_dynamicparams["Build dynamic parameters"]
end

node_user(("PowerShell user"))
node_autotask["Autotask REST API"]

node_user -->|"configures"| node_auth
node_user -->|"sets zone"| node_baseuri
node_user -->|"queries"| node_getresource
node_getresource -->|"retrieves records"| node_autotask
node_user -->|"builds body"| node_body
node_user -->|"creates"| node_newresource
node_newresource -->|"sends create"| node_autotask
node_user -->|"updates"| node_setresource
node_setresource -->|"updates records"| node_autotask
node_user -->|"deletes"| node_removeresource
node_removeresource -->|"deletes records"| node_autotask
node_user -->|"inspects entities"| node_entityinfo
node_user -->|"requests values"| node_picklistvalues
node_user -->|"requests units"| node_recurring

click node_auth "https://github.com/phyco1991/autotaskapi/blob/master/Public/Add-AutotaskAPIAuth.ps1"
click node_baseuri "https://github.com/phyco1991/autotaskapi/blob/master/Public/Add-AutotaskBaseURI.ps1"
click node_getresource "https://github.com/phyco1991/autotaskapi/blob/master/Public/Get-AutotaskAPIResource.ps1"
click node_searchsql "https://github.com/phyco1991/autotaskapi/blob/master/Private/ConvertTo-SearchQueryFromSQL.ps1"
click node_entityurl "https://github.com/phyco1991/autotaskapi/blob/master/Private/Get-AutotaskEntityURL.ps1"
click node_resolve_labels "https://github.com/phyco1991/autotaskapi/blob/master/Private/Resolve-AutotaskReferenceLabels.ps1"
click node_newresource "https://github.com/phyco1991/autotaskapi/blob/master/Public/New-AutotaskAPIResource.ps1"
click node_setresource "https://github.com/phyco1991/autotaskapi/blob/master/Public/Set-AutotaskAPIResource.ps1"
click node_removeresource "https://github.com/phyco1991/autotaskapi/blob/master/Public/Remove-AutotaskAPIResource.ps1"
click node_body "https://github.com/phyco1991/autotaskapi/blob/master/Public/New-AutotaskBody.ps1"
click node_entityinfo "https://github.com/phyco1991/autotaskapi/blob/master/Public/Get-AutotaskAPIEntityInfo.ps1"
click node_picklistvalues "https://github.com/phyco1991/autotaskapi/blob/master/Public/Get-AutotaskAPIPicklistValues.ps1"
click node_recurring "https://github.com/phyco1991/autotaskapi/blob/master/Public/Get-AutotaskAPIRecurringServiceUnits.ps1"
click node_resourcelist "https://github.com/phyco1991/autotaskapi/blob/master/Private/Get-AutotaskAPIResourceList.ps1"
click node_picklistmeta "https://github.com/phyco1991/autotaskapi/blob/master/Private/Get-AutotaskPicklistMeta.ps1"
click node_udfnames "https://github.com/phyco1991/autotaskapi/blob/master/Private/Get-AutotaskUdfNames.ps1"
click node_dynamicparams "https://github.com/phyco1991/autotaskapi/blob/master/Private/New-ResourceDynamicParameter.ps1"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_auth,node_baseuri,node_user toneBlue
class node_getresource,node_searchsql,node_entityurl,node_resolve_labels toneAmber
class node_newresource,node_setresource,node_removeresource,node_body toneMint
class node_entityinfo,node_picklistvalues,node_recurring,node_resourcelist,node_picklistmeta,node_udfnames,node_dynamicparams,node_autotask toneRose
```

## Components

### Connection setup

- [Configure authentication](https://github.com/phyco1991/autotaskapi/blob/master/Public/Add-AutotaskAPIAuth.ps1): `Public/Add-AutotaskAPIAuth.ps1`
- [Set base URI](https://github.com/phyco1991/autotaskapi/blob/master/Public/Add-AutotaskBaseURI.ps1): `Public/Add-AutotaskBaseURI.ps1`

### Resource queries

- [Get resource](https://github.com/phyco1991/autotaskapi/blob/master/Public/Get-AutotaskAPIResource.ps1): `Public/Get-AutotaskAPIResource.ps1`
- [Build simple query](https://github.com/phyco1991/autotaskapi/blob/master/Private/ConvertTo-SearchQueryFromSQL.ps1): `Private/ConvertTo-SearchQueryFromSQL.ps1`
- [Build entity URL](https://github.com/phyco1991/autotaskapi/blob/master/Private/Get-AutotaskEntityURL.ps1): `Private/Get-AutotaskEntityURL.ps1`
- [Resolve picklist labels](https://github.com/phyco1991/autotaskapi/blob/master/Private/Resolve-AutotaskReferenceLabels.ps1): `Private/Resolve-AutotaskReferenceLabels.ps1`

### Resource changes

- [Create resource](https://github.com/phyco1991/autotaskapi/blob/master/Public/New-AutotaskAPIResource.ps1): `Public/New-AutotaskAPIResource.ps1`
- [Update resource](https://github.com/phyco1991/autotaskapi/blob/master/Public/Set-AutotaskAPIResource.ps1): `Public/Set-AutotaskAPIResource.ps1`
- [Delete resource](https://github.com/phyco1991/autotaskapi/blob/master/Public/Remove-AutotaskAPIResource.ps1): `Public/Remove-AutotaskAPIResource.ps1`
- [Build request body](https://github.com/phyco1991/autotaskapi/blob/master/Public/New-AutotaskBody.ps1): `Public/New-AutotaskBody.ps1`

### Metadata and helpers

- [Get entity information](https://github.com/phyco1991/autotaskapi/blob/master/Public/Get-AutotaskAPIEntityInfo.ps1): `Public/Get-AutotaskAPIEntityInfo.ps1`
- [Get picklist values](https://github.com/phyco1991/autotaskapi/blob/master/Public/Get-AutotaskAPIPicklistValues.ps1): `Public/Get-AutotaskAPIPicklistValues.ps1`
- [Recurring service units](https://github.com/phyco1991/autotaskapi/blob/master/Public/Get-AutotaskAPIRecurringServiceUnits.ps1): `Public/Get-AutotaskAPIRecurringServiceUnits.ps1`
- [List API resources](https://github.com/phyco1991/autotaskapi/blob/master/Private/Get-AutotaskAPIResourceList.ps1): `Private/Get-AutotaskAPIResourceList.ps1`
- [Read picklist metadata](https://github.com/phyco1991/autotaskapi/blob/master/Private/Get-AutotaskPicklistMeta.ps1): `Private/Get-AutotaskPicklistMeta.ps1`
- [Read UDF names](https://github.com/phyco1991/autotaskapi/blob/master/Private/Get-AutotaskUdfNames.ps1): `Private/Get-AutotaskUdfNames.ps1`
- [Build dynamic parameters](https://github.com/phyco1991/autotaskapi/blob/master/Private/New-ResourceDynamicParameter.ps1): `Private/New-ResourceDynamicParameter.ps1`

### Other components

- **PowerShell user**
- **Autotask REST API**

## Connections

- PowerShell user → Configure authentication: configures (evidence: `README.md`)
- PowerShell user → Set base URI: sets zone (evidence: `README.md`)
- PowerShell user → Get resource: queries (evidence: `README.md`)
- Get resource → Autotask REST API: retrieves records (evidence: `README.md`)
- PowerShell user → Build request body: builds body (evidence: `README.md`)
- PowerShell user → Create resource: creates (evidence: `README.md`)
- Create resource → Autotask REST API: sends create (evidence: `README.md`)
- PowerShell user → Update resource: updates (evidence: `README.md`)
- Update resource → Autotask REST API: updates records (evidence: `README.md`)
- PowerShell user → Delete resource: deletes (evidence: `README.md`)
- Delete resource → Autotask REST API: deletes records (evidence: `README.md`)
- PowerShell user → Get entity information: inspects entities (evidence: `README.md`)
- PowerShell user → Get picklist values: requests values (evidence: `README.md`)
- PowerShell user → Recurring service units: requests units (evidence: `README.md`)
