Skip to Content

REST API Error while working with SAP Cloud Platform Predictive Service

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Oct 24, 2017 at 03:11 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 25, 2017 at 04:51 PM

    Hi Gentlemen,

    Thanks a lot for your answers.

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

    Regards,

    Pavan.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 25, 2017 at 09:33 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 23, 2017 at 02:53 PM

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

    Add comment
    10|10000 characters needed characters exceeded