Starting Backup Policy by Backup Policy ID
This section explains how to start a backup policy.
Request
POST https://<hostname>/api/v1/policies/{policyId}/start |
Request Headers
The request header must contain an authorization token of the current session.
Request Parameters
The following parameters must be posted as URL.
Parameter | Description |
policyId | The identification numbers of the backup policy. Can be obtained as described in Getting Backup Policies. |
Request Body
None.
Response
The server returns the following response to the client.
Response Codes
A successfully completed operation returns a response code 200 (OK).
Response Headers
The response to this request contains the following headers. The response may also include additional standard HTTPS headers.
Header | Description |
Content-length | The length of the response body. |
Content-type | The media type and syntax of the response body message: application/json; charset=utf-8 |
Response Body
Response Body
Property | Type | Description |
|---|---|---|
id | string | Shows the identification number of the session. |
type | string | Shows the type of the session. |
executionStartTime | string | Shows at what time the session was started. |
executionStopTime | string | Shows at what time the session was finished. |
executionDuration | string | Shows the execution time. |
status | string | Shows the status. |
usn | integer | Shows the version of the backup policy. Used by platform services to detect if a backup policy has been changed since the last sync. |
backupJobInfo | Contains the BackupJobInfo object. | |
_links | Dictionary of string [key] and Object [value] | Links to related resources (navigation property). |
Property | Type | Description |
|---|---|---|
policyId | string | Shows the identification number of the policy. |
policyName | string | Shows the name of the policy. |
protectedInstancesCount | integer | Shows the number of objects to backup. |
policyRemoved | boolean | Shows if the policy is removed. |
Example
Request: POST https://<hostname>/api/v1/policies/4094906f-2d81-4a73-b9bc-00482690c285/stop
Request Header: Authorization: Bearer <Access-Token>
Response: 200 OK
Response Body: [ { "id": "15", "type": "PolicySnapshot", "executionStartTime": "2020-02-03T14:25:03.2555023Z", "executionDuration": "00:00:00.0077959", "status": "Running", "usn": 0, "backupJobInfo": { "policyId": "4094906f-2d81-4a73-b9bc-00482690c285", "policyName": "Backup Policy", "protectedInstancesCount": 0, "policyRemoved": false }, "_links": { "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/15"}, "log": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/15/log"} } }, { "id": "14", "type": "PolicyBackup", "status": "Pending", "usn": 0, "backupJobInfo": { "policyId": "4094906f-2d81-4a73-b9bc-00482690c285", "policyName": "Backup Policy", "protectedInstancesCount": 0, "policyRemoved": false }, "_links": { "self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/14"}, "log": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/jobSessions/14/log"} } } ] |