Maximo see response from publish channel json request - maximo

I have a publish channel for which I've added a Json Mapping in order to send Json Format to the endpoint defined. The issue I'm facing is that when the response message is an error I cannot see the response body that contains the reason of the error. Anyone has any idea on how I can see the error description that can be found in the response body ?

Related

Getting INVALID_REQUEST_BODY error on accessing create_template_view api

I am trying to access the api TemplateViews : createEdit using python docusign_esign api as below
api_client = ApiClient(header_name="Authorization", header_value=f"Bearer {access_token}",
host="https://demo.docusign.net/restapi/")
TemplatesApi(api_client).create_edit_view(account_id=account_id, template_id=template_id)
while accessing the create_edit_view I am getting the error as
"errorCode":"INVALID_REQUEST_BODY","message":"The request body is missing or improperly formatted."
when checked in the API explorer, I am able to get the response URL correctly. I found only the accountId and templateId is mandatory for accessing the api, am I missing something else here?
https://developers.docusign.com/docs/esign-rest-api/sdk-tools/python/reference/docusign_esign/apis/templates_api.html#docusign_esign.apis.templates_api.TemplatesApi.create_edit_view
You need to provide a return_url, it's a URL that your embedded sender will be redirected back to when they finished editing/creating the template.
This is a POST and this URL is provided in the body as JSON, not in the URL as a parameter.
https://developers.docusign.com/docs/esign-rest-api/reference/templates/templateviews/createedit/

Create and send an envelope from a template in docusign restapi v2.1 issue

I have created postman request to create and send envelop from template.
After sending it's returning this error
HTTP Error 400. The request URL is invalid.
Here is my postman request data
URL:https://demo.docusign.net/restapi/v2.1/accounts/xxxxxxxx/envelopes
Method: POST
Body:
{
"templateId":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"templateRoles": [
{
"email":"test#gmail.com",
"name":"Tester",
"roleName":"signer3"
}
],
"status":"sent"
}
What can be the issue?
Here is the documentation link
I see nothing wrong above. You can see the full How to send an envelope with a template article.
Please confirm your accountId is correct where you have xxxxxxxx.
Please also see if you can use any URL for API calls.
A 400 error indicates there was something going on with the request. Can you turn on your API logging and see if you can reproduce the error? I agree with Inbar, I don't immediately see anything out of alignment. https://support.docusign.com/en/guides/ndse-user-guide-api-request-logging
If you could send the resulting log file along with a copy of your template to matt.king#docusign.com we can have a closer look.

Body of response with statuscode 401

I'm trying to enable some kind of "voice unlinking" (which should remove the access token from the google assistant) for my google action. I'm using the webhook fulfillment via Dialogflow and I'd like to send a response text like "Okay, your account linking got removed."
To do so, I'm currently trying to send a response using the status code 401, but it seems that my response body gets either ignored by the assistant or filtered along the way.
So my question is:
Is there a way to add any body information to a response with status code 401 or are there other ways to achieve the removing of access tokens via response?

Azure Notification Hub: The supplied notification payload is invalid

I'm trying to send a JSON notification to APNS and when I try to send it I'm getting 400 Bad Request with the error message:
The supplied notification payload is invalid.
Here is my Notification JSON:
{"uri":"myApp://test","type":"test_push","badge":1,"content-available":1}
I create the notification like this:
notif = new AppleNotification(json);
I'm sending the notification:
client.SendNotificationAsync(notif, "myTag")
After that, I'm getting the error. The content type is application/xml by default, after I got the error, I've started setting the content type to application/json but nothing changed.
What am I doing wrong?
UPDATE: My hub and certificates are installed correctly; I can send a successful test notification through Azure Portal.
Can,
Your payload is malformed, please try with the following:
{"aps":{"uri":"myApp://test","type":"test_push","badge":1,"content-available":1}}
After playing with the test push sending on Azure Portal, I've discovered the problem myself: Notification Hub wasn't accepting the JSON if it wasn't already wrapped in aps object. I've changed the JSON to be sent as:
{aps: {"uri":"myApp://test","type":"test_push","badge":1,"content-available":1} }
and now it's working. I thought it was auto wrapping, but apparently it isn't.
You can escape special characters using \. See in example below I have used double quote for word Hub which escape using \.
{"aps":{"alert":"Notification \\\"Hub\\\" test notification"}}

Logic App Send Message error with JSON

I'm using Logic App to send a message to a service bus on Azure. The logic app starts with a HTTP Request for the trigger which contains a JSON payload in the body. The 'Body' of the request is set as the Content of the Send Message action. Since the payload is JSON when posting I set the Content-Type to application/json. This generates an error on the Send Message action;
{"code":"InvalidTemplate","message":"Unable to process template language expressions in action 'Send_message.' inputs at line '1' and column '1221': 'The template language function 'encodeBase64' expects its parameter to be a string. The provided value is of type 'Object'. Please see https://aka.ms/logicexpressions#encodeBase64 for usage details.'."}
So tried changing the Content-Type to text/plain and it works? Is this a bug or should convert the JSON to a text value somehow before using it in the Send Message action?
Sending a message to service bus requires the message content to be base64 encoded. Since your content is a JSON, you would need to stringify it explicitly prior to encoding, i.e. use #encodeBase64(string(jsonContent))
Changing the content type to text/plain has the same effect, since in that case the content is treated as a string to begin with.

Resources