on 02-27-2018 11:10 AM
Hello,
i try to create a new query with the REST API.
The SAP documentation give my one example in XML but not in JSON. https://help.sap.com/viewer/58f583a7643e48cf944cf554eb961f5b/4.2.4/en-US/ec55543d6fdb101497906a7cb0e...
I tried to translate it in JSON
{ "query":
{ "dataSourceType": "unx",
"dataSourceId": "5808",
"querySpecification version": "1.0",
"queryData":
{ "resultObjects":
{ "resultObject":
{ "path": "Customer|folder\Geography|folder\City|dimension",
"id": "_IBo8L7IhEeCk0Ylv-tlF2Q" }
} } } }
But i dont find the righ methode :-(.
Does a document exist describing this?
Thank you in advance
Regards Christophe
Hi Christophe,
the json format is described in the following page of the documentation:
For the XML provided in the sample, the equivalent json would be
{
"query": {
"@dataSourceId": 5808,
"@dataSourceType": "unx",
"id": "5664484753352266247",
"querySpecification": {
"@version": "1.0",
"queryData": {
"resultObjects": {
"resultObject": [
{
"@id": "_IBo8L7IhEeCk0Ylv-tlF2Q",
"@path": "Customer|folder\\Geography|folder\\City|dimension"
},
{
"@id": "_IBo8OrIhEeCk0Ylv-tlF2Q",
"@path": "Customer|folder\\Customer|dimension"
},
{
"@id": "_IB8eFrIhEeCk0Ylv-tlF2Q",
"@path": "Inventory|folder\\Stock Level|measure"
}
]
}
}
}
}
}
For the above, I just created a query with the XML sample and then retrieved it using application/json in the Accept header.
Dan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This search term gives all BOE APIs added in API hub.
https://api.sap.com/shell/discover?defaultTab=all&search=Businessobjects
Note: Not all APIs added here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SAP API Business Hub:
https://api.sap.com/shell/discover/contentpackage/WebIntelligenceRESTfulAPI
This provides all required info about the APIs.
-
Bharath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Thank you!!! 🙂
It's work!
Regards Christophe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is no official documentation for JSON request and Response.
One simple way is :
Hit API GET method and JSON format.
Replicate same JSON object in the Request.
-
Bharath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.