Parameters are different ways to configure endpoints. The parameters you pass with an endpoint affect the response.
Parameters Types
REST APIs have four kind of parameters:
1. Path parameters: Parameters that appear within the path of the endpoint, before the query string (?). For example, in https://[[app:InstanceURL]]/services/apexrest/FieloPLT/v1/members/123, in which 123 is the path parameter.
2. Query string parameters: Parameters that appear in the query string of the endpoint, after the ?. For example, https://[[app:InstanceURL]]/services/apexrest/FieloPLT/v1/members/details?show_fields=field1,field2,field3, in which show_fieldsis the query string parameter.
3. Request body parameters: Parameters that are included in the request body. Usually submitted as JSON.
4. Header parameters: Parameters that are included in the request header. Usually header parameters relate to authorization.
Parameters Data Type
The following data types are the most common with REST APIs:
- string: An alphanumeric sequence of letters and/or numbers.
- integer: A whole number, which can be positive or negative.
- boolean: true or false.
- object: Key-value pairs in JSON format.
Parameter Data typeList the data type for each parameter, otherwise APIs may not process the parameter correctly if it's the wrong data type or wrong format.
