{
  "service": "autotask",
  "displayName": "Autotask",
  "categories": [
    "Productivity",
    "Data"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "Username",
      "placeholder": "apiuser@example.com",
      "description": "Autotask API-only user name sent with the Username header. Create an API user and tracking identifier in Autotask security settings as described in the official REST authentication docs: https://www.autotask.net/help/developerhelp/Content/APIs/REST/General_Topics/REST_Security_Auth.htm",
      "extraFields": [
        {
          "key": "secret",
          "label": "Secret",
          "inputType": "password",
          "required": true,
          "secret": true,
          "placeholder": "AUTOTASK_SECRET",
          "description": "Autotask API-only user secret sent with the Secret header. Find it with the API user credentials in Autotask security settings: https://www.autotask.net/help/developerhelp/Content/APIs/REST/General_Topics/REST_Security_Auth.htm"
        },
        {
          "key": "integrationCode",
          "label": "Integration Code",
          "inputType": "password",
          "required": true,
          "secret": true,
          "placeholder": "AUTOTASK_INTEGRATION_CODE",
          "description": "Autotask tracking identifier sent with the APIIntegrationcode header. Generate or assign it on the API-only user's Security tab: https://www.autotask.net/help/developerhelp/Content/APIs/REST/General_Topics/REST_Security_Auth.htm"
        }
      ]
    }
  ],
  "homepageUrl": "https://www.datto.com/products/autotask-psa/",
  "actions": [
    {
      "id": "autotask.get_entity_information",
      "service": "autotask",
      "name": "get_entity_information",
      "description": "Get Autotask entityInformation metadata for Companies, Contacts, or Tickets.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "entity": {
            "type": "string",
            "enum": [
              "Companies",
              "Contacts",
              "Tickets"
            ],
            "description": "Autotask entity to query."
          },
          "section": {
            "type": "string",
            "enum": [
              "summary",
              "fields",
              "userDefinedFields"
            ],
            "description": "Autotask entityInformation section to retrieve."
          }
        },
        "additionalProperties": false,
        "required": [
          "entity"
        ],
        "description": "Input parameters for retrieving Autotask entity metadata."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "information": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Autotask entity metadata returned by the selected endpoint."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Raw entity metadata response returned by Autotask."
          }
        },
        "additionalProperties": false,
        "description": "Autotask entity metadata response."
      }
    },
    {
      "id": "autotask.get_record",
      "service": "autotask",
      "name": "get_record",
      "description": "Get one Autotask Company, Contact, or Ticket by numeric ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "entity": {
            "type": "string",
            "enum": [
              "Companies",
              "Contacts",
              "Tickets"
            ],
            "description": "Autotask entity to query."
          },
          "id": {
            "type": "integer",
            "minimum": 1,
            "description": "Numeric Autotask record ID."
          }
        },
        "additionalProperties": false,
        "description": "Input parameters for retrieving one Autotask record."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "item": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Autotask record returned by ID."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Raw record response returned by Autotask."
          }
        },
        "additionalProperties": false,
        "description": "Autotask single-record response."
      }
    },
    {
      "id": "autotask.get_zone_information",
      "service": "autotask",
      "name": "get_zone_information",
      "description": "Return the Autotask REST API zone URL for the connected API user.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "Input parameters for reading Autotask zone information."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "apiBaseUrl": {
            "type": "string",
            "description": "Normalized Autotask REST API base URL for the API user."
          },
          "zoneName": {
            "anyOf": [
              {
                "type": "string",
                "description": "Autotask zone name returned for the API user."
              },
              {
                "type": "null"
              }
            ]
          },
          "webUrl": {
            "anyOf": [
              {
                "type": "string",
                "description": "Autotask web app URL returned for the API user."
              },
              {
                "type": "null"
              }
            ]
          },
          "ci": {
            "anyOf": [
              {
                "type": "integer",
                "description": "Autotask customer identifier returned for the API user."
              },
              {
                "type": "null"
              }
            ]
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Raw ZoneInformation response returned by Autotask."
          }
        },
        "additionalProperties": true,
        "description": "Autotask zone information."
      }
    },
    {
      "id": "autotask.query_records",
      "service": "autotask",
      "name": "query_records",
      "description": "Query Autotask Companies, Contacts, or Tickets with optional filter, IncludeFields, and MaxRecords parameters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "entity": {
            "type": "string",
            "enum": [
              "Companies",
              "Contacts",
              "Tickets"
            ],
            "description": "Autotask entity to query."
          },
          "filter": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "op": {
                  "type": "string",
                  "description": "Autotask filter operator, such as eq, noteq, gt, exist, in, or or."
                },
                "field": {
                  "type": "string",
                  "description": "Autotask field name used by the filter expression."
                },
                "value": {
                  "description": "Autotask filter value."
                },
                "udf": {
                  "type": "boolean",
                  "description": "Whether the filter targets a user-defined field."
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": true,
                    "description": "A nested Autotask filter expression."
                  },
                  "description": "Nested Autotask filter expressions for grouped AND or OR filters."
                }
              },
              "additionalProperties": true,
              "description": "Autotask filter expression."
            },
            "description": "Autotask filter expressions.",
            "minItems": 1
          },
          "includeFields": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "An Autotask field name."
            },
            "description": "Autotask field names to include in the response.",
            "minItems": 1
          },
          "maxRecords": {
            "type": "integer",
            "minimum": 1,
            "maximum": 500,
            "description": "Maximum records to return. Autotask allows 1 to 500 per page."
          }
        },
        "additionalProperties": false,
        "required": [
          "entity"
        ],
        "description": "Input parameters for querying Autotask records."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "An Autotask record."
            },
            "description": "Autotask records returned by the query."
          },
          "pageDetails": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "description": "Number of records in the current page."
              },
              "requestCount": {
                "type": "integer",
                "description": "Maximum number of records requested."
              },
              "prevPageUrl": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Previous page URL returned by Autotask."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "nextPageUrl": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Next page URL returned by Autotask."
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": true,
            "description": "Autotask query pagination details."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Raw query response returned by Autotask."
          }
        },
        "additionalProperties": false,
        "description": "Autotask query response."
      }
    }
  ]
}
