Skip to Content
0

REST API Error while working with SAP Cloud Platform Predictive Service

Oct 23, 2017 at 01:14 AM

70

avatar image

Hi All,

I am working on the tutorial https://youtu.be/JxuJ5OzD8Yg (SAP HANA Academy - HCP Predictive Services: Recommendations (Trial Edition)). As mentioned in the tutorial I typed the code

{

"hanaURL": "PS_DATA/CUST_TRANSACTIONS"

}

and then hit on Post. And after hitting Post I am getting the status 400 as against Status 200.

Status 400 is an error code whose description is given in the screen shown below and the message given after the screen below:

Status 400

An error has occurred. It can be due to wrong settings or issues in the dataset.

For more information, see the list of error codes in the SAP Cloud Platform Predictive service User Guide.

Body application/json

{
	"$schema" : "http://json-schema.org/draft-03/schema#",
	"type" : "object",
	"properties" : {
		"errors" : {
			"description" : "List of error messages",
			"type" : "array",
			"items" : {
				"type" : "object",
				"properties" : {
					"errorCode" : {
						"type" : "string",
						"required" : true
					},
					"errorMessage" : {
						"type" : "string",
						"required" : true
					}
				}
			},
			"minItems" : 1,
			"required" : true
		}
	}
}

Can you please explain me how to fix this error?

Thank you.

Regards,

Pavan.

wvsn3.png (38.4 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Abdel DADOUCHE
Oct 24, 2017 at 03:11 PM
0

Hi PAVAN SAPHANA,

My guess is that the video produced by @Philip MUGGLESTONE is simply outdated.

As per the documentation (link), you should be using the following input:

{
 "location" : {
     "schema":"PS_DATA",
     "table":"CUST_TRANSACTIONS"
    }
}

Regards

@bdel

Share
10 |10000 characters needed characters left characters exceeded
PAVAN SAPHANA Oct 25, 2017 at 04:51 PM
0

Hi Gentlemen,

Thanks a lot for your answers.

Abdel DADOUCHE Yeah even I used the same code later on and it worked.

Regards,

Pavan.

Share
10 |10000 characters needed characters left characters exceeded
Thierry BRUNET
Oct 25, 2017 at 09:33 AM
0

Hi,

You should have "hanaURL" with double-quote aground. This explains the error.

The videos of SAP HANA Academy have been done just after release 1.x of Predictive Services and have not been updated.

Note that in the documentation this syntax is marked as deprecated. This means that even if it continue to work, it is advised to use the new syntax.

Best regards

Thierry

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Thierry,

I am a novice to JSON and REST API. When you say "Note that in the documentation this syntax is marked as deprecated" which documentation are you referring to? Is it the one given in the link, "https://aac4paservicesp13613784trial.hanatrial.ondemand.com/com.sap.aa.c4pa.services/raml/console/index.html?raml=../api/aa-cloud-services.raml##api_analytics_dataset_sync"

From where do I get the new syntax to be used while trying to learn watching these videos as I am now stuck at the 2nd video?

Please share any pdf or any link to the same.

Thank you.

Regards,

Pavan.

0
Antoine CHABERT
Oct 23, 2017 at 02:53 PM
0

Hi, maybe Philip MUGGLESTONE Abdel DADOUCHE or Thierry BRUNET can help? Thanks & kind regards Antoine

Share
10 |10000 characters needed characters left characters exceeded