•Http request
An HTTP request is made by a client to a host located on the server to access a resource. Each request you send in Arbiter requires a URL representing the API endpoint you are working with. You could also use an Arbiter AI to generate HTTP connectors for popular platforms and services..
This is how the HTTP request builder looks like:
•Request methods
By default Arbiter will select the GET method for new request. GET methods are usually for retrieving data from an API.
Currently, supported http methods are:
- GET
- POST
- PUT
- PATCH
- DELETE
•Parameters
•Query parameters
Select Parameters tab and click on the + Parameter button. You will see a prompt where you can set up the name of the parameter and its type.
•Path parameters
They form part of the request URL and they are referenced using placeholders preceded by :
as in the following example: /user/:id
. To use a path parameter, enter the parameter name into the URL field, after a colon, for example :id. When you enter a path parameter, Arbiter will populate it in the Parameters tab, where you can also edit it.
•Body data
You will need to send body data with requests whenever you need to add or update structured data. For example, if you're sending a request to add a new user to a database, you might include the user details in JSON. Typically you will use body data with PUT, POST, and PATCH requests.
If you're sending body data, make sure you have the correct Content-Type header. You can set it up in the General tab. Currently, supported content types are application/json
, x-www-form-urlencoded
and multipart/form-data
.
•Form data
Website forms often send data to APIs as multipart/form-data
. Form data allows you to send key-value pairs in request's body. You can do this in Body tab, by clicking on + Parameter
•URL-encoded
URL-encoded data uses the same encoding as URL parameters. If your API requires url-encoded data, select x-www-form-urlencoded
in the General tab of your request. Enter your key-value pairs to send with the request body and Arbiter will encode them before sending.
•JSON data
Select application/json
in the General tab of your request. Select Body tab and build the object schema of the request's body.
•Headers
Some APIs require you to send particular headers along with requests, typically to provide additional metadata about the operation you are performing. You can set these up in the Headers tab.
•Authorization
APIs use authorization to ensure that client requests access data securely. Authentication data can be included in the header, body, or as parameters to a request. If you populate your authentication details in the Authorization tab, Arbiter will automatically configure the relevant parts of the request for your chosen authentication type.
The supported authentication types are:
- No Auth
- Basic Auth
- API key
- Bearer token
•No auth
This option is the default one. If your request does not require authorization, select No Auth from the Authorization tab.
•Basic auth
Basic authentication involves sending a verified username and password with your request.
•API key
With API key auth, you send a key-value pair to the API either in the request headers or query parameters. In the request Authorization tab, select API Key from the dropdown. Enter your key name and value, and select either Header or Query Params from the ‘Add to’ dropdown.
•Bearer token
Bearer tokens allow requests to authenticate using an access key, such as a JSON Web Token (JWT). The token is a text string, included in the request header. In the Token field, enter your API key value.
•Testing
- Click on Test request button
- Populate all of the required parameters
- Select Run button. When test completed you will be redirected to the Result tab.
- Optional After seeing the response you could automatically build the Response Schema by clicking on the Build schema button.