> This page is for Postman API Docs.

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Get all mock servers

GET https://api.postman.com/mocks

Gets all active mock servers. By default, this endpoint returns only mock servers you created across all workspaces.

**Note:**

If you pass both the `teamId` and `workspace` query parameters, this endpoint only accepts the `workspace` query.


Reference: https://learning.postman.com/api-docs/api-reference/mocks/get-mocks

## Authentication

- `x-api-key` header (required) — API Key authentication via header

## Servers

- `https://api.postman.com` (https://api.postman.com, default)
- `https://api.eu.postman.com` (https://api.eu.postman.com)

## Request

### Query parameters

- `teamId` (string, optional) — Return only results that belong to the given team ID.
- `workspace` (string, optional) — Return only results found in the given workspace ID.

## Response

### 200

Successful Response

- `mocks` (list of mockServerData, optional) — A list of mock servers.

## Errors

### 401 Unauthorized Error

Unauthorized

- `GetMocksRequestUnauthorizedError`

### 500 Internal Server Error

Internal Server Error

- `error` (Mock500ErrorError, optional) — Information about the error.

## Types

### mockServerData

Information about the mock server.

- `id` (string, optional) — The mock server's ID.
- `owner` (string, optional) — The ID of mock server's owner.
- `uid` (string, optional) — The mock server's unique ID.
- `collection` (string, optional) — The unique ID of the mock's associated collection.
- `mockUrl` (string, optional) — The mock server URL.
- `name` (string, optional) — The mock server's name.
- `config` (mockServerConfigData, optional) — Information about the mock server's configuration.
- `createdAt` (datetime, optional) — The date and time at which the mock server was created.
- `updatedAt` (datetime, optional) — The date and time at which the mock server was last updated.
- `isPublic` (boolean, optional) — If true, the mock server is public and visible to all users. This field does not indicate the mock server's access control status.
- `deactivated` (boolean, optional) — If true, the mock server is not active. Mock servers deactivate when a linked collection or environment is deleted.
- `environment` (string, optional) — The mock server's associated environment ID.

### commonErrorTypeTitleDetailStatus

- `type` (CommonErrorTypeTitleDetailStatusType, optional) — The type of error.
- `title` (string, optional) — A short summary of the problem.
- `detail` (string, optional) — Information about the error.
- `status` (integer, optional) — The error's HTTP status code.

### commonErrorNameMessage

- `error` (CommonErrorNameMessageError, optional) — Information about the error.

### Mock500ErrorError

Information about the error.

- `type` (string, optional) — The error name.
- `message` (string, optional) — The error message.

### mockServerConfigData

Information about the mock server's configuration.

- `delay` (mockServerDelayData, optional) — Information about the mock server's simulated network delay settings. This returns a null value if there are no configured network delay settings.
- `headers` (list of string, optional) — A list of the mock server's headers.
- `matchBody` (boolean, optional) — If true, match the request body.
- `matchHeader` (boolean, optional) — If true, match the request headers.
- `matchQueryParams` (boolean, optional) — If true, match query parameters.
- `matchWildcards` (boolean, optional) — If true, use wildcard variable matching.
- `serverResponseId` (string, optional, nullable) — The ID of mock server's default response for requests. All calls to the mock server will return the defined response.

### CommonErrorTypeTitleDetailStatusType

The type of error.

### CommonErrorNameMessageError

Information about the error.

- `name` (string, optional) — The error name.
- `message` (string, optional) — The error message.

### mockServerDelayData

Information about the mock server's simulated network delay settings. This returns a null value if there are no configured network delay settings.

- `type` (enum, optional) — The `fixed` value.
  - Allowed values: `fixed`
- `preset` (enum, optional) — The simulated fixed network delay value: - `1` — 2G (300 ms). - `2` — 3G (100 ms). The object does not return this value for custom delay values.
  - Allowed values: `1`, `2`
- `duration` (integer, optional) — For custom network delays, the custom configured delay, in milliseconds.

## Examples

### Successful Response

**Response**

```json
{
  "mocks": [
    {
      "id": "e3d951bf-873f-49ac-a658-b2dcb91d3289",
      "owner": "12345678",
      "uid": "12345678-e3d951bf-873f-49ac-a658-b2dcb91d3289",
      "collection": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2",
      "mockUrl": "https://e3d951bf-873f-49ac-a658-b2dcb91d3289.mock.pstmn.io",
      "name": "Test Mock A",
      "config": {
        "delay": {
          "type": "fixed",
          "duration": 140000
        },
        "headers": [],
        "matchBody": false,
        "matchHeader": false,
        "matchQueryParams": true,
        "matchWildcards": true,
        "serverResponseId": null
      },
      "createdAt": "2022-07-25T20:54:30.000Z",
      "updatedAt": "2022-07-25T20:54:30.000Z",
      "isPublic": false,
      "deactivated": false,
      "environment": "12345678-5daabc50-8451-43f6-922d-96b403b4f28e"
    },
    {
      "id": "cf0f8f11-fe0e-455f-99f3-4177f10f0704",
      "owner": "12345678",
      "uid": "12345678-cf0f8f11-fe0e-455f-99f3-4177f10f0704",
      "collection": "12345678-2cd8f6b1-e85b-46a6-8111-bd62e73e8aa8",
      "mockUrl": "https://cf0f8f11-fe0e-455f-99f3-4177f10f0704.mock.pstmn.io",
      "name": "Test Mock B",
      "config": {
        "headers": [],
        "matchBody": false,
        "matchHeader": false,
        "matchQueryParams": true,
        "matchWildcards": true,
        "serverResponseId": "94d0f5d9-dbdf-4046-9a7d-a11f9b78ac65"
      },
      "createdAt": "2023-01-26T18:59:05.000Z",
      "updatedAt": "2023-01-26T18:59:05.000Z",
      "isPublic": false,
      "deactivated": false,
      "environment": "12345678-5daabc50-8451-43f6-922d-96b403b4f28e"
    }
  ]
}
```

**SDK Code**

```python Successful Response
import requests

url = "https://api.postman.com/mocks"

querystring = {"teamId":"1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9","workspace":"1f0df51a-8658-4ee8-a2a1-d2567dfa09a9"}

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Successful Response
const url = 'https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Successful Response
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Successful Response
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Successful Response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Successful Response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Successful Response
using RestSharp;

var client = new RestClient("https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Successful Response
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Filter by teamId

**Response**

```json
{
  "mocks": [
    {
      "id": "e3d951bf-873f-49ac-a658-b2dcb91d3289",
      "owner": "12345678",
      "uid": "12345678-e3d951bf-873f-49ac-a658-b2dcb91d3289",
      "collection": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2",
      "mockUrl": "https://e3d951bf-873f-49ac-a658-b2dcb91d3289.mock.pstmn.io",
      "name": "Test Mock A",
      "config": {
        "delay": {
          "type": "fixed",
          "duration": 140000
        },
        "headers": [],
        "matchBody": false,
        "matchHeader": false,
        "matchQueryParams": true,
        "matchWildcards": true,
        "serverResponseId": null
      },
      "createdAt": "2022-07-25T20:54:30.000Z",
      "updatedAt": "2022-07-25T20:54:30.000Z",
      "isPublic": false,
      "deactivated": false,
      "environment": "12345678-5daabc50-8451-43f6-922d-96b403b4f28e"
    },
    {
      "id": "cf0f8f11-fe0e-455f-99f3-4177f10f0704",
      "owner": "12345678",
      "uid": "12345678-cf0f8f11-fe0e-455f-99f3-4177f10f0704",
      "collection": "12345678-2cd8f6b1-e85b-46a6-8111-bd62e73e8aa8",
      "mockUrl": "https://cf0f8f11-fe0e-455f-99f3-4177f10f0704.mock.pstmn.io",
      "name": "Test Mock B",
      "config": {
        "headers": [],
        "matchBody": false,
        "matchHeader": false,
        "matchQueryParams": true,
        "matchWildcards": true,
        "serverResponseId": "94d0f5d9-dbdf-4046-9a7d-a11f9b78ac65"
      },
      "createdAt": "2023-01-26T18:59:05.000Z",
      "updatedAt": "2023-01-26T18:59:05.000Z",
      "isPublic": false,
      "deactivated": false
    },
    {
      "id": "e27fe349-bdc7-4f1c-b707-6b9fef7435e2",
      "owner": "87654321",
      "uid": "87654321-e27fe349-bdc7-4f1c-b707-6b9fef7435e2",
      "collection": "87654321-b75dfb85-9209-4212-8f3d-a9d5e28167e5",
      "mockUrl": "https://e27fe349-bdc7-4f1c-b707-6b9fef7435e2.mock.pstmn.io",
      "name": "Test Mock C",
      "config": {
        "headers": [],
        "matchBody": false,
        "matchHeader": false,
        "matchQueryParams": true,
        "matchWildcards": true,
        "serverResponseId": null
      },
      "createdAt": "2023-06-30T14:21:54.000Z",
      "updatedAt": "2023-06-30T14:26:55.000Z",
      "isPublic": true,
      "deactivated": false,
      "environment": "87654321-5daabc50-8451-43f6-922d-96b403b4f28e"
    }
  ]
}
```

**SDK Code**

```python Filter by teamId
import requests

url = "https://api.postman.com/mocks"

querystring = {"teamId":"1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9","workspace":"1f0df51a-8658-4ee8-a2a1-d2567dfa09a9"}

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Filter by teamId
const url = 'https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Filter by teamId
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Filter by teamId
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Filter by teamId
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Filter by teamId
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Filter by teamId
using RestSharp;

var client = new RestClient("https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Filter by teamId
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Filter by workspace

**Response**

```json
{
  "mocks": [
    {
      "id": "e3d951bf-873f-49ac-a658-b2dcb91d3289",
      "owner": "12345678",
      "uid": "12345678-e3d951bf-873f-49ac-a658-b2dcb91d3289",
      "collection": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2",
      "mockUrl": "https://e3d951bf-873f-49ac-a658-b2dcb91d3289.mock.pstmn.io",
      "name": "Test Mock A",
      "config": {
        "delay": {
          "type": "fixed",
          "duration": 140000
        },
        "headers": [],
        "matchBody": false,
        "matchHeader": false,
        "matchQueryParams": true,
        "matchWildcards": true,
        "serverResponseId": null
      },
      "createdAt": "2022-07-25T20:54:30.000Z",
      "updatedAt": "2022-07-25T20:54:30.000Z",
      "isPublic": false,
      "deactivated": false,
      "environment": "12345678-5daabc50-8451-43f6-922d-96b403b4f28e"
    },
    {
      "id": "c929c990-59f1-480a-aea4-c37e25c8785d",
      "owner": "12345678",
      "uid": "12345678-b86af87f-7e1f-4476-85bb-c1f71424fd5e",
      "collection": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2",
      "mockUrl": "https://c929c990-59f1-480a-aea4-c37e25c8785d.mock.pstmn.io",
      "name": "Test",
      "config": {
        "headers": [],
        "matchBody": false,
        "matchHeader": false,
        "matchQueryParams": true,
        "matchWildcards": true,
        "serverResponseId": null
      },
      "createdAt": "2023-06-30T12:57:40.000Z",
      "updatedAt": "2023-06-30T12:57:40.000Z",
      "isPublic": false,
      "deactivated": false,
      "environment": "12345678-5daabc50-8451-43f6-922d-96b403b4f28e"
    }
  ]
}
```

**SDK Code**

```python Filter by workspace
import requests

url = "https://api.postman.com/mocks"

querystring = {"teamId":"1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9","workspace":"1f0df51a-8658-4ee8-a2a1-d2567dfa09a9"}

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Filter by workspace
const url = 'https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Filter by workspace
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Filter by workspace
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Filter by workspace
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Filter by workspace
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Filter by workspace
using RestSharp;

var client = new RestClient("https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Filter by workspace
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### No Mocks Found

**Response**

```json
{
  "mocks": []
}
```

**SDK Code**

```python No Mocks Found
import requests

url = "https://api.postman.com/mocks"

querystring = {"teamId":"1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9","workspace":"1f0df51a-8658-4ee8-a2a1-d2567dfa09a9"}

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript No Mocks Found
const url = 'https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go No Mocks Found
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby No Mocks Found
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java No Mocks Found
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php No Mocks Found
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp No Mocks Found
using RestSharp;

var client = new RestClient("https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift No Mocks Found
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/mocks?teamId=1b96f65f-8d23-4e1d-b5e2-055992c3b8cbd2567dfa09a9&workspace=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```