Build a Simple Custom API¶
Introduction¶
This page is intended for new users of API Manager and demonstrates how to create and publish a Custom API using a Cloud Studio operation.
For a comprehensive guide and step-by-step walkthrough, enroll in the API Creation and Management course on Jitterbit University.
For information on the configuration of a specific type of API, see these resources:
Prerequisites¶
Before creating a Custom API, you must be a member of a Harmony organization with a subscription to API Manager, and you must have the appropriate organization permissions and environment access levels as described in Harmony Permissions and Access.
For instructions on setting up organizations, environments, agents, or agent groups, refer to the Management Console documentation.
For information on getting started with API Manager, see API Manager Get Started.
Building an API with API Manager¶
Follow these steps to build a Custom API with API Manager:
Step 1: Creating and Deploying the Operation¶
As described in the Custom API prerequisites, a Cloud Studio or Design Studio operation must first be created and deployed in the same environment you'd like to create a Custom API.
In this Cloud Studio example, the deployed operation queries a database and processes the data into a CSV output:
For instructions on creating and deploying an operation in Cloud Studio or Design Studio, see these resources:
- Cloud Studio
- Design Studio
Step 2: Configuring the API¶
Once the Cloud Studio or Design Studio operation has been deployed, navigate to the My APIs page in API Manager and click New API:
On clicking New API, the API Settings configuration screen opens. Populate each field with these settings:
Once the above fields have been populated, click Next.
Note
For information on each field in this configuration screen, see Step 1: Settings on Custom API configuration.
Since a Custom API is being created, Custom API has been selected as the Service Type. The Cloud Studio operation from Step 1: Creating and Deploying the Operation is assigned to the GET API service:
Once the above fields have been populated and the operation has been assigned, click Save and then click Next.
Note
The operation used for the purpose of this guide has an API Response activity configured as the target of the operation (see Step 1: Creating and Deploying the Operation). As a result, the Response Type is set to Final Target.
For more information on the Projects, Operation, Method, and Response Type fields, see Step 2: Select Service Type and Assign Operations on Custom API configuration.
On the next screen, user roles and an appropriate security profile(s) are assigned to the Custom API:
The roles to choose from are those defined within the Management Console Organizations page (see Managing Roles and Permissions under Organizations).
For more information on assigning user roles, see Step 3: Assign User Roles and Security Profiles on Custom API configuration.
For more information on security profiles, see these resources:
On clicking Next, you will arrive at the Summary and Confirmation page:
On clicking Save and Publish, a dialog indicates the API is live:
Click Copy URL. The copied URL will be used in Step 3: Testing the API.
Step 3: Testing the API¶
To test the API, paste the API URL from Step 2: Configuring the API into a web browser:
Once authenticated, the Cloud Studio operation from Step 1: Creating and Deploying the Operation is triggered and responds with a CSV output of Example Company's customer list:
Next Steps¶
Once the API is live, you can manage the API by generating API documentation on the Portal Manager page, viewing the logs on the API Logs page, or reviewing the consumption and performance metrics for the API on the Analytics page.
For additional information on API Manager, see these resources: