API White Paper

Leveraging the power of automation through API

IT Glue API: Create, retrieve, update, and delete data in your IT Glue account. Use the IT Glue API to access all of your IT Glue data and pull information into your own applications or integrate with third-party tools that we don’t currently integrate with yet.

Introduction

Efficiency, consistency, open communication, connectivity, process automation, and flexibility. These core values are ingrained in your service model - why not do the same with your data?

The IT Glue API can be used to give you all of the above core values by allowing you to sync your data with nearly any platform and get information from external sources into your account. Taking advantage of an API allows you to automate, drive scalability, and grow your company in the long run.

API Basics

Starting with the basics, what exactly is an API? Application program interface (API) is application code that serves as a communication bridge to other apps, databases, services, or operating systems. It allows separate applications to exchange messages or data in a standardized format to automate processes, create consistency, streamline data sharing, and save developers time.

[optin-monster slug="rspxzypcbhn0djbrsncg"]

Nowadays, APIs are the backbone of modern connectivity, ensuring you are getting the ultimate information transfer experience. In simpler terms, think of APIs as the intermediary that allows two apps to talk to each other. What does that look like to the end user? When you use an app on your browser, the app connects to the Internet and sends data to a server. The server receives and interprets the data quickly, performs the needed actions, and sends the data back to your app.

IT Glue’s API is a RESTful API that conforms to the JSON API spec. Our API can be used with any programming language that supports the creation of HTTP requests and can parse JSON. Let’s break down what that means.

HTTP Request/Response

HTTP requests consist of a request line (to get a resource), headers, and an optional message body. HTTP request methods are as follows:

  • GET - Retrieves data from a specified resource
  • POST - Creating or updating a resource
  • DELETE - Deletes a specified resource
  • PATCH - Applies modifications to a resource

RESTful API

A RESTful API is based on representational state transfer (REST) technology. REST refers to an architectural style of API communication. This style of API takes advantage of HTTP by using GET, POST, PATCH and DELETE.

RESTful APIs work by breaking down transactions into smaller modules, representing different parts of the transaction. This provides developers with flexibility when building their APIs. Since data is not tied to methods and resources, REST is able to handle multiple types of calls and return different data formats. It is also not constrained to just one format, but instead can return XML, JSON, YAML, or any other format depending on what the client requests.

JSON

JSON stands for JavaScript Object Notation and is a lightweight format for storing and transporting data. It is often used when data is sent from a server to a webpage. Since JSON format is text only and doesn’t have a user interface, it can be easily sent to and from a server and is both human and machine readable.

An example message formatted in JSON:

        {
            “id”: “123456”,
            “type”:“organizations”,
            “attributes”: {
                “psa-integration”: null,
                “name”: “Happy Frog Inc.”,
                “alert”: null,
                “description”: null,
                “organization-type-id”: null,
                “organization-type-name”: null,
                “organization-status-id”: null,
                “organization-status-name”: null,
                “my-glue-account-id”: null,
                “primary”: true,
                “quick-notes”: null,
                “short-name”: “S”,
                “created-at”: “2017-03-09T04:12:56.000Z”,
                “updated-at”: “2018-09-23T11:09:38.000Z”,
                “my-glue-account-status”: null,
                “logo”: “Adult-Learning-App.png”
            },
            “relationships”: {
                “adapters-resources”: {
                    “data”: []
                }
            } 
        }
    

An example of a simple end-to-end:

The IT Glue API

The IT Glue API is a powerful tool for automation and getting data from external sources into your IT Glue account. Take a look at the following use cases to see how our API allows you to access your data so you can pull it into your own applications or integrate with third-party tools that we don’t currently integrate with yet.

Use Cases

Let’s take a closer look at how some of our partners are using the IT Glue API in their businesses.

Use Case 1: Creating documentation

As a CTO, Bob wants to ensure that his technical team always has the latest information on their client’s AD setup. Right now, this needs to be updated in IT Glue manually whenever there is a change to their AD setup.

To reduce the risk of inaccurate information, Bob would like to automate the process for updating this information in IT Glue. By using PowerShell that is included with his client’s Active Directory server, he can easily script this and keep it up-to-date.

  1. Install the PowerShell wrapper and configure with your API key for your specific account https://github.com/itglue/powershellwrapper.
    1. This module can be installed directly from the PowerShell Gallery with the following command:
      Install-Module -Name ITGlueAPI

      The first time you run this module, you will need to configure the base URI and API key that are used to communicate with IT Glue. Doing so is as follows:

    1. Run Add-ITGlueBaseURI. By default, IT Glue’s api.itglue.com URI is entered. If you have your own API gateway or proxy, you may put in your own custom URI by specifying the -base_uri parameter, as follows:
                          Add-ITGlueBaseURI -base_uri
                          http://myapi.gateway.example.com
                      
    2. b. Run Add-ITGlueAPIKey. It will prompt you to enter your API key. Please refer to IT Glue’s documentation for generating an API key.
    1. Use the following set of commands to update IT Glue with the AD information for each client.

    2. To get started, an Initialize-ActiveDirectoryFlexAsset.ps1 script has been created. Running this script will automatically create a new Flexible Asset Template in your IT Glue account and generate a config.psd1 configuration file.
    3. Once your configuration file is appropriately set up, run the script with .\ActiveDirectory.ps1 -api api_config-ActiveDirectory.psd1 and the script will take care of the rest, including auto-updating the config document with the flexible asset id that is created.
  2. Keep this information up to date by scheduling a task in your RMM to update monthly.
  3. Refer to ConnectWise Automate’s documentation on scheduling tasks here.

Use Case 2: Creating documentation

As the Service Desk Manager, Cheryl wants to ensure that her team is utilizing their IT Glue documentation. They already have a custom BrightGauge dashboard that she wants to populate with IT Glue’s engagement data. She will use IT Glue’s API to get the raw engagement scores of her users to display on their dashboard.

  1. In BrightGauge, add the IT Glue data source.
  2. Create an API key in your IT Glue account.
  3. Input the newly created API key in BrightGauge.
  4. Test and save your connection.

Get Started with API Documentation

To get started with the IT Glue API, access our documentation at https://api.itglue.com/developer. This repository gives you access to all of our API endpoints that allow you to create, retrieve, update, and delete data in your IT Glue account. Our developer docs are organized by resource type and each have their own set of endpoints. The intended audience for these docs are developers with HTTP and JSON API experience. We also have some Knowledge Base articles that are helpful if you’re using our API for the first time:

Authenticating to the IT Glue API

All API endpoints will need to be authenticated using a private API key - a unique identifier submitted alongside an API request in order to identify the origin of the request. API keys are used to track and control the API request process. All users with an Administrator role in IT Glue are able to generate API keys.

OK, I’ve Got It! What’s next?

Now that you have the background information needed to get started working with our API, it’s time to plan your first project. The easiest way to conceptualize it is to think about what information you want to put into IT Glue that isn’t already there. Then, determine the most reliable source for that information. Basically, anything that must be entered into IT Glue manually is a prime candidate for building an API integration.

Request a Demo
November 05, 2024

IT Glue Product Updates from Kaseya DattoCon 2024

Discover IT Glue’s latest updates from Kaseya DattoCon 2024, featuring AI-powered automation, enhanced security and mobile improvements. Get a sneak peek of what’s next

Read Article
October 25, 2024

Transforming IT Documentation With Cooper Copilot

Discover how Cooper Copilot revolutionizes IT documentation with AI-driven automation, precision and efficiency. Explore real-world benefits and use cases.

Read Article
October 17, 2024

IT Glue Dominates in the 2024 G2 Fall Awards: A Clear Leader in IT Documentation

IT Glue has once again proven its excellence in the IT documentation space, earning multiple accolades in the 2024 G2 Fall Awards. G2’s reports, based on real user reviews and satisfaction scores, highlight the top-performing software products across various categories. This year, IT Glue received numerous awards for its standout features, user satisfaction and implementation […]

Read Article
October 16, 2024

Webinar Recap: Building a Secure Foundation for Cyber Essentials Through Asset and Password Management

Discover how effective IT asset and password management can help your organization achieve Cyber Essentials certification and strengthen overall security.

Read Article