THE SAMPLE CODE ON THIS REPOSITORY IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
THE USAGE OF THIS SAMPLE IS AT YOUR OWN RISK AND THERE IS NO SUPPORT RELATED TO IT.
This repository contains the core PowerShell modules that enable communication between COOLORANGE powerJobs/powerEvents and Autodesk Platform Services (APS) endpoints. These modules provide the foundational API connectivity for integrating Autodesk Vault with cloud services including Autodesk Construction Cloud (ACC), BIM 360, and Fusion.
The powerAPS modules serve as the communication layer that abstracts APS API complexity and provides PowerShell-friendly cmdlets for authentication, data management, and cloud service interactions.
Note: powerJobs Processor version 26.0.4 or greater and powerEvents version 26.0.7 or greater are required.
These modules are designed to work with:
- powerJobs Processor (Vault Job Processor side automation)
- powerEvents (powerJobs Client) (Vault Client side extensions)
- Autodesk Vault Professional 2023 or later
The powerAPS-Modules serve as the foundation that all powerAPS-* repos depend on for APS connectivity.
Important: Files downloaded from GitHub may be blocked by Windows. You must unblock all files before installation:
- Right-click each downloaded file → Properties
- Check "Unblock" at the bottom → Apply → OK
- Or use PowerShell:
Get-ChildItem -Recurse | Unblock-File
- Download or clone this repository
- Unblock all downloaded files (see important note above)
- Copy all files from the
powerAPSdirectory to:
C:\ProgramData\coolOrange\powerAPS\ - Restart any running powerJobs Processor, Vault Job Processor or Vault Explorer instances
The modules in this repository work in conjunction with coolOrange's powerAPS module, which provides the core authentication and connection infrastructure for Autodesk Platform Services integration. This official module is included with powerJobs Processor v26.0.4+ and powerEvents v26.0.7+.
The main powerAPS module provides essential cmdlets and objects that serve as the foundation for all APS communication:
The primary authentication cmdlet that establishes OAuth 2.0 connections to Autodesk Platform Services:
# Basic authentication using signed-in Autodesk ID
Connect-APS
# Custom app authentication
Connect-APS -ClientId "your-client-id" -ClientSecret "your-secret" -CallbackUrl "http://localhost:8080/"
# Job processor impersonation
Connect-APS -User $job.SubmittedByAutodeskIdAfter successful authentication, the $global:APSConnection object provides:
- Authorization headers for API calls
- Hub information and access
- User context and impersonation details
- Token management and automatic refresh
For powerEvents and Vault Explorer extensions:
# Import powerAPS modules from this repository
Import-Module C:\ProgramData\coolOrange\powerAPS\powerAPS.Modules.psd1 -Force
# Establish connection (may open browser for consent)
$connected = Connect-APS -ClientId "your-app-client-id" -ClientSecret "your-app-secret" -CallbackUrl "http://localhost:8080/callback"if ($connected) {
# Use modules from this repository for specific operations
$hub = Get-ApsAccHub "My Company"
$projects = Get-ApsProject -hub $hub
}For powerJobs Processor workflows:
# Import powerAPS modules from this repository
Import-Module C:\ProgramData\coolOrange\powerAPS\powerAPS.Modules.psd1 -Force
# Connect using job submitter's credentials (no browser interaction)
Connect-APS -User $job.SubmittedByAutodeskId -ClientId "your-app-client-id" -ClientSecret "your-app-secret" -ErrorAction Stop
# Perform operations using modules from this repository
$projectProperties = GetVaultAccProjectProperties $file._FolderPath
$hub = Get-ApsAccHub $projectProperties["Hub"]The powerAPS module handles token lifecycle automatically:
- 15-day minimum validity for authenticated sessions
- Automatic background refresh on API calls
- Extended validity as long as sessions are used regularly
- Secure token storage integrated with Vault database
The powerAPS module's Connect-APS cmdlet grants comprehensive access scopes:
data:read data:write data:create data:search viewables:read
bucket:create bucket:read bucket:update bucket:delete
user-profile:read user:read user:write account:read account:write
code:all openid
This enables the modules in this repository to perform:
- Full data management operations (CRUD)
- File upload/download and storage management
- User and account information retrieval
- Project and hub administration
- Search and discovery across all accessible content
# Client-side: Submit job with user context
Add-VaultJob -Name "powerAPS.ACC.Publish.PDF" -Parameters @{
"FileVersionId" = $file.Id
"EntityId" = $file.Id
"EntityClassId" = $file._EntityTypeID
"SubmittedByAutodeskId" = $APSConnection.User # Pass user context
}
# Server-side: Job processor uses submitted user context
Connect-APS -User $job.SubmittedByAutodeskId -ClientId "your-app-client-id" -ClientSecret "your-app-secret" -ErrorAction Stop
# Job now runs with same permissions as submitting userFor additional information:
- COOLORANGE Documentation: https://doc.coolorange.com
- powerAPS Reference: https://doc.coolorange.com/projects/poweraps/en/stable/
- APS Developer Portal: https://aps.autodesk.com/