Editing REST parameters

Once you have imported a REST data source, you can add, edit and delete one or more required parameters using the Edit Data Source page.

When setting up a data source, you can define any of the available parameters for a data source. However, you are REQUIRED to connect only the parameters that are actually required by the API endpoint. Consequently, any parameter you leave empty on the Mapping dashboard will be ignored by Xapix. In other words, empty parameters will not be sent by Xapix.

For REST data sources, you can set the following parameters:

When you set a parameter, you also set the value type.

REST data sources parameters section

Value type

You must set a parameter's value type as part of its definition. When you specify a value type, any input to that parameter will be coerced or forced into the specified type. For example, if the input is "4" (as a String) but you specify float_type, it will become 4.0.

If the input cannot be coerced into the specified type, the pipeline execution will abort. For example, the input string "hello" cannot be coerced into an integer or float type.

Another use case is If you are expecting a field such as "mph" to give you an integer so it can be converted into Kilometers per hour, then if the wrong type of data is provided the pipeline will abort.

The only exception to this rule is the pass_through_type. The type will remain the same as the input type.

See the following table for options.

Value type

Data type

string_type

String

integer_type

Integer

float_type

Float

boolean_type

Boolean

pass_through_type

Type remains the same as the input type

Path parameters

Path parameters are used to identify resources. They are part of the path of the endpoint and are identified through the use of curly braces {parameter}.

If you provided a path parameter placeholder in the address of the data source, then this parameter gets auto-loaded into a path parameter field. You then give it a sample value.

To add path parameters, follow these steps.

Steps
Steps
  1. Click the Add new parameter +.

  2. Provide a name/value pair as well as value type.

  3. Xapix checks the information you entered for validity and then confirms it with a checkmark.

Example

The following address includes a single path parameter {id}.

https://reqres.in/api/users/{id}

Xapix detects the path parameter enclosed in curly brackets {id} and automatically loads it into the path parameter form.

In the following screenshot, the Name field is filled with the parameter found in the path. The Data Sample field has a value used only within the pipeline. You need only provide a data sample that will be used only within the pipeline. It has the default Value Type of pass_through_type.

Path parameter loaded into the form

Each additional path parameter results in an additional path form, as in the following example.

https://someaddress.io/api/something/{name}{anotherparam}

Query parameters

Query parameters are used to sort or filter items. They are a set of parameters attached at the end of a URL and are added after a ? in the string.

To add query parameters, follow these steps.

Steps
Steps
  1. Click the Add new parameter +.

  2. Provide a Name, Data Sample and Value Type.

  3. Xapix checks the information you entered for validity and then confirms it with a checkmark.

Example

The following shows an example address using query parameters

https://reqres.in/api/users/{id}?userid=1234&firstname=mick&lastname=jagger

This example has query parameters as described in the following table.

Label

1st query param

2nd query param

3rd query param

Name

userid

firstname

lastname

Data Sample

1234

mick

jagger

Value Type

pass_through_type

pass_through_type

pass_through_type

Header parameters

To add header parameters, follow these steps.

Steps
Steps
  1. Click the Add new parameter +.

  2. Provide a name/value pair as well as value type.

  3. Xapix checks the information you entered for validity and then confirms it with a checkmark.

Example
Example

Label

Sample content

Name

Content-Type

Data Sample

'text/xml'

Value Type

pass_through_type

Cookie parameters

To add cookie parameters, follow these steps.

Steps
Steps
  1. Click the Add new parameter +.

  2. Provide a name/value pair as well as value type.

  3. Xapix checks the information you entered for validity and then confirms it with a checkmark.

Example
Example

Label

Sample content

Name

debug

Data Sample

0

Value Type

pass_through_type