Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

128
Views
How to pass url dynamically to rest api?

I need to pass the get api urls for fetch the data from one application to another application. I have temporary solution as the url details in queryParams and use it in another application. Is there any professional way to implement for build url with dynamically?

In my first application i have build the url as below

async buildUrl(applicationId, getUrl) {
        let url = this.filterBaseurl + `datafilter/get-filter-utility?entityId=${applicationId}&connectorName=${this.connectorName}&entityName=${this.entityName}&getUrl=${getUrl}`
        return url
    }

example result of above function is

${baseUrl}/datafilter/get-filter-utility?entityId=12345678&connectorName=greenhouse&entityName=engagement-request&getUrl=jobs

in my another application i have calling the required api url

let queryparams = req.queryParams
let url = ${queryparams.getUrl}/{queryparams.entityId}
let response = await this.restProvider.get(url)

the way i have implement with queryParams is unprofessional, is there any better way to build the api url dynamically. one difficulty is i shouldn't call second application's api endpoint from first application.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Something like this?

var x1 = new URL("https://example.org")
x1.searchParams.append("x", "y")
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!