Get Job

Gets information about the specified job.

Request

You can specify the Get Job request as follows.

Method Request URI
GET (before HPC Pack 2016) https://head_node_name:port/WindowsHPC/HPC_cluster_name/Job/job_identifier
GET (HPC Pack 2016) https://head_node_name:port/WindowsHPC/Job/job_identifier

 

For instances of the REST web service that are hosted in Azure, the head node name should have a format of Windows_Azure_service_name.cloudapp.net.

To get the name to use for an HPC cluster that runs at least Microsoft HPC Pack 2008 R2 with Service Pack 3 (SP3), use the Get Clusters operation.

URI Parameters

You can specify the following additional parameters on the request URI.

Parameter Description
Properties

Optional. A comma-separated list of the names for the properties of the job for which you want to get values. For a list of properties for which you can get values, see the Remarks section.

If you do not specify the Properties parameter, the response contains values for all of the properties of the job. If a property with a specified name does not exist for the job, an error occurs.

Render

Optional. Determines the schema used for the XML response.

Specify RestPropRender to get job properties as <name, value> pairs. Specify HpcJobXml to get XML formatted as found in the Create Job From XML operation.

The default value is RestPropRender.

api-version

Optional. Specifies the version of the operation to use for this request. To specify Microsoft HPC Pack 2008 R2 with Service Pack 3 (SP3), use a value of 2011-11-01. The minimum version that supports this URI parameter is Microsoft HPC Pack 2008 R2 with SP3.

The value of this URI parameter is ignored if the request also contains the api-version header.

 

Request Headers

The following table describes required and optional request headers.

Request Header Description
api-version

Optional. Specifies the version of the operation to use for this request. To specify Microsoft HPC Pack 2008 R2 with SP3, use a value of 2011-11-01. The minimum version that supports this header is Microsoft HPC Pack 2008 R2 with SP3.

The value specified in this header overrides the value specified in the api-version URI parameter if both are specified.

CCP_Version

Optional. Specifies the version of the operation to use for this request.

Deprecated beginning with Microsoft HPC Pack 2008 R2 with Service Pack 3 (SP3).

 

Request Body

None.

Response

The response includes an HTTP status code, a set of response headers, and a response body in XML format.

Status Code

A successful operation returns status code 200 (OK). For more information about status codes, see HttpStatusCode.

The error response is dependent upon the api-version used in the request. If the api-version is not provided, or CCP_Version is specified, then the error response will be an XML string (Note: The error message will vary based on the error):

<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Error message text.</string>

If the api-version is 2011-11-01 or later, the error message will be a more descriptive XML response (Note: Values will vary based on the error):

<HpcWebServiceFault xmlns="http://schemas.microsoft.com/HPCS2008R2/common" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Code>267386880</Code>
  <Message>Error message text.</Message>
  <Values i:nil="true" xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/>
</HpcWebServiceFault>

Response Headers

The response for this operation includes the following headers.

Response Header Description
x-ms-hpc-authoritychain

A comma-separated list of RFC 1918 IP addresses that indicate the sequence of instances of the REST web service that the operation called in order from to right.

Only responses from instances of the REST web service that are hosted on Azure contain this header. Responses from instances of the REST web service that are hosted on premise omit this header.

This header is supported beginning with Microsoft HPC Pack 2008 R2 with SP3 and is not available in previous versions.

 

The response for this operation also includes standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

Response Body

The format of the body of the response depends on the renderer that you specify. The following example shows the format if you specify RestPropRender for Render parameter.

<ArrayOfProperty xmlns="http://schemas.microsoft.com/HPCS2008R2/common" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <Property>
        <Name>job_property1_name</Name>
        <Value>job_property1_value</Value>
    </Property>
    <Property>
        <Name>job_property2_name</Name>
        <Value>job_property2_value</Value>
    </Property>
    ...
<ArrayOfProperty>

The following table describes each of the elements in this response XML.

Element Description
ArrayOfProperty

Represents the set of properties for the job for which you requested values, or all of the properties for the job if you did not specify a list of properties.

Property

Represents a single property for the job.

Name

Contains the name of the property.

Value

Contains the value of the property.

 

The following example shows the format if you specify HpcJobXml for Render parameter and Id,CreateTime, State for the Properties parameter.

<Job Version="3.000" Id="115" CreateTime="2010/12/7 23:18:20" State="Configuring" />

If you specify HpcJobXml for Render parameter and do not specify a value for the Properties parameter, the job XML that you get contains information about custom properties, dependencies, and tasks, in addition to the values for the built-in job properties. For more information about the information in job XML files, see Job Schema.

Remarks

The following table shows the job properties for which you can get the values. For information about the property, including the versions of HPC Pack that support it, see the corresponding property of the ISchedulerJob interface in the managed API for Microsoft HPC Pack.

Property Corresponding ISchedulerJob Property
Id ISchedulerJob.Id
Name ISchedulerJob.Name
Owner ISchedulerJob.Owner
UserName ISchedulerJob.UserName
Project ISchedulerJob.Project
RuntimeSeconds ISchedulerJob.Runtime
SubmitTime ISchedulerJob.SubmitTime
CreateTime ISchedulerJob.CreateTime
EndTime ISchedulerJob.EndTime
StartTime ISchedulerJob.StartTime
ChangeTime ISchedulerJob.ChangeTime
State ISchedulerJob.State
PreviousState ISchedulerJob.PreviousState
MinCores ISchedulerJob.MinimumNumberOfCores
MaxCores ISchedulerJob.MaximumNumberOfCores
MinNodes ISchedulerJob.MinimumNumberOfNodes
MaxNodes ISchedulerJob.MaximumNumberOfNodes
MinSockets ISchedulerJob.MinimumNumberOfSockets
MaxSockets ISchedulerJob.MaximumNumberOfSockets
UnitType ISchedulerJob.UnitType
RequestedNodes ISchedulerJob.RequestedNodes
IsExclusive ISchedulerJob.IsExclusive
RunUntilCanceled ISchedulerJob.RunUntilCanceled
NodeGroups ISchedulerJob.NodeGroups
FailOnTaskFailure ISchedulerJob.FailOnTaskFailure
AutoCalculateMax ISchedulerJob.AutoCalculateMax
AutoCalculateMin ISchedulerJob.AutoCalculateMin
CanGrow ISchedulerJob.CanGrow
CanShrink ISchedulerJob.CanShrink
Preemptable ISchedulerJob.CanPreempt
ErrorMessage ISchedulerJob.ErrorMessage
HasRuntime ISchedulerJob.HasRuntime
RequeueCount ISchedulerJob.RequeueCount
MinMemory ISchedulerJob.MinMemory
MaxMemory ISchedulerJob.MaxMemory
MinCoresPerNode ISchedulerJob.MinCoresPerNode
MaxCoresPerNode ISchedulerJob.MaxCoresPerNode
EndpointReference ISchedulerJob.EndpointAddresses
SoftwareLicense ISchedulerJob.SoftwareLicense
OrderBy ISchedulerJob.OrderBy
ClientSource ISchedulerJob.ClientSource
Progress ISchedulerJob.Progress
ProgressMessage ISchedulerJob.ProgressMessage
TargetResourceCount ISchedulerJob.TargetResourceCount
ExpandedPriority ISchedulerJob.ExpandedPriority
ServiceName ISchedulerJob.ServiceName
JobTemplate ISchedulerJob.JobTemplate
HoldUntil ISchedulerJob.HoldUntil
NotifyOnStart ISchedulerJob.NotifyOnStart
NotifyOnCompletion ISchedulerJob.NotifyOnCompletion
ExcludedNodes ISchedulerJob.ExcludedNodes
EmailAddress ISchedulerJob.EmailAddress
Priority ISchedulerJob.Priority
AllocatedNodes ISchedulerJob.AllocatedNodes
JobTemplate ISchedulerJob.JobTemplate
Pool ISchedulerJob.Pool
JobValidExitCodes ISchedulerJob.ValidExitCodes
ParentJobIds ISchedulerJob.ParentJobIds
FailDependentTasks ISchedulerJob.FailDependentTasks
NodeGroupOp ISchedulerJob.NodeGroupOp
SingleNode ISchedulerJob.SingleNode
ChildJobIds ISchedulerJob.ChildJobIds
EstimatedProcessMemory ISchedulerJob.EstimatedProcessMemory

 

Requirements

Product

HPC Pack 2008 R2 with at least SP2, or a later version of HPC Pack.