Updating a time frame
The update API uses the PUT method to update a time frame. You must provide authentication credentials by using the login API before accessing the data. For information about the authentication process, see Web services authentication.
URL to update a time frame
The generic format of a URL for the update API is as follows:
Entry | Description |
---|---|
http|https | Type of protocol to send the request. Infrastructure Management support both HTTP and HTTPS protocols. |
serverHost | Host name of the server that has Central Monitoring Administration |
port | Port number through which communication is established. The default port number is 80 if you use the HTTP protocol and 443 if you use the HTTPS protocol. |
identifier1, identifier2,...identifierN | Identifiers of the time frame. The supported identifier types are as follows:
You can provide multiple identifiers, separated by commas. |
idType | Specifies the identifier type for the time frame that the web service request uses. The supported identifier types are as follows:
The default value is name. |
Input parameters in the JSON format to update a time frame
When you provide input parameters for any web service request, you must specify the content-type parameter in the header of the web service request as follows:
Sample input parameters in the JSON format are as follows:
Sample input parameters for the update API to update a time frame
"timeframe": {
"recurrencePattern": {
"details": {
"dates": "5,6,14"
},
"recurrence": "monthly"
}
}
}
List of parameters that can be provided to access the update API
The default value is daily. Based on the recurrence value, the mandatory parameters you must provide are listed as follows:
The default value is all.
Response information for the update API
A sample JSON response is as follows:
"response": {
"name": "timeframe2",
"resultHandle": "0",
"statusCode": "200",
"statusMsg": "OK",
"responseTimeStamp": "2012-06-20T08:38:25",
}
}
Related topics
Performing-Central-Monitoring-Administration-functions-with-web-services