https://rual-api.rual.dev/YOUR_CLUSTER_NUMBER/api/v1/
. To get your URI you can click on copy
. This will copy the complete URI with your custom piece filled in the URI
in-pin.
To create one of the API actions in the blueprint you need to go to the selector. Right click somewhere in the blueprint, select in the pop up menu selector
. This will open either a menu on the right side of the screen, or when you have no actions yet in your blueprint in the middle of your screen. In this menu search for one of the API register
action and select one.
Cannot GET this might be the one everyone gets. One of the main reasons you can get this error is either your blueprint is not activated, or you need to deactivate and reactivate your blueprint, this will reactivate the API, and might resolve this error.
Connection
pin. Just like the other API types is the connection pin the one you use for your replies, the query fields, the parameters, etc. To see what you can do with the connection pin you can pull out the search from it and look around what action uses the connection.
For an example we created a blueprint with a GET API. This api can also be used. The API Link. In the API URI you can add a query with data to pass on to the API. When you add a query to your URI, add it at the end of the URI, it should look something like: ?firstname=VALUE_OF_FIELD
.
Connections
pin. It also has a Body
pin. With this you can get the fields that has been given to the API. In the same blueprint as the GET API you can find the POST API with a test page you can use the see how the API is being used.
Once you selected your reply type, you can create the message you want to return. In the reply in JSON
example to the right, we selected the object type for the JSON. In the object you can fill with any field with value you want te reply with.
Every reply needs a code, this is the HTTP Status Code. You can find what codes when to use on the internet. The basics are: for a correct response you use 200, and for an error most of the times you use 404.
The type of respons can also be set, the default value will be different for each reply in .. type. To see the default you can click on the pin. To overwrite the headers
you can add an array of objects that looks like: [{key: key, value: value}]