URL
Introduction
The endpoint URL
page is used to define the HTTP method and URL to be used, and any required/optional URL parameters:

Endpoint URL
To add an endpoint URL, you must select the appropriate HTTP method
:

...and then add the required URL
:

The maximum number of characters for an endpoint URL is 255. If you require a longer URL, consider defining elements as parameters.
Endpoint parameters
You can define two types of parameters:
Required parameters are added as key pairs and are always applied for the endpoint, whenever it is used. Use the top panel to add the required parameters.
Optional parameters are displayed as connection shape filters, so users can apply their own values when using this endpoint as a data source in process flows. Use the lower panel to add optional parameters.
Any parameters you add (to either panel) here are automatically appended to the existing endpoint URL as a query parameter when this endpoint is used in process flows.
Required parameters
If you have parameters that must always be passed in the endpoint request URL, add them to the top panel. Any required
(i.e. default) parameters are added as key pairs, and are passed straight into requests - users are never asked to provide values for these in process flows.
In the example below, our endpoint URL is set to GET
all products, but we are adding a default URL parameter to add a query which will only retrieve products with a product_type
of snowboard
:

By adding this as a required
parameter for the endpoint, this query will be applied whenever this endpoint is added to process flows (via a connection shape). So, for our example, the actual endpoint used will be:
https://parseapi.back4app.com/classes/product?product_type=snowboard
Optional parameters
Optional
parameters are available for your users to update with their own required values, in process flows.
If we consider the example above, we are always restricting our 'GET all products' endpoint to return only products with a product_type
of snowboard
. But suppose we wanted to allow users to choose a product_type
at the point they are running a process flow?
When a process flow includes a connection shape which is configured to use this endpoint, users can see/update filter fields for any optional
URL parameters defined for the endpoint. For example, let's add an optional parameter for product_type
:

Now, if we configure a process flow connection shape with this endpoint, a product_type
filter option is available, so the person running this flow can choose to use it if they wish:

When a process flow runs for this connector, associated API requests are injected with the user-provided URL parameter value wherever a {{product_type}}
parameter is found.
What if I want to force users to enter their required value for a URL parameter?
Optional URL parameters are just that - process flow users can choose to add a parameter value if they wish. If a user doesn't choose to update an optional URL parameter field, then no query is applied.
However, there may be scenarios where you need to ensure that a URL parameter is always provided by users running a process flow. For this, a slightly different approach is needed - in this case, you would follow the steps below.
Add a required endpoint variable
Add a 'required' endpoint variable for the field that you want to force users to update in process flows.
Update the endpoint URL
Update the endpoint URL to include a query for this variable.
Add a default URL parameter
Add a default URL parameter, specifying your endpoint variable (added in step 1) as the parameter value.
Now, when a user adds this endpoint to a connection shape in a process flow, they must update this variable field before proceeding.
More information
Techniques for adding URL parameters are the same as all other types of parameters that you may encounter in the connector builder. For information, please see Working with parameters.
Last updated