Discussions

 View Only
Expand all | Collapse all

JSON Handler - Max JSON size exceeded

  • 1.  JSON Handler - Max JSON size exceeded

    Posted 18 days ago
    Edited by Michael White 18 days ago

    Hello all.

    I wonder if anybody could offer any advice on a problem i'm having please?

    I have set up an 'Fetch a JSON resource' in pipelines, which is to a third party ID check. Prior to the candidate completing the ID check I can fetch the JSON data and import it into QB through Pipelines. However, once the candidate completes the ID check the JSON contains considerably more fields and when I try to 'Fetch a JSON resource' I get a validation error.

    Validation error: Maximum JSON size exceeded

    Is there any way in which I can overcome this please? Here is an example of what is in the JSON.

    [
      {
        "id": "e4x69a61-07mp-46le-aj80-0c52f12a673e",
        "data": {
          "pseudonym": "ANON-e2x0a6mp-37l0-42ps-94ef-u69755438d3o",
          "product_name": "Test Product",
          "status": "completed",
          "purchase_start_date": "2022-03-16T09:33:52Z",
          "purchase_completed_date": "2022-03-16T09:33:52Z",
          "date_of_birth": "1974-01-17",
          "first_name": "JOHN",
          "gender": "-",
          "surname": "DOE",
          "liveness_verified_selfie_1": [    "iVBORw0KGgoAAAANSUhEUgAAAJYAA...MTkrMDA6MDDuShMbAAAAAElFTkSuQmCC\n"],
          "liveness_verified_selfie_2": [      "iVBORw0KGgoAAAANSUhEUgAAAJYAA...R24Ac1JHQrqQcwcAAAAASUVORK5CYII=\n"],
          "driving_licence_hd_attachment": null,
          "id_card_hd_attachment": null,
          "passport_hd_attachment": [        "iVBORw0KGgoAAAANSUhEUgAAAJYAA...MTkrMDA6MDDuShMbAAAAAElFTkSuQmCC\n",        "iVBORw0KGgoAAAANSUhEUgAAAJYAA...R24Ac1JHQrqQcwcAAAAASUVORK5CYII=\n"],
          "age": 49,
          "age_is_18_plus": true,
          "driving_licence_attachment": null,
          "driving_licence_expiration_date": null,
          "driving_licence_number": null,
          "driving_licence_state": null,
          "driving_licence_verified_at": null,
          "full_name": "GARY GIRAFFE",
          "id_card_attachment": null,
          "id_card_expiration_date": null,
          "id_card_number": null,
          "id_card_state": null,
          "id_card_verified_at": null,
          "liveness_verified_selfie_1_at": "2023-04-11T11:17:03.386Z",
          "liveness_verified_selfie_2_at": "2023-04-11T11:17:03.386Z",
          "middle_name": null,
          "passport_attachment": [        "iVBORw0KGgoAAAANSUhEUgAAAJYAA...MTkrMDA6MDDuShMbAAAAAElFTkSuQmCC\n",        "iVBORw0KGgoAAAANSUhEUgAAAJYAA...R24Ac1JHQrqQcwcAAAAASUVORK5CYII=\n"],
          "passport_expiration_date": "2028-07-09",
          "passport_number": "1234567890",
          "passport_state": "accepted",
          "passport_verified_at": "2022-01-20T09:10:25.154Z"
        }
      }
    ]

    Thank you,

    Michael



    ------------------------------
    Michael White
    ------------------------------



  • 2.  RE: JSON Handler - Max JSON size exceeded

    Posted 14 days ago

    Does the API you're calling have additional parameters where you can limit/query only for certain fields? If so, I would try and minimizing the scope of your JSON response in the call itself only to the necessary fields and make sure that your query is only for a single object. Your only real avenue with how you're trying it is to minimize the response and get the size down. 

    The only other idea I can imagine is to forego using the JSON resource fetch and use the generic webhook to get the info, in my experience the parsing of that response is reasonably the same but I've never had it return payload size issues. 



    ------------------------------
    Chayce Duncan
    ------------------------------



  • 3.  RE: JSON Handler - Max JSON size exceeded

    Posted 13 days ago

    Hi Chanyce.

    Thank you for the reply.

    I have been trying to limit the payload, but i'll be honest I've no idea how to do that.

    You can see from below the size of each 'item'. I don't actually need the four large images which are causing the issue, but i've no idea how i can call the payload just for the other items.

    Here is how i've set all the fields in the JSON handler 'fetch' request.

    Have you got any ideas please?

    Many thanks,

    Michael



    ------------------------------
    Michael White
    ------------------------------



  • 4.  RE: JSON Handler - Max JSON size exceeded

    Posted 13 days ago

    Can you tell me what system you're trying to integrate with so I can take a look at the documentation and see if there is a way to limit the scope?



    ------------------------------
    Chayce Duncan
    ------------------------------



  • 5.  RE: JSON Handler - Max JSON size exceeded

    Posted 13 days ago

    Hi Chayce.

    The third party is Digidentity. The documentation can be found here: https://docs.digidentity.com/#aae3b6c2-c2b0-4250-9335-9a402eaf3dbd

    It's under 'Onboarding', 'One-time verification', 'Retrieve report'. 

    Thank you,

    Michael



    ------------------------------
    Michael White
    ------------------------------



  • 6.  RE: JSON Handler - Max JSON size exceeded

    Posted 13 days ago

    From reading through the docs on that call and looking at others, the only thing that might work is to alter the scope when you're getting the credentials. I can't find anything specific to that report request you're doing, but thats the only place where it would be possible to alter the response potentially but also changing it might interfere with the ability in general just to get the report you're querying. 

    '

    The only other thought might be to try to use the Webhook Channel / Make Request step. The general setup will be identical to what you're currently doing with the JSON request, but it might not come with the same response payload max size.



    ------------------------------
    Chayce Duncan
    ------------------------------



  • 7.  RE: JSON Handler - Max JSON size exceeded

    Posted 13 days ago

    Hi Chayce.

    Thank you again for your time to look at this, I really appreciate it.

    Unfortunately, I have only been provided with one scope code :(, so I don't think there is anything I could do with that. Do you think there is any way in which I could limit/customise the payload by entering anything in the request body?

    As regards the 'Make Request' channel, I have tried this already. For smaller payloads I am unable to work out how to get the data I want (i've tried multiple formats). Here is an example of what is returned:

    If I use {{b.json}} it populates the field in QB with this (example)

    [{"id":"ef72561a-2b96-45d0-a3c2-8743f0819612","data":{"pseudonym":"ANON-bf210fcd-49ff-4dac-9264-5d7522f212bf","product_name":"eID Substantial (anoniem)","status":"pending","purchase_start_date":"2023-09-08T08:08:02Z","purchase_completed_date":null}}]

    If i try to amend to {{b.json.data}} or {{b.json.status}} or {{b.json_data}} or {{b.json_data.status}} I don't get any data returned in the field.

    What would I need to just ectract the 'status' to populate a QB field please?

    As regards size, it would appear that there is a size restriction on webhook, although I don't know what it is. If I try and GET a completed ID check I get an error message saying the object has exceeded the maximum limit.

    I do have the option to GET a pdf report (metadata report) by using the same link and credentials but replacing .json? in the url to .pdf? However, If I try this using webhook 'Make Request' it returns the following:

    Is there any other channel I could use to GET the pdf report? I would need to include a header with the Authroization token.

    Thank you,

    Michael 



    ------------------------------
    Michael White
    ------------------------------



  • 8.  RE: JSON Handler - Max JSON size exceeded

    Posted 13 days ago

    Michael,

    This might be of use to you when you are trying to get a value from the response:

    To capture an XML response from an API in Pipelines | Discussions (quickbase.com)

    maybe {{ b.json["status"] }}?



    ------------------------------
    Tim D
    ------------------------------



  • 9.  RE: JSON Handler - Max JSON size exceeded

    Posted 13 days ago

    Its hard to be 100% confident if that truly is the JSON format or just Pipelines displaying it but your JSON looks like: 

    json: [

         {

              data: {},

              id: "",     

         }

    ]

    So going from your screenshot and the assumption that the above is the right response format you'll have to get Status by using {{b.json[0]["data"]["status"] }}. You JSON response is an array so you'll need to target the 0 index to get the actual object you're targeting and then you can grab the value of status from the data object. 

    As for the problems you're citing with the payload and the PDF still being too large, the only two channels that can make a generic API call are the webhook and JSON channels. Are these the only two calls that have the data you need related to the process you're building? Is there something where you could query a user profile and backdoor your way into a smaller API response that gets you what you need regardless?



    ------------------------------
    Chayce Duncan
    ------------------------------



  • 10.  RE: JSON Handler - Max JSON size exceeded

    Posted 12 days ago

    Hi Chayce.

    Thank you again for the response, I will give this a go later and see what happens. I will also look to see if there are any other API calls I could possibly use as a 'back door'.

    This is what the actual RAW data looks like. I've copied this from Postman (which works), although i've only copied the first few lines as the full payload, when pasted into MS Word is nearly 1800 pages long :(

    [{"id":"000a7a8c-15d5-4a89-b600-d2537f4c4d55","data":{"pseudonym":"ANON-a9c36292-1232-40ea-85df-19322aff4137","product_name":"eID Substantial (anoniem)","status":"completed","purchase_start_date":"2023-09-08T11:38:46Z","purchase_completed_date":"2023-09-11T10:42:25Z","age":49,"age_is_18_plus":true,"date_of_birth":"1973-11-03","driving_licence_attachment":["iVBORw0KGgoAAAANSUhEUgAAAOEAAAEsCAIAAAC60EPzAAAAIGNIUk0AAHom\

    Thanks,

    Michael



    ------------------------------
    Michael White
    ------------------------------



  • 11.  RE: JSON Handler - Max JSON size exceeded

    Posted 12 days ago

    Thank you Tim :)

    I will take a look at that link and let you know how I get on.

    Thanks,

    Michael



    ------------------------------
    Michael White
    ------------------------------