Trimming PDF file details in API request payload

Hi,

We’re sending a pdf via a Liberty Create API. Its content floods the request payload field on the API requests object and the rest of the payload is not visible. Is it possible to trim/control the display of this in any way ?

Thanks,

Mark

Hi Mark,

You are able to apply a max characters setting to the property to truncate down to something more manageable.

image

It is normally good practice to avoid having any property with the potential for large sets of data being used in lists as you get the symptoms you are seeing. Some alternatives to keep the full detail:

In 24.1 the platform added a new element “Dropdown Subpage” which will allow you to create a sub page with your payload information in and this becomes a clickable lick which will produce a popover with the detail in.

Here at Netcall, we will typically build a pop up page which you can view the full API detail. This is normally structured like the following.

In the most extreme case, you could develop a custom presenter to truncate to x characters then include a mouseover to expand the detail.

Hope this helps.

Carl

Thanks Carl,

The max chars reduces the amount of text, but only that. The rest of the request payload is still obscured by the pdf output.

Thanks for the other options: I’ll give them a bit of thought.

Kind regards,
Mark

When sending a file, the payload is sent in a different format to normal (multipart form-data rather than JSON) and is “URL encoded”. So you could use a composite to URL decode the payload into something that is a bit more “human readable”.

In the example below you will see the before and after of doing this.

The payload may still be large though, so as Carl says you probably still want to hide this away in a popup/focus widget/subpage dropdown etc, so that you’re not showing the full contents in the list itself, until you select a request of interest.

1 Like