cancel
Showing results for 
Search instead for 
Did you mean: 

Response truncated when calling API from SAP Build APPS button

geetbijlani
Participant

Dear All,

 

I am stuck at the final step of my APP. I am able to test the API successfully from POST MAN and also from the Data tab in SAP Build Apps.

The API call: get the context of the workflow which contains an automation which returns a URL of a pdf document.

https://api.sap.com/api/SPA_Workflow_Runtime/path/get_v1_workflow_instances__workflowInstanceId__con...

 

2024-02-09 09_24_54-SAP Business Accelerator Hub.png

The API response in the data tab of SAP Build Apps:

The property: pdfUri is the one that I need.

APIResponseSAPBUild.png

The same when called in Build Apps on click of the Get File button, I only get the "startEvent" object but the second object containing pdfUri is missing:

2024-02-02 17_04_14-SAP Build Apps_1.png

 

Response in developer tools:
{
"status": 200,
"statusText": "OK",
"headers": {
"cache-control": "no-cache, no-store, max-age=0, must-revalidate",
"content-type": "application/json",
"date": "Fri, 02 Feb 2024 16:02:18 GMT",
"expires": "0",
"pragma": "no-cache",
"referrer-policy": "no-referrer",
"server": "SAP",
"vary": "accept-encoding",
"x-content-type-options": "nosniff",
"x-correlationid": "fc5f61f2-bb45-4c79-4672-2954529b364c",
"x-frame-options": "DENY",
"x-ratelimit-burst-capacity": "200",
"x-ratelimit-remaining": "178",
"x-ratelimit-replenish-rate": "150",
"x-ratelimit-requested-tokens": "1",
"x-vcap-request-id": "fc5f61f2-bb45-4c79-4672-2954529b364c",
"x-xss-protection": "1; mode=block",
"strict-transport-security": "max-age=31536000; includeSubDomains; preload;",
"connection": "close"
},
"responseText": "{\"startEvent\":{\"clientid\":\"masked\",\"lastname\":\"Dsa\",\"firstname\":\"Ron\",\"issuedate\":\"2023-12-12\",\"clientsecret\":\"masked\"}}"
}

 

Could you please let me know what am I doing wrong here. I believe this is obviously a small thing but I cannot put my head around it.

 

Thanks in advance !

Best Regards,

Geet

View Entire Topic
geetbijlani
Participant
0 Kudos

The issue is now resolved. I figured out that I was checking the context of triggered workflow a bit too early in the flow. Putting a delay in the flow worked out for me.

 

Thanks,

Geet