Use properties for endpoint base URL and credentials

Created on 5 June 2023, over 1 year ago

Problem/Motivation

If you have multiple forms and handlers in your application, it would be useful to save base URLs and credentials as globally editable variables since you might have a dev/testing/production environments. It becomes cumbersome to edit each form for each environment, or if credentials change, editing multiple form handlers. APIs often have a shared base URL and credentials, and then each endpoint is customized using references to the base endpoints.

Steps to reproduce

Proposed resolution

Perhaps create a base endpoint resource that can be referenced by each handler, splitting baseURL from endpoint (https://myapi.com/users -> resource[https://myapi.com] and endpoint "/users"). Also saving credentials per baseURL would be useful.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States depsumd

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @depsumd
  • Status changed to Closed: works as designed 6 days ago
  • πŸ‡΅πŸ‡ΉPortugal joaomarques736

    Hi depsumd,

    Regarding the endpoint, it is possible to use drupal tokens in the endpoint field. You can create your custom token to get the appropriate base domain URL, and add the token to the endpoint field.
    For the credentials, we don't have any plan currently to change the behaviour, please feel free to provide a patch with that functionality if you need, reopen this issue with the patch and then we can add to the module.

    Best regards and thanks for your contact!

Production build 0.71.5 2024