# Testing REST API

You can test your custom chaincode REST APIs right from within the Spydra console. You can also test the APIs from any REST API client like Postman.

{% hint style="info" %}
The pre-requisite is that your custom app should already be deployed on a Network.
{% endhint %}

### 1. Create an API key

* Navigate to the Network
* Go to API key page from the Side menu
* Generate an API key for the Organization
* Copy the API key

<figure><img src="/files/jmIszUhz9eUeD0VI2kHM" alt=""><figcaption></figcaption></figure>

### 2. REST API page in Deployed App

* Navigate to Network
* Click on Deployed Apps and select the Asset Tokenization API
* In the REST API page, select the Organization, if you have multiple Organizations

<figure><img src="/files/C1tunCVhJf1qAISknlwW" alt=""><figcaption></figcaption></figure>

* Click on Authorize, Enter the copied API key, and Authorize
* Once it is Authorized, you can click on Try it now for a specific API
* Enter your Request in the Request Editor and execute.

<figure><img src="/files/w8cghz4qg30TXPGNNggm" alt=""><figcaption></figcaption></figure>

* You will get a response. That's how you can use Swagger on Spydra Interface

<figure><img src="/files/y2h2dWzp1iY5C3HCJMNV" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.spydra.app/developers/api-reference/custom-chaincode/testing-rest-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
