Get the Build Version and Daily Maintenance Window Time

Returns information about the current build version and the scheduled daily maintenance window time.

This API is version v1.

Before using the REST resources, you must understand how to access the REST resources and other important concepts. See About the REST APIs. Using this REST API requires prerequisites. See Prerequisites.

REST Resource

GET /interop/rest/{api_version}/services/dailymaintenance


The following table summarizes the request parameters.

Table 7-2 Parameters

Name Description Type Required Default
api_version Specific API version Path Yes None


Supported Media Types: application/json

Table 7-3 Parameters

Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
items Detailed information about the API
amwTime Scheduled time for the daily maintenance window time in 24 hour format. The time is provided with respect to the existing time zone.
buildVersion Current build version
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible value: self
data Parameters as key value pairs passed in the request

Example of Response Body

The following shows an example of the response body in JSON format.


Get Build Version and Daily Maintenance Time Sample Code

Example 7-1 Java Sample –

Prerequisites: json.jar

Common Functions: See Common Helper Functions for Java

public void getMaintenanceDetails () throws Exception {
	String urlString = String.format("%s/interop/rest/v1/services/dailymaintenance", serverUrl);
	String response = executeRequest(urlString, "GET", null);
	JSONObject json = new JSONObject(response);
	int resStatus = json.getInt("status");
	if (resStatus == 0) {
		JSONArray fileList = json.getJSONArray("items");
		System.out.println("List of items are :");
		JSONObject jObj = null;
		for(int i=0; i<fileList.length(); i++){
			jObj = (JSONObject)fileList.get(i);
			System.out.println("build version :" + jObj.getString("buildVersion"));
			System.out.println("AMW time :" + jObj.getString("amwTime"));
			System.out.println("Link :" + ((JSONObject) ((JSONArray)json.getJSONArray("links")).get(0)).getString("href") + "\n");
// END

Example 7-2 cURL Sample –

Prerequisites: jq (

Common Functions: See Common Helper Functions for cURL

funcGetMaintenanceDetails () {
	funcExecuteRequest "GET" $url

	output=`cat response.txt`
	status=`echo $output | jq '.status'`
	if [ $status == 0 ]; then
		echo "List of items :"
		count=`echo $output | jq '.items | length'`
		while [ $i -lt $count ]; do
			echo "Build Version : " `echo $output | jq '.items['$i'].buildVersion'`
			echo "AMW Time :" `echo $output | jq '.items['$i'].amwTime`
			echo "Link :" `echo $output | jq '.links[0].href'`
			echo ""
			i=`expr $i + 1`
		error=`echo $output | jq '.details'`
		echo "Error occurred. " $error
	funcRemoveTempFiles "respHeader.txt" "response.txt"

Example 7-3 Groovy Sample – GetMaintenanceDetails.groovy

Prerequisites: json.jar

Common Functions: See CSS Common Helper Functions for Groovy

def getMaintenanceDetails () {
	def url;
	try {
			url = new URL(serverUrl + "/interop/rest/v1/services/dailymaintenance ")
	} catch (MalformedURLException e) {
			println "Malformed URL. Please pass valid URL"
	response = executeRequest(url, "GET", null);
	def object = new JsonSlurper().parseText(response)
	def status = object.status
	if (status == 0 ) {
		def items = object.items
		println "List of items :"
			println "Build Version : " + it.buildVersion
			println "AMW Time : " + it.amwTime
			println "Link : " + it.links[0].href + "\n"
	} else {
		println "Error occurred while listing versions"
		if (object.details != null)
				println "Error details: " + object.details