> For the complete documentation index, see [llms.txt](https://dev-en.omnione.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev-en.omnione.net/how-to-check-blockchain-data/check-agent-api/untitled-5.md).

# policy

## policy

<mark style="color:green;">`POST`</mark> `http://dev.whitehat.co.kr/agent/v1/policy`

API that can search the whole list of policy or with a given search condition

#### Headers

| Name              | Type   | Description                                |
| ----------------- | ------ | ------------------------------------------ |
| X-AGENT-API-TOKEN | string | required token for searching the Agent API |

#### Request Body

| Name          | Type   | Description                                    |
| ------------- | ------ | ---------------------------------------------- |
| policyName    | string | policy name to search                          |
| expectedPayer | string | the expected payer of policy to search         |
| limit         | string | number of items to get at a time (default: 10) |
| page          | string | Current page number (default: 1)               |

{% tabs %}
{% tab title="200 code: response success/fail
message: response message in accordance with success/fail
data.totalCount: total number of searched list of policy
data.list: list of searched policy" %}

```
{
  "code": 200,
  "message": "Success",
  "data": {
    "totalCount": 1,
    "list": [
      {
        "policyDistRate": [
          {
            "key": "bp",
            "value": "50"
          },
          {
            "key": "officials",
            "value": "50"
          }
        ],
        "_id": "0",
        "policyName": "POLICY_ADD_ISSUER",
        "policyNameHash": "7274D6B4E3DFCD9F967BFF80FADF9826794140F33A42E673550B42F65455AA05",
        "policyProcAsset": "0.0000 OCR",
        "expectedPayer": "issuer"
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

#### Request Parameter example (JSON)

```javascript
{
  "query": {
    "policyName": "POLICY_ADD_ISSUER"
  },
  "limit": 10,
  "page": 1
}
```

## transpolicy

<mark style="color:green;">`POST`</mark> `http://dev.whitehat.co.kr/agent/v1/policy/transpolicy`

API that can search the whole list of transpolicy or with a given search condition

#### Headers

| Name              | Type   | Description                                                  |
| ----------------- | ------ | ------------------------------------------------------------ |
| X-AGENT-API-TOKEN | string | required token for searching the Agent API (issuing console) |

#### Request Body

| Name           | Type   | Description                                    |
| -------------- | ------ | ---------------------------------------------- |
| policyName     | string | policy name to search                          |
| expectedPlayer | string | the expected payer of policy to search         |
| limit          | string | Number of items to get at a time (default: 10) |
| page           | string | Current page number (default: 1)               |

{% tabs %}
{% tab title="200 code: response success/fail
message: response message in accordance with success/fail
data.totalCount: total number of searched list of transpolicy
data.list: searched list of transpolicy" %}

```
{
  "code": 200,
  "message": "Success",
  "data": {
    "totalCount": 1,
    "list": [
      {
        "policyDistRate": [
          {
            "key": "bp",
            "value": "50"
          },
          {
            "key": "officials",
            "value": "50"
          }
        ],
        "_id": "0",
        "policyName": "POLICY_ADD_ISSUER",
        "policyNameHash": "7274D6B4E3DFCD9F967BFF80FADF9826794140F33A42E673550B42F65455AA05",
        "policyProcAsset": "0.0000 OCR",
        "expectedPayer": "issuer"
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

#### Request Parameter example (JSON)

```javascript
{
  "query": {
    "policyName": "POLICY_ADD_ISSUER"
  },
  "limit": 10,
  "page": 1
}
```
