Whenever you need to describe a REST API method in
dexi.yml you'll find the same sort of structure being used.
An overview of the properties available can be seen in the table below
The type of endpoint. Only HTTP is supported right now
The absolute url of the endpoint
The HTTP method to use. One of GET, POST, PUT, DELETE, PATCH. POST and PUT are usually recommended though since those allow for request bodies which is required for almost all endpoints.
An array of name and value objects - e.g.:
The example below shows how that might look when using all the available properties:
endpoint: type: HTTP # Can be omitted url: https://my-app-api.public.com/method/invoke method: POST # You can use headers to send certain values along with every request # Even including a shared secret here makes sense to make sure it is # your app calling your endpoint headers: - name: Accept value: application/json - name: User-Agent value: MyApp/1.0
Updated over 2 years ago