API support for setting agent pool on data source
Michiel Wicherink
Currently, the GET /datasource/{DataSourceGUID} API endpoint does not return the agentPoolGUID field, even when an agent pool has been configured for that data source in the HelloID web interface. The POST /datasource endpoint does accept agentPoolGUID (allowing the value to be set), but without being able to read the current value back, it is impossible to:
- Display the current agent pool assignment in tooling
- Conditionally update only when a change is needed
- Build fully idempotent post-import scripts
Requested improvement:
Include agentPoolGUID (and optionally agentPoolName) in the response body of:
- GET /datasource/{DataSourceGUID}
- GET /datasource/named/{DataSourceName}
- GET /datasource/all
Expected response addition:
{
"dataSourceGUID": "...",
"name": "...",
"agentPoolGUID": "a1b2c3d4-...",
"agentPoolName": "PRODUCTION"
}
Use case:
We manage HelloID Delegated Forms via automated createform.ps1 deployment scripts, followed by a post-import.ps1 that configures agent pools on all PowerShell data sources (required for on-premises Exchange connectivity). Because the current agent pool assignment is not returned by the API, our tooling cannot show the user the current state before prompting for a change, and cannot skip unnecessary API calls
when the pool is already correct. This forces either blind overwrites on every run or a manual check in the UI — both of which break a clean automated workflow.