Resource URL
GET /qospolicy/<policy_id>Request Parameters
URL Parameters:
| Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Policy_id | Policy id | Number | Yes |
Response Parameters
Following fields are returned if the request parameters are correct, otherwise error details are returned.
| Field Name | Description | Data Type |
|---|---|---|
| QoSPolicyId | Unique QoS policy id | Number |
| Name | Policy name | String |
| DomainId | Id of domain to which this QoS policy belongs to | Number |
| VisibleToChild | Policy visible to child domain | Boolean |
| Description | QoS policy description | String |
| LastModifiedTime | Last modified time of the QoS policy | String |
| IsEditable | Policy is editable or not | Boolean |
| PolicyType | Policy type, can be "ADVANCED" / "CLASSIC" | Number |
| PolicyVersion | Policy version | Number |
| LastModifiedUser | Last user that modified the policy | String |
| IsDiffServSettoZero | Default value is true | Boolean |
| IsVlanSettoZero | Default value is true | Boolean |
| MemberDetails | QoS rules in the policy | Object |
Details of MemberDetails:
| Field Name | Description | Data Type |
|---|---|---|
| QoSMemberRuleList | List of QoS rules in the policy | Array |
Details of object in QoSMemberRuleList:
| Field Name | Description | Data Type |
|---|---|---|
| Description | Rule description | String |
| Enabled | Is rule enabled or not | Boolean |
| RuleType | Rule type, can be "DIFFSERV" / "VLAN" / "BANDWIDTH" | String |
| SourceAddressObjectList | Source address rule object list | Array |
| SourceUserObjectList | Source user rule object list | Array |
| DestinationAddressObjectList | Destination address rule object list | Array |
| ServiceObjectList | Service rule object list | Array |
| ApplicationObjectList | Application rule object list | Array |
| TimeObjectList | Time rule object list | Array |
| TagOrClass | Tag/class value,
For Diffserv, tag value should be between 0 - 63 For VLAN, tag value should be between 0 - 7 For Bandwidth, tag value should be between 1 - 7 |
Number |
Details of SourceAddressObjectList and DestinationAddressObjectList:
| Field Name | Description | Data Type |
|---|---|---|
| RuleObjectId | Unique rule object id | String |
| Name | Rule object name | String |
| RuleObjectType | Source/destination mode, can be "COUNTRY" / "HOST_DNS_NAME" / "HOST_IPV_4" / "HOST_IPV_6" / "IPV_4_ADDRESS_RANGE" / "IPV_6_ADDRESS_RANGE" / "NETWORK_IPV_4" / "NETWORK_IPV_6" / "NETWORK_GROUP" | String |
Details of SourceUserObjectList:
| Field Name | Description | Data Type |
|---|---|---|
| RuleObjectId | Unique rule object id | String |
| Name | Rule object name | String |
| RuleObjectType | Source User, can be "USER" / "USER_GROUP" | String |
Details of ServiceObjectList and ApplicationObjectList:
| Field Name | Description | Data Type |
|---|---|---|
| RuleObjectId | Unique service rule object id | String |
| Name | Rule object name | String |
| RuleObjectType | Service/application mode, can be "APPLICATION" / "APPLICATION_GROUP" / "APPLICATION_ON_CUSTOM_PORT" / "SERVICE" / "SERVICE_RANGE" / "SERVICE_GROUP" | String |
| ApplicationType | Application type, can be "DEFAULT" / "CUSTOM" | String |
Details of TimeObjectList:
| Field Name | Description | Data Type |
|---|---|---|
| RuleObjectId | Unique service rule object id | String |
| Name | Rule object name | String |
| RuleObjectType | Time mode, can be "FINITE_TIME_PERIOD" / "RECURRING_TIME_PERIOD" / "RECURRING_TIME_PERIOD_GROUP" | String |
Example
Request
GET https://%3CNSM_IP%3E/sdkapi/qospolicy/183
Response
{
"QoSPolicyId" : 183,
"Name" : "QoSPolicyTest",
"DomainId" : 0,
"VisibleToChild" : true,
"Description" : "To Test the QoS Policy",
"LastModifiedTime" : "2012-12-12 16:24:28",
"IsEditable" : true,
"PolicyType" : "ADVANCED",
"PolicyVersion" : 1,
"LastModifiedUser" : "admin",
"IsDiffServSettoZero" : false,
"IsVlanSettoZero" : true,
"MemberDetails" : {
"QoSMemberRuleList" : [{
"Description" : "QoSpolicyRatelimiting",
"Enabled" : true,
"RuleType" : "RATE_LIMITING",
"TagOrClass" : 3,
"SourceAddressObjectList" : [{
"RuleObjectId" : "AX",
"Name" : "Aland Islands",
"RuleObjectType" : "COUNTRY"
}, {
"RuleObjectId" : "101",
"Name" : "hostDNSRule",
"RuleObjectType" : "HOST_DNS_NAME"
}, {
"RuleObjectId" : "102",
"Name" : "hostIpv4",
"RuleObjectType" : "HOST_IPV_4"
}, {
"RuleObjectId" : "103",
"Name" : "ipv4Addressrange",
"RuleObjectType" : "IPV_4_ADDRESS_RANGE"
}, {
"RuleObjectId" : "104",
"Name" : "networkgroup",
"RuleObjectType" : "NETWORK_GROUP"
}
],
"DestinationAddressObjectList" : [{
"RuleObjectId" : "AL",
"Name" : "Albania",
"RuleObjectType" : "COUNTRY"
}, {
"RuleObjectId" : "DZ",
"Name" : "Algeria",
"RuleObjectType" : "COUNTRY"
}, {
"RuleObjectId" : "AS",
"Name" : "American Samoa",
"RuleObjectType" : "COUNTRY"
}
],
"SourceUserObjectList" : [{
"RuleObjectId" : "-1",
"Name" : "Any",
"RuleObjectType" : "USER"
}
],
"ServiceObjectList" : [{
"RuleObjectId" : "110",
"Name" : "serviceCustom",
"RuleObjectType" : "SERVICE",
"ApplicationType" : "CUSTOM"
}, {
"RuleObjectId" : "112",
"Name" : "serviceGroup",
"RuleObjectType" : "SERVICE_GROUP",
"ApplicationType" : "CUSTOM"
}, {
"RuleObjectId" : "111",
"Name" : "serviceRange",
"RuleObjectType" : "SERVICE_RANGE",
"ApplicationType" : "CUSTOM"
}
],
"ApplicationObjectList" : [],
"TimeObjectList" : [{
"RuleObjectId" : "107",
"Name" : "finiteTimePeriod",
"RuleObjectType" : "FINITE_TIMING_PERIOD"
}
]
}, {
"Description" : "DiffServ Rules",
"Enabled" : true,
"RuleType" : "DIFFSERV",
"TagOrClass" : 3,
"SourceAddressObjectList" : [{
"RuleObjectId" : "AF",
"Name" : "Afghanistan",
"RuleObjectType" : "COUNTRY"
}
],
"DestinationAddressObjectList" : [{
"RuleObjectId" : "VG",
"Name" : "Virgin Islands, British",
"RuleObjectType" : "COUNTRY"
}
],
"SourceUserObjectList" : [{
"RuleObjectId" : "-1",
"Name" : "Any",
"RuleObjectType" : "USER"
}
],
"ServiceObjectList" : [],
"ApplicationObjectList" : [{
"RuleObjectId" : "1627607040",
"RuleObjectType" : "APPLICATION",
"ApplicationType" : "DEFAULT"
}, {
"RuleObjectId" : "1543598080",
"RuleObjectType" : "APPLICATION",
"ApplicationType" : "DEFAULT"
}
],
"TimeObjectList" : [{
"RuleObjectId" : "109",
"Name" : "recurringTimeperiodGroup",
"RuleObjectType" : "RECURRING_TIME_PERIOD_GROUP"
}
]
}, {
"Description" : "",
"Enabled" : true,
"RuleType" : "VLAN",
"TagOrClass" : 0,
"SourceAddressObjectList" : [{
"RuleObjectId" : "-1",
"Name" : "Any"
}
],
"DestinationAddressObjectList" : [{
"RuleObjectId" : "-1",
"Name" : "Any"
}
],
"SourceUserObjectList" : [{
"RuleObjectId" : "-1",
"Name" : "Any",
"RuleObjectType" : "USER"
}
],
"ServiceObjectList" : [{
"RuleObjectId" : "-1",
"Name" : "Any"
}
],
"ApplicationObjectList" : [],
"TimeObjectList" : [{
"RuleObjectId" : "-1",
"Name" : "Always"
}
]
}
]
}
}
Error Information
Following error codes are returned by this URL:
| S.No | HTTP Error Code | SDK API errorId | SDK API errorMessage |
|---|---|---|---|
| 1 | 500 | 1001 | Internal error |
| 2 | 400 | 2702 | Invalid QoS policy Id/ QoS policy not visible to this domain |