Update Plan SLA (REST API: PUT)

Updated

This operation configures the SLA (Service Level Agreement) for a plan. The SLA settings apply to all entities that use the plan for backup.

Request

Syntax

Send the request using either XML or JSON:

  • XML

    PUT <webservice>/Plan/{planId}/sla HTTP/1.1 Host: <host name> Accept: {application/xml | application/json} Authtoken: <authentication token> Content-type: application/xml <put_plan_sla_template.xml>

  • JSON

    PUT <webservice>/Plan/{planId}/sla HTTP/1.1 Host: <host name> Accept: {application/xml | application/json} Authtoken: <authentication token> Content-type: application/json <put_plan_sla_template.json>

where <webservice> is the root path used to route the API requests to the Web Server.

For more information, see Available Web Services for REST API.

Request Parameters

Name

Description

Required

planId

The plan ID for the plan. If the plan ID is not known, use the GET Plan API to retrieve it.

Yes

Request Headers

Name

Description

Host

The host name of the Web Server or Web Console used in the API request.

Accept

The format of the response. Valid values are: application/xml or application/json.

Authtoken

The authentication token received after successfully logging on. For details on receiving an authentication token, see Authentication.

Content-type

The media type contained in the request body.

Request Body

Download the XML or JSON file required for this request: put_plan_sla_template.xml or put_plan_sla_template.json. The following table displays the parameters for the request body.

Name

Description

Elements

level

Option to select default SLA or configure custom SLA. Valid values are:

  • 1, Use the SLA period that is configured for the plan.

  • 2, Configure custom SLA period in days.

slaOptions

slaDays

The service level agreement time period. Enter the value in days.

slaOptions

excludeSLA

Option to exclude entities associated with the plan from SLA calculation. Valid boolean values are:

  • 0, Include in SLA calculation

  • 1, Exclude from SLA calculation

slaOptions

slaDescription

The reason for excluding entities associated with the plan from the SLA calculation.

slaOptions

delayInterval

If excluding entities associated with the plan from SLA calculation, then set the delay interval in Unix timestamp format.

slaOptions

Response

Response Parameters

Parameter

Description

Element

slaInMinutes

The service level agreement time period for the plan, in minutes.

summary

permissionId

The ID of the security permission. For a list of valid values, see Security Permission IDs and Names.

permissions

planId

The system-generated ID assigned to the plan.

plan

planName

The name of the plan.

plan

userId

The system-generated ID assigned to the user who created the plan.

planOwner

userName

The name of the user who created the plan.

planOwner

errorMessage

The description of the error code. Not all error codes have an error message.

status

errorCode

The possible error codes.

Valid values are:

  • 0, successful completion.

  • 2, a failure.

  • a specific error code.

status

Examples

Sample Request

XML

PUT <webservice>/Plan/5/sla HTTP/1.1
Host: client.mydomain.com
Accept: application/xml
Authtoken: QSDK 38568012f4d1e8ee1841d283a47aa3ba78e124ea58354b5fc6
0f4dab8a63347d05cf5552484dafda3bfa4c5db84e580b1cb37bcf8e65b39f7f
8549a443e6f78a2c7be3f31b3d845e24776c835e498e8e883bb40c46bd15af4f
40ca94e823acedcdd4e9659e74b34a07a85c4586cd2ed914b6dce015874783ef7
68fda78183a4208930954a377f66eb56c8b92cexampl4s437a19317ca6ce7f323
3d5a01aca35dbad93468b833f2cf71010809006a937670adce711ca8be46638e8
Content-type: application/xml
<Api_UpdatePlanReq>
 <options>
  <slaOptions level="1" slaDays="7" excludeSLA="0" slaDescription="" delayInterval="0"></slaOptions>
 </options>
</Api_UpdatePlanReq>
    

JSON

PUT <webservice>/Plan/5/sla HTTP/1.1
Host: client.mydomain.com
Accept: application/json
Authtoken: QSDK 38568012f4d1e8ee1841d283a47aa3ba78e124ea58354b5fc6
0f4dab8a63347d05cf5552484dafda3bfa4c5db84e580b1cb37bcf8e65b39f7f
8549a443e6f78a2c7be3f31b3d845e24776c835e498e8e883bb40c46bd15af4f
40ca94e823acedcdd4e9659e74b34a07a85c4586cd2ed914b6dce015874783ef7
68fda78183a4208930954a377f66eb56c8b92cexampl4s437a19317ca6ce7f323
3d5a01aca35dbad93468b833f2cf71010809006a937670adce711ca8be46638e8
Content-type: application/json
{
 "options": {
  "slaOptions": {
   "level": "1",
   "slaDays": "7",
   "excludeSLA": "0",
   "slaDescription": "",
   "delayInterval": "0"
   }
  }
}
    

Sample Response

XML

<Api_UpdatePlanResp>
 <plan>
  <summary slaInMinutes="1440" restrictions="0" type="2" planStatusFlag="0" numDevices="0" subtype="33554439" numUsers="1">
   <permissions permissionId="215" />
   <planOwner _type_="13" userName="Administrator" userId="1" />
   <plan _type_="158" planName="Test_Plan" planId="5" />
  </summary>
  <securityAssociations>
   <associations>
    <userOrGroup userId="1" _type_="13" userName="admin" />
    <properties isCreatorAssociation="1">
     <role _type_="120" roleId="10" roleName="Plan Creator Role" />
    </properties>
   </associations>
   <ownerAssociations />
  </securityAssociations>
  <featureInfo />
  <storage>
   <storagePolicy storagePolicyId="6" />
  </storage>
  <laptop>
   <features>
    <role roleId="23" />
    <categoryPermission>
     <categoriesPermissionList permissionId="215" permissionName="Archiving" />
    </categoryPermission>
   </features>
   <accessPolicies>
    <categoryPermission />
   </accessPolicies>
   <content>
    <backupContent idatype="3">
     <subClientPolicy>
      <backupSetEntity backupsetId="6" />
     </subClientPolicy>
    </backupContent>
    <backupContent idatype="4">
     <subClientPolicy>
      <backupSetEntity backupsetId="7" />
     </subClientPolicy>
    </backupContent>
   </content>
   <users>
    <users email="jsmith@mycompany.com">
     <user userName="jsmith" userId="5" />
    </users>
   </users>
  </laptop>
  <alerts>
   <alerts alertName="No backup for last 4 days" alertId="7" />
   <alerts alertName="Restore Job failed" alertId="8" />
  </alerts>
  <schedule>
   <task taskId="47" />
  </schedule>
 <database slaInMinutes="0" />
 <autoCreatedEntities>
  <clientGroup clientGroupId="11" clientGroupName="Test_Plan clients" />
  <localUserGroup userGroupId="6" userGroupName="Test_Plan users" />
 </autoCreatedEntities>
 <options edgeDriveQuota="100" quota="0">
  <network enableThrottle="1">
   <throttle shareBandwidth="1">
    <throttle sendRate="0" recvRate="0" />
   </throttle>
  </network>
  <slaOptions slaDays="111" slaDescription="testing sla through update plan" level="2" delayInterval="125">
   <inheritedSLA slaDays="0" entityType="1" />
  </slaOptions>
 </options>
 </plan>
 <errors>
  <entity />
  <status errorMessage="" errorCode="0" />
 </errors>
 <errors>
  <entity />
  <status errorMessage="" errorCode="0" />
 </errors>
</Api_UpdatePlanResp>
    

JSON

{  "plan": {  "summary": {  "planStatusFlag": 0,  "numDevices": 0,  "slaInMinutes": 1440,  "subtype": 33554437,  "restrictions": 0,  "type": 2,  "numUsers": 0,  "permissions": [{  "permissionId": 1  }, {  "permissionId": 215  }],  "planOwner": {  "_type_": 13,  "userName": "Administrator",  "userId": 1  },  "plan": {  "_type_": 158,  "planName": "Server plan",  "planId": 5  }  },  "schedule": {  "task": {  "taskId": 88  }  },  "autoCreatedEntities": {  "clientGroup": {  "clientGroupId": 6,  "clientGroupName": "Server plan clients"  },  "localUserGroup": {  "userGroupId": 4,  "userGroupName": "Server plan users"  }  },  "securityAssociations": {  "associations": [{  "userOrGroup": [{  "userId": 1,  "_type_": 13,  "userName": "admin"  }],  "properties": {  "isCreatorAssociation": true,  "role": {  "_type_": 120,  "roleId": 10,  "roleName": "Plan Creator Role"  }  }  }],  "ownerAssociations": {}  },  "featureInfo": {},  "options": {  "quota": 0,   "slaOptions": {  "slaDays": 111,  "slaDescription": "testing sla through update plan",  "level": 2,  "delayInterval": 125,  "inheritedSLA": {  "slaDays": 0,  "entityType": 1  }  }  },  "storage": {  "storagePolicy": {  "storagePolicyId": 6  }  }  },  "errors": [{  "entity": {},  "status": {  "errorMessage": "",  "errorCode": 0  }  }]
}