Deleting a policy using web services

The delete API uses the DELETE method to remove a policy. You must provide authentication credentials by using the login API before accessing the data. For information about the authentication process, see Web services authentication Open link

URL to access the delete API

The generic format of a URL for the delete API is as follows:
https://<TSPShostname>:<port>/tsws/10.0/api/unifiedadmin/Policy/<id>/delete?idType=id

Example

https://tsps105:443/tsws/10.0/api/unifiedadmin/Policy/policy203/delete?&idType=name

Entry

Description

https|http

Type of protocol to send the request. BMC TrueSight Presentation Server supports HTTPS protocol by default. You can use HTTP protocol as well.

serverHost

Host name of the Presentation Server.

port

Port number through which communication is established. By default, the HTTPS protocol is supported and the default port number is 443. If you use HTTP protocol, use the port number 80.

policyIdentifier

Identifier to search the policy. The supported identifiers are as follows:

  • name of the policy
  • identifier for the policy

identifierType

Type of the identifier that you have provided in the request. You can provide multiple identifiers, separated by commas. The supported values are as follows, and the default value is name.

  • name
  • id

Response information for the delete API

A sample JSON response is as follows:

{
    "response": [
        {
            "name": "policy203", 
            "statusCode": "200", 
            "statusMsg": "Successfully deleted policy", 
            "resultHandle": "724"
        }, 
        {
            "name": "policy203_blackout", 
            "statusCode": "200", 
            "statusMsg": "Successfully deleted policy", 
            "resultHandle": "725"
        }
    ], 
    "statusCode": "200", 
    "statusMsg": "OK", 
    "responseTimeStamp": "2012-06-20T10:36:50", 
}

Related topics

Creating a policy using web services

Managing policies using web services

Performing infrastructure monitoring functions with web services

Was this page helpful? Yes No Submitting... Thank you

Comments