Skip to main content

How to Create and Deploy an API

Follow these simple steps to design, mock, and deploy your API using the intuitive UI of Data Equity Studio.


1. Create a New API

  • Step 1: Give your API a meaningful name to reflect its purpose.
  • Step 2: Click on the Create API button to initialize your new API design.

2. Edit the API Design

  • Step 1: Click on the Edit API button to begin defining your API.
  • Step 2: On the left-hand side of the interface, you’ll see two options:
    1. Add Paths
    2. Add Data Types

Let’s start with Data Types.


2.2. Design Data Types (Your RESTful Resources)

  • Step 1: Click on Add Data Type and provide a meaningful name for the resource you wish to expose.
  • Step 2: Click Save to confirm your new Data Type.

Add Properties to Your Data Type

  • Step 1: Click on Add Property to define the state or attributes of the resource.
  • Step 2: Provide a meaningful name for the property.
  • Step 3: Enter the type of the property (e.g., integer, string, etc.).
    • For strings, you can also define mock data types from a wide range of options. Once selected, the system will automatically generate realistic mock data for you.
  • Step 4: Save your changes.

3. Define the API Path

  • Step 1: Click on Add a Path to define your RESTful URL.
  • Step 2: Provide a meaningful and descriptive path (e.g., /products, /users).
  • Step 3: Click Add to save the path.

3.2. Add Operations

Operations define the HTTP verbs your API will support (e.g., GET, POST, PUT, DELETE).

  • Step 1: Select the path you just created.
  • Step 2: Click on Add Operation and choose the HTTP verb that corresponds to the action (e.g., GET to fetch data, POST to create data).
  • Step 3: Save your operation.

3.3. Add a Response

  • Step 1: Click on Add Response to define how your API will respond.
  • Step 2: Select the relevant status code (e.g., 200 for success, 400 for bad request).
  • Step 3: Provide a description of the response.
  • Step 4: Click on Add Media Type and select application/json as the format.
  • Step 5: Under the No Type accordion, expand it and link the Data Type created in the previous step as the response body.

4. Configure Policies and Deploy

  • Step 1: Click on the Policy Editor tab at the top of the page to define security, rate-limiting, or caching policies for your API.
  • Step 2: Once the design is complete, click Deploy API.

5. Access the Mock API

  • After deployment, you’ll receive a Mock URL under the Properties tab.
  • Use this URL to invoke the API using popular tools like Postman or directly in your application to test the behavior.

By following these steps, you can quickly design, mock, and deploy RESTful APIs with ease using Data Equity Studio. 🚀