Provide Feedback

This feedback service sends feedback or reports an issue to Oracle. This API is version 11.1.2.3.600.

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

Provide Feedback

Sends feedback or reports an issue to Oracle.

REST Resource

POST /interop/rest/{api_version}/feedback

Request

Supported Media Types: application/json

Parameters:

The following table summarizes the client request.

Table 6-33 Parameters

Name Description
details Published in case of errors with the error string
status See Migration Status Codes
items Details about the resource
issueRef Feedback reference to contact Oracle support
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:

Supported Media Types: application/json

Example of Response Body:

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

{
	"details":null,
	"status":0,
	"items":[{"issueRef":"UDR_default_fin_superuser_2015_09_14_11_10_18"}],
	"links":[{
		"data":null,
		"action":"POST",
		"rel":"self",
		"href":"https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/{api_version}/feedback"
	}]
}

Provide Feedback Sample Code

Example 6-26 Java Sample – ProvideFeedback.java

Prerequisites: json.jar

Common Functions: See Common Helper Functions for Java

//
// BEGIN - Provide Feedback
//
public void provideFeedback(String description) throws Exception {
	JSONObject params = new JSONObject();
	JSONObject config = new JSONObject();
	config.put("URL",serverUrl);
	params.put("configuration",config);
	params.put("description",description);

	String urlString = String.format("%s/interop/rest/%s/feedback", serverUrl, lcmVersion);
	String response = executeRequest(urlString, "POST", params.toString(), "application/json");
	JSONObject json = new JSONObject(response);
	int resStatus = json.getInt("status");
	if (resStatus == 0) {
		System.out.println("Feedback successful");	
	} else {
		System.out.println("Error occurred: " + json.getString("details"));
	}
}
//
// END - Provide Feedback
//

Example 6-27 cURL Sample – ProvideFeedback.sh

funcProvideFeedback() {
	url=$SERVER_URL/interop/rest/$LCM_VERSION/feedback
	description=$(echo $1 | sed -f urlencode.sed)
	param="{\"configuration\":{\"URL\":\"$SERVER_URL\"},\"description\":\"$description\"}"
	funcExecuteRequest "POST" $url $param "application/json"

	output=`cat response.txt`
	status=`echo $output | jq '.status'`
	if [ $status == 0 ]; then
		echo "Feedback successful"
    else
        error=`echo $output | jq '.details'`
        echo "Error occurred. " $error
    fi
	funcRemoveTempFiles "respHeader.txt" "response.txt"
}

Prerequisites: jq (http://stedolan.github.io/jq/download/linux64/jq)

Common Functions: See Common Helper Functions for cURL

Example 6-28 Groovy Sample – ProvideFeedback.groovy

def provideFeedback(description) {
	def url;
	JSONObject params = new JSONObject();
	try {
		JSONObject config = new JSONObject();
		config.put("URL",serverUrl)
		params.put("configuration",config);
		params.put("description",description);
		url = new URL(serverUrl + "/interop/rest/" + lcmVersion + "/feedback");
	} catch (MalformedURLException e) {
		println "Malformed URL. Please pass valid URL"
		System.exit(0);
	}
	response = executeRequest(url, "POST", params.toString(), "application/json");

	def object = new JsonSlurper().parseText(response)
	def status = object.status
	if (status == 0 ) {
		println "Feedback successful"
	} else {
		println "Error occurred while listing files"
		if (object.details != null)
			println "Error details: " + object.details
	}
}

Prerequisites: json.jar

Common Functions: See CSS Common Helper Functions for Groovy