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 |
---|---|
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. |
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": {
"name": "TimeFrame_updated",
"description": "Timeframe update",
"startTime": "16:43",
"endHour": {
"time": "1:10",
"type": "timeDuration"
},
"recurrencePattern": {
"recurrence": "once",
"details": {
"date": "5042016"
}
}
}
}
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:
"responseTimeStamp": "2016-04-14T10:54:39",
"statusCode": "200",
"statusMsg": "OK",
"response": [
{
"resourceId": "76c7ed8d-3032-4fef-961f-005b416be1d9",
"resourceName": "TimeFrame_updated",
"resourceURI": null,
"statusCode": "200",
"statusMsg": "OK"
}
]
}
Related topics
Performing-infrastructure-monitoring-functions-with-web-services