Summary:
List, update or delete an OS Service rule.
URL:
http(s)://{server hostname}/api/osService/{id}
Methods summary
- GET Method - returns a single OS Service rule.
- PUT Method - update this rule with the given OS Service rule.
- DELETE Method - deletes the OS Service rule.
GET Method detail
Returns the specified OS Service rule.
Response:
Name | Description |
---|---|
id | ID number of the OS Service rule. |
serviceName |
the OS Service name that is being filtered for in the rule. |
description |
description of the OS Service, as entered by the user. |
filterUsing |
type of filter to apply to the service name, either:
|
operatingSystem |
operating system of the rule:
|
enabled |
if the OS Service rule is currently enabled, either 'true' or 'false'. |
Examples:
INPUT
curl –u admin:admin https://localhost/api/osService/1?media=json
OUTPUT
{
"id": 1,
"serviceName": "EOTS",
"description": "Entuity",
"filterUsing": 0,
"operatingSystem": 0
"enabled": true
}
INPUT
curl –u admin:admin https://localhost/api/osService/1?media=xml
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:osServiceRule description="Entuity" enabled="true" filterUsing="0" id="1" operatingSystem="0" serviceName="EOTS" xmlns:ns5="http://www.entuity.com/webrpc" xmlns:ns2="http://www.entuity.com/schemas/webUI" xmlns:ns4="http://www.entuity.com/schemas/eventengine" xmlns:ns3="http://www.entuity.com/schemas/flow"/>
PUT Method detail
Updates the OS Service rule.
Request:
Name | Description |
---|---|
serviceName |
the OS Service name that is being filtered for in the rule. |
description |
description of the OS Service, as entered by the user. |
filterUsing |
type of filter to apply to the service name, either:
|
operatingSystem |
operating system of the rule:
|
enabled |
if the OS Service rule is currently enabled, either 'true' or 'false'. |
Response:
"OK" if OS Service rule updated.
Examples:
INPUT
curl -u admin:admin https://localhost/api/osService/1 -X PUT -H "content-type:application/json" -d
{
"serviceName": "TestService",
"description": "test service",
"filterUsing": 0,
"operatingSystem": 0
"enabled": true
}
OUTPUT
{
"message": "OK"
}
INPUT
curl –u admin:admin https://localhost/api/osService/1?media=xml -X POST -H "content-type:application/xml" -d \
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:osServiceRule description="test service" enabled="true" filterUsing="0" id="1" operatingSystem="0" serviceName="TestService"/>'
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:osServiceRule description="test service" enabled="true" filterUsing="0" id="1" operatingSystem="0" serviceName="TestService" xmlns:ns5="http://www.entuity.com/webrpc" xmlns:ns2="http://www.entuity.com/schemas/webUI" xmlns:ns4="http://www.entuity.com/schemas/eventengine" xmlns:ns3="http://www.entuity.com/schemas/flow"/>
DELETE Method detail
Deletes the OS Service rule.
Request:
The ID of the rule that is to be deleted is sent as a part of a URL.
Response:
“Deleted OS Service Rule with Id{id}” message if the device was removed successfully, an error message otherwise.
Examples:
INPUT
curl -u admin:admin https://localhost/api/osService/2?media=json –X DELETE
OUTPUT
{
"message": "Deleted OS Service Rule with Id 2"
}
INPUT
curl -u admin:admin https://localhost/api/osService/2?media=xml –X DELETE
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<result message="Deleted OS Service Rule with Id 2" xmlns:ns5="http://www.entuity.com/webrpc" xmlns:ns2="http://www.entuity.com/schemas/webUI" xmlns:ns4="http://www.entuity.com/schemas/eventengine" xmlns:ns3="http://www.entuity.com/schemas/flow"/>
Comments
0 comments
Please sign in to leave a comment.