cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic URL's in Build Process Automation

geetbijlani
Participant
0 Kudos

Dear All,

I am trying to achieve back to back API calls in SAP Build process automation but using only actions and not using the bot for web service calls in a sequence.

Here's the scenario:

1. The process starts with SBPA form, where the user enters the asset details.

2. The details have to be filled in a word template file and saved as a PDF on SharePoint online.

To achieve this , I am using "Adobe Document Generation API" https://developer.adobe.com/document-services/docs/apis/ which works  perfectly fine with the automation but since having an automation bot for a single small use case is not so cost effective. I would like to do the same using only the Build Process Automation process.

This process involves calling back to back API's. In one of the steps, I get the upload url from one of the "GET" calls and then I need to make a "PUT" to this received url . In this case the endpoint URL is not fixed and hence I am unable to proceed.

Using Automation artifact, it works as follows:

geetbijlani_0-1713435674561.png

 

In case of automation , my script does the job and then call webservice

return {
  method: 'PUT',
  url: UploadUri.uploadUri,<<<<<<<(URL received from the previous "GET" call)
  responseType: 'json',
  resolveBodyOnly: false,
  headers:
  {
    'Content-Type''application/vnd.openxmlformats-officedocument.wordprocessingml.document'
  },
  readFileAsBufferToBody: filePath
};
 

Additional Info:

The url looks like : 

We need to make a "PUT" call to this URL which is generated dynamically as an upload pre-signed url in the previous steps to upload our document to this asset location.
It would be great if you could point me in the right direction so that we achieve this with SBPA process only without using automation . Basically, if there is a possibility to pass the call as dynamic URL from SBPA process.
 
Best Regards,
Geet

Accepted Solutions (0)

Answers (3)

Answers (3)

Archana
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello @geetbijlani , 

API specification has to be there for any APIs or can be generated with any existing spec tools. Also, now you do not even need API spec, you can also create the API project from the scratch for such 3rd party APIs ( see the documentation here).

The dynamic part are nothing but the URL parameters which can be obtained from some service calls. Like in your case its security token and ID. Its is like https://<host>/{security-token}/{ID} where security token and ID can be mapped from the previous calls in the process. 

Hope that helps.
if not then raise a ticket on CA-AP-ACT

Regards,
Archana


Archana
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello @geetbijlani , 

It depends to what extent the URL is dynamic. Even if the URL is dynamic, the API specification should have some URL parameters which can be dynamically set. For example, here the task API where few parameters have to be provided as URL param - rest is the host which can be controlled via the destination. 

Hope that helps. 

Archana_0-1713791756596.png

 

geetbijlani
Participant
0 Kudos

Hi @Archana ,

Well in this case , as described above:

The url looks like : 

We need to make a "PUT" call to this URL which is generated dynamically as an upload pre-signed url in the previous steps to upload our document to this asset location. I am not sure if its possible to create an action project with this as part https://dcplatformstorageservice-prod-us-east-1.s3-accelerate.amazonaws.com/ stays generally constant followed by the security token and id. Also, how do we get API specification for the actions project for a url that being created dynamically.
 
Best Regards,
Geet
Archana
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello @geetbijlani

You can use process to call the APIs. For that, you have to create Action Project for the APIs and then call one after another in the process. Using Automation just for API calls are not recommended. I have used that in multiple projects, and it works as required. Let me know if that helps. 

Regards,
Archana

geetbijlani
Participant
0 Kudos

Hi @Archana ,

Thanks for your reply. I understand and have done the same.

However, the problem is to create an action project you need to have predefined API endpoint. In this case, I have a dynamic url generated in previous step which needs to be called and I do not find an option to call this url which cannot be done using Actions project.

Best Regards,

Geet