Quick Start Guide¶
Choreo is a cloud-native low-code engineering platform that allows you to create APIs, API Proxies, triggers, and scheduled tasks to implement your integration solution.
Take a look at the Choreo playlist for video tutorials that guide you through the steps to create, publish, deploy, consume, and observe your APIs.
This quick start guide walks you through the steps to create, develop, publish, deploy, and invoke a REST API using Choreo.
Create your first REST API¶
Step 1: Create a REST API¶
First, let's create a new REST API:
Sign in to the Choreo Console at https://console.choreo.dev.
On the Home page, scroll to the Get started with a template section.
Go to the Echo Service card and click Get Started.
Now you have successfully created an API using a template and you can see the flow diagram of the integration logic implemented for this API.
Next, let's deploy this API and make it invokable.
Step 2: Deploy the REST API¶
Choreo maintains two environments by default: development and production. Let's deploy the API to the development environment.
Click Deploy in the left pane.
Go to the Build Area card and click Deploy.
This deploys the API to the development environment to make it invokable.
Now let's test the REST API to verify whether it works as expected.
Step 3: Test the REST API¶
To test the REST API, follow these sub-steps:
Click Test in the left pane.
Expand the POST method with the / resource path.
Click Try it out.
Add a meaningful string as the request body. For example,
Welcome to Choreo.
Click Execute. You'll see the string you entered in step 4 above returned as the server response.
Congratulations! You have now tested the REST API and are ready to implement the business logic.
Implement the business logic¶
Developing an API involves writing the business logic for it. APIs often need to integrate with third-party systems to create a comprehensive integration solution. With Choreo, you can create your integration solution easily by implementing the business logic using its low-code editor, pro-code editor, or both.
Step 1: Develop in low-code¶
Follow this procedure to further develop the API by adding a new resource and simple business logic:
Click Develop in the left pane.
Click Edit Code.
The Web Editor can take some time to open if you are a first-time user.
Click + on the low-code diagram to open the resource, and configure it as follows:
Field Value HTTP Method
string | error
Click + Add Parameter to add a query parameter. Enter the following values to get a name as an input:
Field Value Type
In the low-code diagram, click + after Start.
In the Add Constructs pane, click Variable.
Update the given variable statement syntax (i.e.,
var variable = <add-expression>) to generate a personalized message by following these steps:
To generate the message in string format, click
var, and click string.
variablewhich is the default variable name to edit it. Enter
messageas the new variable name.
To generate the personalized message, double-click
<add-expression>and enter the following expression:
"Hello "+ name
Now the variable statement is updated as follows:
string message = "Hello "+ name;
To return the personalized message, click + below the variable you created and click Return.
In the Return pane, the return statement syntax is displayed as
<add-expression, and click message in the list of suggestions that appear below the return statement syntax.
You can click the > icon on the top left corner of the editor if you want to work in the code view. Depending on your expertise, you can work in the low-code view or the pro-code view. You can also work on both views simultaneously.
Step 2: Run and test the REST API¶
Once you update the REST API configuration as described above, you can verify whether it works as expected by following these steps:
A terminal opens with logs that indicate the status of the REST API. If you updated the REST API as instructed above, you will see the following log:
To invoke the REST API, click Try it.
This opens the Swagger view with details of your REST API.
Expand the GET resource and click Try it out.
In the name field, enter any value (for example,
The Swagger view displays the response under Response Body as shown in the image below:
Step 3: Commit changes to GitHub¶
Choreo maintains source code in a private GitHub repository. When you create a component, Choreo creates it in the private GitHub repository associated with your account. Therefore, you must commit and push your changes if you want to change the API Implementation.
Follow this procedure to commit and push your changes to GitHub.
On the bottom bar of the editor, click Sync with Choreo upstream.
Alternatively, you can click source control on the left pane or click Sync changes with Choreo in the pop-up displayed at the bottom right corner.
Click Sync my changes with Choreo in the window displayed.
Enter a meaningful commit message and click ✓ on the toolbar. This commits the changes to the locally cloned copy of your private GitHub repository.
On the top toolbar, click ... and then click Push.
This pushes the local changes to your private GitHub repository.
If you want to re-deploy new changes, see Deploy Your REST API.
Now let's publish the API and invoke it via the API Developer Portal.
Manage your REST API¶
Choreo provides full API management capabilities so that you can manage your REST API lifecycle, apply security, apply rate-limiting policies, configure usage plans, and add documentation.
Step 1: Publish the API¶
Follow this procedure to publish the API to the API Developer Portal so that external consumers can view and consume the API:
Click Manage in the left pane.
On the Lifecycle Management page, click Publish.
Click Go to Developer Portal.
You will see the published API:
Step 2: Invoke the API¶
Follow this procedure to invoke the REST API via the API Developer Portal:
Click Credentials in the left pane of the API Developer Portal.
Click Generate Credentials. Choreo creates credentials for an internal application and subscribes this API to that internal application.
Click Generate Access Token, copy the generated access token, and click Close.
Click Try Out in the left pane.
Paste the copied access token in the Access Token field.
GETresource you added to expand it.
Click Try it out and enter a name for the query parameter.
Click Execute. You'll see the personalized message as the response from the API.
Congratulations! You have successfully created a REST API, published it on the API Developer Portal, and invoked it via the API Developer Portal.Top