Running, printing, and viewing a document : Working with a resource group : Retrieving the resource group to which a job is assigned
 
Retrieving the resource group to which a job is assigned
If a user assigns a job to a resource group when submitting the job or updating the schedule, you can determine the resource group using GetJobDetails. Request the resource group in ResultDef, as shown in the following example:
<SOAP-ENV:Body>
<GetJobDetails>
<JobId>42</JobId>
<ResultDef>
<String>Schedules</String>
<String>ResourceGroup</String>
<String>InputDetail</String>
</ResultDef>
</GetJobDetails>
</SOAP-ENV:Body>
If the job is assigned to a resource group, the resource group name appears in JobAttributes in the response.
<SOAP-ENV:Body>
<GetJobDetailsResponse>
<Schedules>
</Schedules>
<InputDetail>
</InputDetail>
<JobAttributes>
<JobId>42</JobId>
<JobName>mltd</JobName>
<Priority>500</Priority>
<Owner>Administrator</Owner>
<JobType>RunReport</JobType>
<State>Scheduled</State>
<ResourceGroup>Default Async</ResourceGroup>
</JobAttributes>
</GetJobDetailsResponse>
</SOAP-ENV:Body>