PowerShell modules for querying and managing the Xurrent platform. This project provides two separate modules:
- Xurrent.REST — Wraps the Xurrent REST API with full CRUD support.
- Xurrent.GraphQL — Wraps the Xurrent GraphQL API with query, mutation, and cursor-based pagination support.
Both modules support Requests, People, Teams, Organizations, Services, Service Instances, Tasks, Changes, Problems, Sites, and Time Entries.
- PowerShell 7.0 or later
- A valid Xurrent API token (Personal Access Token or OAuth token) and account identifier
# Install the REST module
Install-Module -Name Xurrent.REST
# Install the GraphQL module
Install-Module -Name Xurrent.GraphQL- Clone or download this repository.
- Copy the
Xurrent.REST/and/orXurrent.GraphQL/folders to a directory in your$env:PSModulePath. - Import the module you need:
Import-Module Xurrent.REST
# or
Import-Module Xurrent.GraphQLThe REST module provides full CRUD operations against the Xurrent REST API (https://api.xurrent.com/v1/).
# Connect to the EU region (default)
Connect-Xurrent -ApiToken 'your-api-token' -Account 'your-account'
# Connect to a specific region
Connect-Xurrent -ApiToken 'your-api-token' -Account 'your-account' -Region 'US'
# Connect using a custom base URI (on-premises / sandbox)
Connect-Xurrent -ApiToken 'your-api-token' -Account 'your-account' -BaseUri 'https://sandbox.example.com/v1'
# Disconnect
Disconnect-XurrentSupported regions: EU (default), US, AU, UK, CH, QA.
Security tip: Avoid storing your API token in plain text. Use
Read-Host -AsSecureStringor a secrets manager.
| Cmdlet | Description |
|---|---|
Connect-Xurrent |
Stores API credentials for all subsequent calls |
Disconnect-Xurrent |
Clears the stored connection context |
Invoke-XurrentQuery |
Execute any REST API call with full control |
Get-XurrentRequest |
List or retrieve requests |
New-XurrentRequest |
Create a new request |
Set-XurrentRequest |
Update an existing request |
Remove-XurrentRequest |
Delete a request |
Add-XurrentNote |
Add a note to a request |
Get-XurrentPerson |
List or retrieve people |
New-XurrentPerson |
Create a person |
Set-XurrentPerson |
Update a person |
Remove-XurrentPerson |
Delete a person |
Get-XurrentTeam |
List or retrieve teams |
New-XurrentTeam |
Create a team |
Set-XurrentTeam |
Update a team |
Get-XurrentOrganization |
List or retrieve organizations |
New-XurrentOrganization |
Create an organization |
Set-XurrentOrganization |
Update an organization |
Get-XurrentService |
List or retrieve services |
New-XurrentService |
Create a service |
Set-XurrentService |
Update a service |
Get-XurrentServiceInstance |
List or retrieve service instances |
New-XurrentServiceInstance |
Create a service instance |
Set-XurrentServiceInstance |
Update a service instance |
Get-XurrentTask |
List or retrieve tasks |
New-XurrentTask |
Create a task |
Set-XurrentTask |
Update a task |
Get-XurrentChange |
List or retrieve changes |
New-XurrentChange |
Create a change |
Set-XurrentChange |
Update a change |
Get-XurrentProblem |
List or retrieve problems |
New-XurrentProblem |
Create a problem |
Set-XurrentProblem |
Update a problem |
Get-XurrentSite |
List or retrieve sites |
New-XurrentSite |
Create a site |
Get-XurrentTimeEntry |
List or retrieve time entries |
New-XurrentTimeEntry |
Create a time entry |
Set-XurrentTimeEntry |
Update a time entry |
Get-XurrentRequest -Filter @{ status = 'in_progress'; category = 'incident' } -AllPagesGet-XurrentRequest -AllPages -PerPage 100Get-XurrentRequest -Fields 'id,subject,status,team' -AllPagesNew-XurrentRequest -Subject 'Onboarding' -TemplateId 42 -CustomFields @{
first_name = 'Jane'
last_name = 'Doe'
start_date = '2026-06-01'
}Get-XurrentRequest -Filter @{ status = 'in_progress' } -AllPages |
Set-XurrentRequest -Status 'solved'New-XurrentRequest -Subject 'Test request' -WhatIf
Remove-XurrentRequest -Id 12345 -ConfirmThe GraphQL module wraps the Xurrent GraphQL API with cursor-based pagination, strongly-typed mutations, and flexible field selection.
# Connect to the global endpoint (default)
Connect-XurrentGraphQL -ApiToken 'your-api-token' -Account 'your-account'
# Connect to a specific region
Connect-XurrentGraphQL -ApiToken 'your-api-token' -Account 'your-account' -Region 'AU'
# Connect using a custom endpoint
Connect-XurrentGraphQL -ApiToken 'your-api-token' -Account 'your-account' -BaseUri 'https://custom.graphql.example.com'
# Disconnect
Disconnect-XurrentGraphQLSupported regions: Global (default), AU, QA, QA-AU.
| Region | Endpoint |
|---|---|
Global |
https://graphql.xurrent.com/ |
AU |
https://graphql.au.xurrent.com/ |
QA |
https://graphql.xurrent.qa/ |
QA-AU |
https://graphql.au.xurrent.qa/ |
| Cmdlet | Description |
|---|---|
Connect-XurrentGraphQL |
Stores API credentials for GraphQL calls |
Disconnect-XurrentGraphQL |
Clears the GraphQL connection context |
Get-XurrentGraphQLMe |
Get the current authenticated user |
Invoke-XurrentGraphQLQuery |
Execute any GraphQL query |
Invoke-XurrentGraphQLMutation |
Execute any GraphQL mutation |
Get-XurrentGraphQLRequest |
Query requests |
New-XurrentGraphQLRequest |
Create a request (requestCreate mutation) |
Set-XurrentGraphQLRequest |
Update a request (requestUpdate mutation) |
Get-XurrentGraphQLPerson |
Query people |
New-XurrentGraphQLPerson |
Create a person (personCreate mutation) |
Set-XurrentGraphQLPerson |
Update a person (personUpdate mutation) |
Get-XurrentGraphQLTeam |
Query teams |
Get-XurrentGraphQLOrganization |
Query organizations |
Get-XurrentGraphQLService |
Query services |
Get-XurrentGraphQLServiceInstance |
Query service instances |
Get-XurrentGraphQLTask |
Query tasks |
Get-XurrentGraphQLChange |
Query changes |
Get-XurrentGraphQLProblem |
Query problems |
Get-XurrentGraphQLSite |
Query sites |
Get-XurrentGraphQLTimeEntry |
Query time entries |
Get-XurrentGraphQLMe
Get-XurrentGraphQLMe -Fields 'id name primaryEmail account { id name }'Invoke-XurrentGraphQLQuery -Query '{ me { id name primaryEmail } }'
# Query with variables
Invoke-XurrentGraphQLQuery -Query 'query($id: ID!) { request(id: $id) { id subject status } }' `
-Variables @{ id = 'NG1lLTEyMzQ1' }$mutation = @'
mutation($input: RequestCreateInput!) {
requestCreate(input: $input) {
errors { path message }
request { id requestId subject }
}
}
'@
Invoke-XurrentGraphQLMutation -Mutation $mutation -Variables @{
input = @{ subject = 'New request'; category = 'other' }
}All Get-* cmdlets accept a -Fields parameter to control which GraphQL fields are returned:
Get-XurrentGraphQLRequest -Fields 'id requestId subject status team { name } member { name }'
Get-XurrentGraphQLPerson -Fields 'id name primaryEmail organization { name }'# Automatic pagination - returns all results
Get-XurrentGraphQLRequest -AllPages
# Control page size
Get-XurrentGraphQLRequest -First 100 -AllPages
# Manual pagination with custom queries
$query = @'
query($first: Int, $after: String) {
requests(first: $first, after: $after) {
nodes { id subject status }
pageInfo { endCursor hasNextPage }
}
}
'@
Invoke-XurrentGraphQLQuery -Query $query -Variables @{ first = 100 } -AllPages# Create a request
New-XurrentGraphQLRequest -Subject 'Email not working' -Category 'incident'
# Create a request with team assignment
New-XurrentGraphQLRequest -Subject 'New laptop' -Category 'rfc' -TeamId 'NG1lLTEwMQ'
# Create a person
New-XurrentGraphQLPerson -PrimaryEmail 'bob@example.com' -Name 'Bob Smith' -JobTitle 'Engineer'# Update request status
Set-XurrentGraphQLRequest -Id 'NG1lLTEyMzQ1' -Status 'in_progress'
# Update a person
Set-XurrentGraphQLPerson -Id 'NG1lLTk5' -JobTitle 'Senior Engineer'Get-XurrentGraphQLRequest -Fields 'id' -AllPages |
Set-XurrentGraphQLRequest -Status 'solved'All mutation cmdlets support -WhatIf and -Confirm:
New-XurrentGraphQLRequest -Subject 'Test' -WhatIf| Feature | REST Module | GraphQL Module |
|---|---|---|
| IDs | Numeric IDs (e.g. 12345) |
Node IDs (base64 strings, e.g. 'NG1lLTEyMzQ1') |
| Field selection | -Fields 'id,subject,status' (comma-separated) |
-Fields 'id subject status team { name }' (GraphQL syntax) |
| Pagination | Link header-based (-AllPages) |
Cursor-based (first/after, -AllPages) |
| Filtering | Query parameters (-Filter @{}) |
GraphQL filter arguments (-Filter @{}) |
| Nested data | Separate API calls needed | Single query with nested fields |
| Authentication header | X-4me-Account |
X-Xurrent-Account |
Contributions are welcome. Please open an issue or submit a pull request on GitHub.
This project is licensed under the terms described in the LICENSE file.