on 2022 Feb 25 8:14 AM
Hi All,
We are trying to trigger OAUTH2.0 API from DI Intelligence, by using openAPI client operator.
we have provided necessary configuration details such as Oauth2 toekn, client ID client secret etc, but this API also requires body while triggering the API.
No configuration option is available for providing the body in Open API client, so we have a JAVA script operator preceding the open API client wherein we are providing msg.body.
while executing the pipeline we are getting
please do let us know, if someone has experienced the similar issue and how did you resolve it
Thanks
Priyanka Kes
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The message structure is case-sensitive so if you want to refer to the attributes or body then you have to specify it as msg.Body or msg.Attributes.
Here is an example:
function onInput(ctx,s) {
var msg = {};
msg.Body = { "my_json_data": "data" };
msg.Attributes["openapi.consumes"] = "application/json";
msg.Attributes["openapi.produces"] = "application/json";
msg.Attributes["openapi.method"] = "POST";
msg.Attributes["openapi.path_pattern"] = "/v1/some/path";
$.output(msg);
}
Hope this makes more sense.
Thanks
Lochner
Hi,
How you found configuration details like Oauth token..?
Did you use any SAP tool..?
Thanks.
Deepak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
30 | |
9 | |
7 | |
7 | |
6 | |
6 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.