---
schema_version: "1"
id: 0bcec0b8bc99c56c96c0f467cb34d44eb37c2104c855a4762bbd5e0a671696e6
title: Simulating Data in REST APIs
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/exchange/ex2-to-simulate-api-data.md
canonical_url: https://docs.mulesoft.com/exchange/ex2-to-simulate-api-data
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 9742652313da3e2f776a014bcb2d14e9969d99f64faa9950eb29bb87ce6fe4fa
description: MuleSoft Documentation Site
latest: true
---
---
product: Exchange
---

# Simulating Data in REST APIs

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Exchange lets you provide simulated data for testing OAS or RAML REST APIs. The simulated data is
provided in the mocking service feature.

The following example shows how the mocking service simulates the data for a REST API:

- In the API console that appears on the right side of an asset detail screen. The mocking service
  lets you add simulated data to an API function and test the API with the data.

  ![API Console showing the mocking service](/mulesoft/current/en-us/exchange/_images/exchange-rest-api-mocking-service.png)

  This page shows two URLs. The URL on the left is also used in Design Center and is public. The URL
  on the right is used only in Exchange and requires authentication.

- Listed as an instance with each version of an API.

  ![A table of patch versions for 1.0 with mocking instances](/mulesoft/current/en-us/exchange/_images/exchange-patch-version-mocking.png)

- Listed on the **API instances** page that also lists the mocking service URL.

  ![A table of API instances, their corresponding environments, URLs, and visibility](/mulesoft/current/en-us/exchange/_images/ex2-api-instances.png)

## Accept Simulated Data in an API

1.  From Design Center > API Specification, provide example data that the implementation returns.
    Alternatively, you can develop an OAS specification from a text editor and add the example data
    there.

2.  In the REST specification provide an HTTP status code for a successful API call.

## Test a REST API With Simulated Data

1.  In Exchange, click a REST API.

2.  Click a function such as **GET**.

3.  In the API console on the right of the screen, click **Send** to send simulated data to the API.

    Exchange sends the data and lists the response, which in this example returns the HTTP 200 OK
    status to indicate success, and lists the data that is sent from the API using the simulated
    data.

## See Also

- [Change a REST API Version](https://docs.mulesoft.com/exchange/to-change-raml-version).

- [Simulate Calls to an API](https://docs.mulesoft.com/design-center/design-mocking-service).
