# REST API

You can access the Rest API through the Swagger UI from the App API section. Navigate to Network -> Deployed Apps -> App -> Rest API

```
base url: 

https://<membership_id>.spydra.app/fabric/<app_id>

Get the base URL from Network -> Deployed Apps -> App -> Rest API page.
Select your organization at the top right of this page.

Alternatively, you can from the URL by getting the <membership_id> by navigating
to Network -> Members page and getting the <app_id> by navigating to the Network -> 
Deployed Apps -> App Overview page.
```

{% openapi src="/files/Rh3ulFE3D3qJ9TunHJcL" path="/ledger/transact" method="post" %}
[custom-chaincode-swagger (1).yml](https://640808362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jDaQI2dLzXe5VgQBNFE%2Fuploads%2FRwHzshgvuWKcpiDFnhJY%2Fcustom-chaincode-swagger%20\(1\).yml?alt=media\&token=93a96fdf-719d-47f6-b47e-b5fbc3937596)
{% endopenapi %}

{% openapi src="/files/Rh3ulFE3D3qJ9TunHJcL" path="/ledger/query" method="post" %}
[custom-chaincode-swagger (1).yml](https://640808362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jDaQI2dLzXe5VgQBNFE%2Fuploads%2FRwHzshgvuWKcpiDFnhJY%2Fcustom-chaincode-swagger%20\(1\).yml?alt=media\&token=93a96fdf-719d-47f6-b47e-b5fbc3937596)
{% endopenapi %}

{% openapi src="/files/Rh3ulFE3D3qJ9TunHJcL" path="/identity" method="post" %}
[custom-chaincode-swagger (1).yml](https://640808362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jDaQI2dLzXe5VgQBNFE%2Fuploads%2FRwHzshgvuWKcpiDFnhJY%2Fcustom-chaincode-swagger%20\(1\).yml?alt=media\&token=93a96fdf-719d-47f6-b47e-b5fbc3937596)
{% endopenapi %}

{% openapi src="/files/Rh3ulFE3D3qJ9TunHJcL" path="/identity/{enrollmentId}" method="patch" %}
[custom-chaincode-swagger (1).yml](https://640808362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jDaQI2dLzXe5VgQBNFE%2Fuploads%2FRwHzshgvuWKcpiDFnhJY%2Fcustom-chaincode-swagger%20\(1\).yml?alt=media\&token=93a96fdf-719d-47f6-b47e-b5fbc3937596)
{% endopenapi %}

{% openapi src="/files/Rh3ulFE3D3qJ9TunHJcL" path="/identity/{enrollmentId}" method="get" %}
[custom-chaincode-swagger (1).yml](https://640808362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jDaQI2dLzXe5VgQBNFE%2Fuploads%2FRwHzshgvuWKcpiDFnhJY%2Fcustom-chaincode-swagger%20\(1\).yml?alt=media\&token=93a96fdf-719d-47f6-b47e-b5fbc3937596)
{% endopenapi %}

{% openapi src="/files/Rh3ulFE3D3qJ9TunHJcL" path="/identity/{enrollmentId}" method="delete" %}
[custom-chaincode-swagger (1).yml](https://640808362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jDaQI2dLzXe5VgQBNFE%2Fuploads%2FRwHzshgvuWKcpiDFnhJY%2Fcustom-chaincode-swagger%20\(1\).yml?alt=media\&token=93a96fdf-719d-47f6-b47e-b5fbc3937596)
{% endopenapi %}

{% openapi src="/files/Rh3ulFE3D3qJ9TunHJcL" path="/identity/all" method="get" %}
[custom-chaincode-swagger (1).yml](https://640808362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jDaQI2dLzXe5VgQBNFE%2Fuploads%2FRwHzshgvuWKcpiDFnhJY%2Fcustom-chaincode-swagger%20\(1\).yml?alt=media\&token=93a96fdf-719d-47f6-b47e-b5fbc3937596)
{% endopenapi %}

{% openapi src="/files/Rh3ulFE3D3qJ9TunHJcL" path="/explorer/chainInfo" method="get" %}
[custom-chaincode-swagger (1).yml](https://640808362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jDaQI2dLzXe5VgQBNFE%2Fuploads%2FRwHzshgvuWKcpiDFnhJY%2Fcustom-chaincode-swagger%20\(1\).yml?alt=media\&token=93a96fdf-719d-47f6-b47e-b5fbc3937596)
{% endopenapi %}

{% openapi src="/files/Rh3ulFE3D3qJ9TunHJcL" path="/explorer/block/byNumber/{blockNumber}" method="get" %}
[custom-chaincode-swagger (1).yml](https://640808362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jDaQI2dLzXe5VgQBNFE%2Fuploads%2FRwHzshgvuWKcpiDFnhJY%2Fcustom-chaincode-swagger%20\(1\).yml?alt=media\&token=93a96fdf-719d-47f6-b47e-b5fbc3937596)
{% endopenapi %}

{% openapi src="/files/Rh3ulFE3D3qJ9TunHJcL" path="/explorer/block/byTxId/{transactionId}" method="get" %}
[custom-chaincode-swagger (1).yml](https://640808362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jDaQI2dLzXe5VgQBNFE%2Fuploads%2FRwHzshgvuWKcpiDFnhJY%2Fcustom-chaincode-swagger%20\(1\).yml?alt=media\&token=93a96fdf-719d-47f6-b47e-b5fbc3937596)
{% endopenapi %}

{% openapi src="/files/Rh3ulFE3D3qJ9TunHJcL" path="/explorer/transaction/byTxId/{transactionId}" method="get" %}
[custom-chaincode-swagger (1).yml](https://640808362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jDaQI2dLzXe5VgQBNFE%2Fuploads%2FRwHzshgvuWKcpiDFnhJY%2Fcustom-chaincode-swagger%20\(1\).yml?alt=media\&token=93a96fdf-719d-47f6-b47e-b5fbc3937596)
{% endopenapi %}

{% openapi src="/files/Rh3ulFE3D3qJ9TunHJcL" path="/explorer/block/latest" method="get" %}
[custom-chaincode-swagger (1).yml](https://640808362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jDaQI2dLzXe5VgQBNFE%2Fuploads%2FRwHzshgvuWKcpiDFnhJY%2Fcustom-chaincode-swagger%20\(1\).yml?alt=media\&token=93a96fdf-719d-47f6-b47e-b5fbc3937596)
{% endopenapi %}

{% openapi src="/files/Rh3ulFE3D3qJ9TunHJcL" path="/explorer/transaction/latest" method="get" %}
[custom-chaincode-swagger (1).yml](https://640808362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jDaQI2dLzXe5VgQBNFE%2Fuploads%2FRwHzshgvuWKcpiDFnhJY%2Fcustom-chaincode-swagger%20\(1\).yml?alt=media\&token=93a96fdf-719d-47f6-b47e-b5fbc3937596)
{% endopenapi %}

{% openapi src="/files/Rh3ulFE3D3qJ9TunHJcL" path="/receipt" method="get" %}
[custom-chaincode-swagger (1).yml](https://640808362-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5jDaQI2dLzXe5VgQBNFE%2Fuploads%2FRwHzshgvuWKcpiDFnhJY%2Fcustom-chaincode-swagger%20\(1\).yml?alt=media\&token=93a96fdf-719d-47f6-b47e-b5fbc3937596)
{% endopenapi %}


---

# 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/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.
