> For the complete documentation index, see [llms.txt](https://docs.spydra.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spydra.app/developers/api-reference/custom-chaincode/testing-rest-api.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
