How can I use the API to get service request variables?

I'm brand new to SWWD and not that great with working with APIs but, I've managed to GET an incident by Incident Number using PowerShell.  The incident was created by a process in Service Catalog and returns a bunch of variables.  What I can't find is how to GET the service_request_variables that are part of the incident using the API.  Any help or direction would be appreciated.

  • Here's the PS I'm using to get the incident by number (hardcoded 17 at the moment):

    $token = 'TOKEN'
    $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
    $headers.Add("X-Samanage-Authorization""Bearer $token")
    $contentType = "application/json"
    $response = Invoke-RestMethod -Uri "$apiRoot/incidents.json" -Headers $headers -ContentType $contentType -Method Get

    $ServiceRequest = ($response | where-object {$_.number -eq "17"})

    I had expected the custom fields returned to be in custom_fields_values as an array but it doesn't return anything.