Help Center
Choose product document...
Veeam Backup & Replication 9.5
RESTful API Reference

POST Method

The POST HTTP method is most often used to create a new resource: for example, a new logon session. However, in Veeam Backup Enterprise Manager RESTful API the POST HTTP method can be used for other activities, for example:

  • Starting a job
  • Cloning a job
  • Downloading a file
  • Restoring a VM

Some POST HTTP requests do not require a request body: they are simply sent to the URL of a resource. For example, if you want to start a job, you should send a request of the following type:

POST http://localhost:9399/api/jobs/{ID}?action=start

Other POST HTTP requests require the request body. For example, if you want to clone a job in Veeam Backup Enterprise Manager, you need to send the HTTP POST request and communicate to the server the parameters for the cloned job in the request body. The body of the request must conform to the XML Schema of Veeam Backup Enterprise Manager RESTful API:

Request:

POST http://localhost:9399/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5?action=clone

 

Request Body:

<?xml version="1.0" encoding="utf-8"?>
<JobCloneSpec xmlns="http://www.veeam.com/ent/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <BackupJobCloneInfo>
   <JobName>Exchange Backup Cloned</JobName>
   <FolderName>Exchange Backup Cloned</FolderName>
   <RepositoryUid>urn:veeam:Repository:3efc471c-04be-4dd1-9ed2-54e7fddc5ecf</RepositoryUid>
 </BackupJobCloneInfo>
</JobCloneSpec>

If case of success, the server returns the HTTP response code 202 Accepted. The operation itself is performed in the asynchronous manner. The server creates a task for the operation completion and returns a link to this task to the client. Using this link, the client can monitor the task completion.

The example below illustrates the job start operation:

Request:

POST http://localhost:9399/api/jobs/115f560f-3a5f-4a88-b0c8-096c845bafcd?action=start

 

Response:

202 Accepted

 

Response Body:

<Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="http://localhost:9399/api/tasks/task-10">
<Links>
   <Link Rel="Delete" Type="Task" Href="http://localhost:9399/api/tasks/task-10" />
 </Links>
 <TaskId>task-10</TaskId>
 <State>Running</State>
 <Operation>StartJob</Operation>
</Task>

To monitor the state of the task completion, the client sends the GET HTTP request to the URL of the task resource:

Request:

GET http://localhost:9399/api/tasks/task-10

 

Response:

200 Success

 

Response Body:

<Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="http://localhost:9399/api/tasks/task-10">
 <Links>
   <Link Rel="Delete" Type="Task" Href="http://localhost:9399/api/tasks/task-10" />
 </Links>
 <TaskId>task-10</TaskId>
 <State>Finished</State>
 <Operation>StartJob</Operation>
 <Result Success="true">
   <Message>Job "SQL Backup" triggered to start.</Message>
 </Result>
</Task>

 

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Backup Explorers User Guide

PowerShell Reference

RESTful API Reference

Veeam Backup FREE Edition User Guide

Veeam Backup for Microsoft Office 365

Veeam ONE Documentation

Veeam Endpoint Backup Documentation

Veeam Management Pack Documentation