2. REST APIs - Expose
➢ Right click“REST” and select “Expose REST API”
➢ Right click “RESTAP1” and select “Add REST
API Method”
➢ Result will be shown as below.
3. REST APIs - Expose
➢ Go to the DATA tab. Select “Employee” table under
CustomSQLExcercise. Then drag the table into the
screen action.
➢ Create an output parameter to store data from
the aggregate. The data type of the input
parameter is shown as below.
4. REST APIs - Expose
➢ Assign the output and then you are done.
Note: You can change the name of REST API to your
liking.
5. REST APIs - Consume
➢ As for the REST Consume. We will be using expose
API that you have created before.
➢ Right click “RESTAPI1” and select “Open
Documentation”.
➢ New Tab will pop out. Click A then Copy B. This
link will be use as Base URL.
6. REST APIs - Consume
➢ Right click “REST” then select “Consume REST API”.
➢ When pop out appears, select “ADD SINGLE
METHOD”
7. REST APIs - Consume
➢ Paste URL that you have copied from the API
Documentation below.
➢ Go to the Test tab, then click Test. The output will
be shown in the Response tab below.
8. REST APIs - Consume
➢ Paste URL that you have copied from the API
Documentation below.
➢ Go to the Test tab, then click Test. The output will
be shown in the Response tab below.
9. REST APIs - Consume
➢ If you are satisfied with your output, click Finish. Then
proceed with Yes.
➢ Outystems will automatically generates the rest. Then
you are done.