HPC Web Service API Reference

Beginning with Microsoft HPC Pack 2008 R2 with Service Pack 2 (SP2), Microsoft HPC Pack provides access to the HPC Job Scheduler Service by using an HTTP web service that is based on the representational state transfer (REST) model.

Later versions of Microsoft HPC Pack, including HPC Pack 2012, HPC Pack 2012 R2, and HPC Pack 2016, provide additional operations that provide information about nodes and node groups, and that allow you to create and manage SOA sessions, SOA requests, and SOA responses.

The HPC REST API defines a number of operations that you can perform, including the information that is expected in the HTTP requests that you send to the HPC REST web service and that is provided in the HTTP responses that you receive in return as part of each operation.

Note  

The HPC REST API does not define the manner in which you create and send these HTTP requests and process the HTTP responses. The approach you can use to work with the HTTP requests and responses varies depending on the programming language that you use, and can also vary depending on the libraries or other tools that you choose to install to work with HTTP requests and responses in your programming language of choice. Additional information about working with the HTTP requests and responses is beyond the scope of this documentation. For an example of how to work with HTTP requests and responses for operations in the HPC REST API, see Creating and Submitting Jobs by Using the REST API in Microsoft HPC Pack.

 

For certain operations (starting the Microsoft HPC Pack 2008 R2 with Service Pack 3 (SP3)), the api-version URI parameter or request header is required to use functionality that is available as of a certain version of Microsoft HPC Pack. The following table lists the values of the api-version parameter that correspond to versions of HPC Pack.

Version of HPC Pack Value of api-version
HPC Pack 2012, HPC Pack 2012 R2, HPC Pack 2016 2012-11-01.4.0
HPC Pack 2008 R2 with SP4 2012-03-31.3.4
HPC Pack 2008 R2 with SP3

2011-11-01

HPC Pack 2008 R2 with SP2

Not available.

 

The following table shows the operations that are available in the REST API both when the REST web service is hosted in an on-premises cluster, and when the REST web service is hosted in Azure.

Operation Description
Add Task

Adds a task to a job.

Cancel Job

Cancels the specified job.

Cancel Subtask

Cancels the specified subtask.

Cancel Task

Cancels the specified task.

Create Job

Creates a new job on the HPC cluster, for which the specified properties have the specified values.

Create Job From XML

Creates a new job on the HPC cluster by using the information in the specified job XML.

Get Active Head Node

Gets the name of the active head node of the HPC cluster. Supported beginning with Microsoft HPC Pack 2008 R2 with SP4.

Get Clusters

Gets the name of the cluster that hosts the instance of the REST web service. Supported beginning with Microsoft HPC Pack 2008 R2 with SP3.

Get Job

Gets information about the specified job.

Get Job Custom Properties

Gets the values of the specified custom properties for the job, or the values of all of the properties if none are specified.

Get Job Environment Variables

Gets the values of the specified environment variables for the job, or the values of all of the environment variables if none are specified.

Get Job List

Gets the values of the specified properties for all jobs for the HPC cluster, or optionally for jobs filtered by job owner or job state.

Get Job Templates

Gets a list of the names of the job templates that are available on the HPC cluster.

Get Node

Gets the values of all of the properties for the specified node. Supported beginning with Microsoft HPC Pack 2008 R2 with SP3.

Get Node Group List

Gets the names and descriptions for all of the node groups for the HPC cluster. Supported beginning with Microsoft HPC Pack 2008 R2 with SP3.

Get Node Group Members

Gets the list of the nodes that belong to the specified node group. Supported beginning with Microsoft HPC Pack 2008 R2 with SP3.

Get Node List

Gets the values of the specified properties for all of the nodes in an HPC cluster. Supported beginning with Microsoft HPC Pack 2008 R2 with SP3.

Get Subtask

Gets the values of the specified properties for the specified subtask, or the values of all of the properties if no properties are specified.

Get Task

Gets the values of the specified properties for the specified task, or the values of all of the properties if no properties are specified.

Get Task Custom Properties

Gets the values of the specified custom properties for the task, or the values of all of the properties if none are specified.

Get Task Environment Variables

Gets the values of the specified environment variables for the task, or the values of all of the environment variables if none are specified.

Get Task List

Gets the values of the properties for all of the tasks in the specified job.

Get Version

Gets the version of Microsoft HPC Pack that is installed on the HPC cluster that hosts the web service.

Requeue Job

Resubmits the specified job to the queue.

Requeue Subtask

Moves a failed, canceled, or queued subtask to the configuring state so that the subtask can be queued again when the job is resubmitted.

Requeue Task

Moves a failed, canceled, or queued task to the configuring state so that the task can be queued again when the job is resubmitted.

Set Job Custom Properties

Sets the values of custom properties for a job.

Set Job Environment Variables

Sets the value of one or more environment variables for a job.

Set Job Properties

Sets the values for the properties of the specified job.

Set Subtask Properties

Sets the values of properties for the task that contains that specified subtask.

Set Task Custom Properties

Sets the values of custom properties for a task.

Set Task Environment Variables

Sets the value of one or more environment variables for a task.

Set Task Properties

Sets the values of properties for a task in a job.

Submit Job

Submits a job to the HPC Job Scheduler Service so that the HPC Job Scheduler Service can add the job to the queue of jobs to run.

 

The following table shows the operations that are available only when the REST web service is hosted in Windows Azure. All of the operations are supported starting with Microsoft HPC Pack 2008 R2 with SP3.

Operation Description
Attach to Session

Connects to an existing SOA session.

Close Session

Closes a SOA session, which ends the job for the session and deletes the response messages.

Create Session

Creates a new service-oriented architecture (SOA) session with the specified configuration information.

Delete Requests

Deletes a batch of SOA requests that you previously sent.

Get Responses

Gets the responses that the service-oriented architecture (SOA) service returned for the SOA requests in the specified batch.

Get Request Status

Gets the status of a batch of SOA requests.

Indicate the End of Requests

Indicates that you are finish sending SOA requests and that the broker should commit all requests.

Send Requests

Sends a batch of SOA requests to the SOA service that you specified when you created the session.