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 additional modules from this repository
foreach ($module in Get-ChildItem "C:\ProgramData\coolOrange\powerAPS" -Name -Filter "*.psm1") {
Import-Module "C:\ProgramData\coolOrange\powerAPS\$module" -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 additional modules from this repository
foreach ($module in Get-ChildItem "C:\ProgramData\coolOrange\powerAPS" -Name -Filter "*.psm1") {
Import-Module "C:\ProgramData\coolOrange\powerAPS\$module" -Force
}
# Connect using job submitter's credentials (no browser interaction)
$result = Connect-APS -User $job.SubmittedByAutodeskId
if (-not $result) {
throw $result.Error
}
# 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 -ErrorAction Stop
# Job now runs with same permissions as submitting userThe repository contains specialized PowerShell modules organized by APS service area:
Core modules for APS Data Management API:
- Get-ApsHub: Retrieve available hubs (ACC, BIM 360, Fusion)
- Get-ApsAccHub: Specifically get ACC hubs
- Hub enumeration and filtering capabilities
- Get-ApsProject: Access projects within hubs
- Get-ApsProjectFilesFolder: Locate project file storage areas
- Project metadata and configuration retrieval
- Get-ApsFolder: Navigate folder hierarchies
- New-ApsFolder: Create new folders in projects
- Folder structure management and organization
- Get-ApsItem: Retrieve individual files and metadata
- New-ApsItem: Upload new files to projects
- Set-ApsItem: Update existing file properties
- Get-ApsItemVersions: Access file version history
- Comprehensive file lifecycle management
- Get-ApsBucket: Access storage buckets
- New-ApsBucket: Create data storage containers
- Low-level storage operations and bucket management
Specialized modules for ACC-specific functionality:
- Project administration and configuration
- User and permission management
- ACC-specific project settings and policies
- Asset and equipment data management
- ACC model coordination features
- Asset tracking and lifecycle management
- ACC document management integration
- Drawing and specification workflows
- Document review and approval processes
- Issue tracking and management
- Quality control workflows
- Problem reporting and resolution
- Design review coordination
- Markup and comment management
- Collaborative review processes
- File dependency tracking
- Cross-project relationships
- Reference and link management
- User authentication and profile management
- Account information and preferences
- Session and token management
Misc functions to wrap common Vault API calls; used by powerEvents and powerJobs
For 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/