The Celerium.ITGlue PowerShell wrapper offers the ability to read, create, and update much of the data within IT Glue's documentation platform. That includes organizations, contacts, configuration items, and more. This module serves to abstract away the details of interacting with IT Glue's API endpoints in such a way that is consistent with PowerShell nomenclature. This gives system administrators and PowerShell developers a convenient and familiar way of using IT Glue's API to create documentation scripts, automation, and integrations.
- 📖 Celerium.ITGlue project documentation can be found on Github Pages
- 📖 ITGlue's REST API documentation can be found here
ITGlue features a REST API that makes use of common HTTP request methods. In order to maintain PowerShell best practices, only approved verbs are used.
- DELETE ->
Remove-
- GET ->
Get-
- PATCH ->
Set-
- POST ->
New
-
Additionally, PowerShell's verb-noun
nomenclature is respected. Each noun is prefixed with ITGlue
in an attempt to prevent naming problems.
For example, one might access the /users/ API endpoint by running the following PowerShell command with the appropriate parameters:
Get-ITGlueUser
or
Get-ITGlueUser -ID 8675309
This module can be installed directly from the PowerShell Gallery with the following command:
Install-Module -Name Celerium.ITGlue
- ℹ️ This module supports PowerShell 5.0+ and should work in PowerShell Core.
- ℹ️ If you are running an older version of PowerShell, or if PowerShellGet is unavailable, you can manually download the main branch and place the latest version of Celerium.ITGlue from the build folder into the (default)
C:\Program Files\WindowsPowerShell\Modules
folder.
Celerium.ITGlue project documentation can be found on Github Pages
- A full list of functions can be retrieved by running
Get-Command -Module Celerium.ITGlue
. - Help info and a list of parameters can be found by running
Get-Help <command name>
, such as:
Get-Help Get-ITGlueUser
Get-Help Get-ITGlueUser -Full
After installing this module, you will need to configure both the base URI & API access token that are used to talk with the ITGlue API.
-
Run
Add-ITGlueBaseURI
- By default, ITGlue's
https://api.itglue.com
URI is used. - If you have your own API gateway or proxy, you may put in your own custom URI by specifying the
-BaseUri
parameter:Add-ITGlueBaseURI -BaseUri http://myapi.gateway.celerium.org
- By default, ITGlue's
-
Run
Add-ITGlueAPIKey -ApiKey 8675309
- It will prompt you to enter your API access token if you do not specify it.
- ITGlue API access token are generated via the ITGlue portal at Admin > Settings > API Keys
-
[optional] Run
Export-ITGlueModuleSetting
- This will create a config file at
%UserProfile%\Celerium.ITGlue
that holds the base uri & API access token information. - Next time you run
Import-Module -Name Celerium.ITGlue
, this configuration file will automatically be loaded. ⚠️ Exporting module settings encrypts your API access token in a format that can only be unencrypted by the user principal that encrypted the secret. It makes use of .NET DPAPI, which for Windows uses reversible encrypted tied to your user principal. This means that you cannot copy your configuration file to another computer or user account and expect it to work.⚠️ However in Linux\Unix operating systems the secret keys are more obfuscated than encrypted so it is recommend to use a more secure & cross-platform storage method.
- This will create a config file at
Calling an API resource is as simple as running Get-ITGlue<resourceName>
- The following is a table of supported functions and their corresponding API resources:
- Table entries with [
-
] indicate that the functionality is NOT supported by the ITGlue API at this time. - Example scripts can be found in the examples folder of this repository.
API Resource | Create | Read | Update | Delete |
---|---|---|---|---|
Attachments | New-ITGlueAttachment |
- | Set-ITGlueAttachment |
Remove-ITGlueAttachment |
Configuration Interfaces | New-ITGlueConfigurationInterface |
Get-ITGlueConfigurationInterface |
Set-ITGlueConfigurationInterface |
- |
Configuration Statuses | New-ITGlueConfigurationStatus |
Get-ITGlueConfigurationStatus |
Set-ITGlueConfigurationStatus |
- |
Configuration Types | New-ITGlueConfigurationType |
Get-ITGlueConfigurationType |
Set-ITGlueConfigurationType |
- |
Configurations | New-ITGlueConfiguration |
Get-ITGlueConfiguration |
Set-ITGlueConfiguration |
Remove-ITGlueConfiguration |
Contact Types | New-ITGlueContactType |
Get-ITGlueContactType |
Set-ITGlueContactType |
- |
Contacts | New-ITGlueContact |
Get-ITGlueContact |
Set-ITGlueContact |
Remove-ITGlueContact |
Countries | - | Get-ITGlueCountries |
- | - |
Documents | - | - | Set-ITGlueDocument |
- |
Domains | - | Get-ITGlueDomains |
- | - |
Expirations | - | Get-ITGlueExpiration |
- | - |
Exports | New-ITGlueExport |
Get-ITGlueExport |
- | Remove-ITGlueExport |
Flexible Asset Fields | New-ITGlueFlexibleAssetField |
Get-ITGlueFlexibleAssetField |
Set-ITGlueFlexibleAssetField |
Remove-ITGlueFlexibleAssetField |
Flexible Asset Types | New-ITGlueFlexibleAssetType |
Get-ITGlueFlexibleAssetType |
Set-ITGlueFlexibleAssetType |
- |
Flexible Assets | New-ITGlueFlexibleAsset |
Get-ITGlueFlexibleAsset |
Set-ITGlueFlexibleAsset |
Remove-ITGlueFlexibleAsset |
Groups | - | Get-ITGlueGroup |
- | - |
Locations | New-ITGlueLocation |
Get-ITGlueLocation |
Set-ITGlueLocation |
Remove-ITGlueLocation |
Logs | - | Get-ITGlueLog |
- | - |
Manufacturers | New-ITGlueManufacturer |
Get-ITGlueManufacturer |
Set-ITGlueManufacturer |
- |
Models | New-ITGlueModel |
Get-ITGlueModel |
Set-ITGlueModel |
- |
Operating Systems | - | Get-ITGlueOperatingSystem |
- | - |
Organization Statuses | New-ITGlueOrganizationStatus |
Get-ITGlueOrganizationStatus |
Set-ITGlueOrganizationStatus |
- |
Organization Types | New-ITGlueOrganizationType |
Get-ITGlueOrganizationType |
Set-ITGlueOrganizationType |
- |
Organizations | New-ITGlueOrganization |
Get-ITGlueOrganization |
Set-ITGlueOrganization |
Remove-ITGlueOrganization |
Password Categories | New-ITGluePasswordCategory |
Get-ITGluePasswordCategory |
Set-ITGluePasswordCategory |
- |
Passwords | New-ITGluePassword |
Get-ITGluePassword |
Set-ITGluePassword |
Remove-ITGluePassword |
Platforms | - | Get-ITGluePlatform |
- | - |
Regions | - | Get-ITGlueRegion |
- | - |
Related Items | New-ITGlueRelatedItem |
- | Set-ITGlueRelatedItem |
Remove-ITGlueRelatedItem |
User Metrics | - | Get-ITGlueUserMetric |
- | - |
Users | - | Get-ITGlueUser |
Set-ITGlueUser |
- |
Each Get-ITGlue*
function will respond with the raw data that ITGlue's API provides.
⚠️ Returned data is mostly structured the same but can vary between commands.data
- The actual information requested (this is what most people care about)links
- Links to specific aspects of the datameta
- Information about the number of pages of results are available and other metadata.
Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
See the CONTRIBUTING guide for more information about contributing.
Distributed under the Apache-2.0 license. See LICENSE for more information.