API url

Hi All,

I am doing a http GET request using below url where aIp8Y000000GpIhSAK may vary everytime . I have captured that in variable quote_num , how the final url will be with variable

https://databricks--uat2.sandbox.my.salesforce.com/services/data/v54.0/query/?q=select+ContentDocument.LatestPublishedVersionId+from+ContentDocumentLink+WHERE+LinkedEntityId+=+‘aIp8Y000000GpIhSAK’+ORDER+BY+ContentDocument.LastModifiedDate+DESC+LIMIT+1

@Anil_G any help on this?

Hi @dutta.marina

Try this:

quote_num = "aIp8Y000000GpIhSAK"

apiUrl = "https://databricks--uat2.sandbox.my.salesforce.com/services/data/v54.0/query/?q=select+ContentDocument.LatestPublishedVersionId+from+ContentDocumentLink+WHERE+LinkedEntityId+=+'" + quote_num + "'+ORDER+BY+ContentDocument.LastModifiedDate+DESC+LIMIT+1"

Hope it helps!!

Hi @dutta.marina

Assign urlTemplate = "https://databricks--uat2.sandbox.my.salesforce.com/services/data/v54.0/query/?q=select+ContentDocument.LatestPublishedVersionId+from+ContentDocumentLink+WHERE+LinkedEntityId+=+'{0}'+ORDER+BY+ContentDocument.LastModifiedDate+DESC+LIMIT+1"

Assign quote_num = "aIp8Y000000GpIhSAK"

@Parvathy

I am getting error below

@pravallikapaluri

what you have taken final url ?

@dutta.marina

Sorry,Check the below one

finalUrl="https://databricks--uat2.sandbox.my.salesforce.com/services/data/v54.0/query/?q=select+ContentDocument.LatestPublishedVersionId+from+ContentDocumentLink+WHERE+LinkedEntityId+=+'" + quote_num + "'+ORDER+BY+ContentDocument.LastModifiedDate+DESC+LIMIT+1"


1 Like

Hi @dutta.marina

Can you share the JSON file that you are using?

Regards

@Parvathy

I am trying to re[licate this from postman and want to get latestpublished version Id from quoteid whicg is aIp8Y000000GpIhSAK’

@Parvathy


I am getting invalid session id. I am increased the Time Out also to 60000

Hi @dutta.marina

Can you try using Deserialize JSON Array activity.

Regards

@dutta.marina

Can you please show the json string you are trying to deserialize?

Cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.