> 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-8.md).

# vc

## claim

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

API that can search the whole list of the claim 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                                    |
| ------------- | ------ | ---------------------------------------------- |
| claimCode     | string | claim code to search                           |
| claimName     | string | claim name to search                           |
| claimType     | string | claim type to search                           |
| issuerAccount | string | Issuer account for issuing a claim             |
| issuerDid     | string | issuer DID for issuing a claim                 |
| status        | string | claim status value                             |
| limit         | string | number of items to get at a time (default: 10) |
| page          | string | current page number (default: 1) code t        |

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

```
{
  "code": 200,
  "message": "Success",
  "data": {
    "totalCount": 1,
    "list": [
      {
        "vcTypeKeys": [
          "0",
          "10",
          "11"
        ],
        "_id": "0",
        "claimCode": "studentnm",
        "claimName": "studentnm",
        "claimDesc": "",
        "claimType": "string",
        "issuerAccount": "dev.iss2",
        "issuerDid": "did:omn:dev.iss2",
        "status": "1"
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

#### Request Parameter example (JSON)

```javascript
{
  "query": {
     "claimCode": "studentnm"
  },
  "limit": 10,
  "page": 1
}
```

## vctype

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

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

#### Path Parameters

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

#### Request Body

| Name          | Type   | Description                                    |
| ------------- | ------ | ---------------------------------------------- |
| vcTypeCode    | string | vctype code to search                          |
| vcTypeName    | string | vctype name to search                          |
| issuerAccount | string | issuer account for issuing a claim             |
| issuerDid     | string | issuer DID for issuing a claim                 |
| status        | string | claim status value (0: applied, 1: approved)   |
| 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 vcType
data.list: searched list of vcType" %}

```
{
  "code": 200,
  "message": "Success",
  "data": {
    "totalCount": 1,
    "list": [
      {
        "claimCodes": [
          "studentnm"
        ],
        "_id": "0",
        "vcTypeCode": "studenttype",
        "vcTypeName": "studenttype",
        "vcTypeDesc": "",
        "issuerAccount": "dev.iss2",
        "issuerDid": "did:omn:dev.iss2",
        "status": "1"
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

#### Request Parameter example (JSON)

```javascript
{
  "query": {
     "vcTypeCode": "studenttype"
  },
  "limit": 10,
  "page": 1
}
```

## vcdef

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

API that can search the whole list of vcdef 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                                    |
| ------------- | ------ | ---------------------------------------------- |
| vcDefCode     | string | vcDef code to search                           |
| vcDefName     | string | vcDef name to search                           |
| vcTypeCode    | string | vcType code to search                          |
| vcTypeName    | string | vcType name to search                          |
| issuerAccount | string | issuer account for issuing a claim             |
| issuerDid     | string | issuer DID for issuing a claim                 |
| status        | string | claim status value (0: applied, 1: approved)   |
| 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 vcdef
data.list: searched list of vcdef" %}

```
{
  "code": 200,
  "message": "Success",
  "data": {
    "totalCount": 1,
    "list": [
      {
        "vcProcAsset": [
          {
            "key": "issue",
            "value": "0.0000 OCR"
          },
          {
            "key": "verify",
            "value": "1.0000 OCR"
          }
        ],
        "issDistRate": [
          {
            "key": "bp",
            "value": "50"
          },
          {
            "key": "issuer",
            "value": "10"
          },
          {
            "key": "official",
            "value": "30"
          },
          {
            "key": "sp",
            "value": "0"
          },
          {
            "key": "user",
            "value": "10"
          }
        ],
        "vrfDistRate": [
          {
            "key": "bp",
            "value": "50"
          },
          {
            "key": "issuer",
            "value": "10"
          },
          {
            "key": "official",
            "value": "20"
          },
          {
            "key": "sp",
            "value": "10"
          },
          {
            "key": "user",
            "value": "10"
          }
        ],
        "allowedServiceCodes": [
          "studentsvc",
          "ndj.serviec1"
        ],
        "_id": "0",
        "vcDefCode": "studentdef",
        "vcDefName": "studentdef",
        "vcDefDesc": "",
        "vcDefPeriod": "0",
        "vcTypeCode": "studenttype",
        "vcDefImgUrl": "http://test.whitehat.co.kr:8081/omniissuer/html/card.png",
        "issueWebViewUrl": "http://test.whitehat.co.kr:8081/omniissuer/webview/reg2",
        "viewWebViewUrl": "http://test.whitehat.co.kr:8081/omniissuer/webview/view2",
        "copyWebViewUrl": "http://test.whitehat.co.kr:8081/omniissuer/webview/copy2",
        "assuaranceLevel": "0",
        "issuerAccount": "dev.iss2",
        "issuerDid": "did:omn:dev.iss2",
        "issuerName": "dev.iss2",
        "status": "1"
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

#### Request Parameter example (JSON)

```javascript
{
  "query": {
    "vcDefCode": "studentdef"
  },
  "limit": 10,
  "page": 1
}
```

## vcdef2

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

API that can search the whole list of vcdef or with a given search conditions&#x20;

#### Headers

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

#### Request Body

| Name          | Type   | Description                                    |
| ------------- | ------ | ---------------------------------------------- |
| vcDefCode     | string | zkp vcDef code to search                       |
| vcDefName     | string | zkp vcDef name to search                       |
| vcTypeCode    | string | vcType code to search                          |
| vcTypeName    | string | vcType name to search                          |
| issuerAccount | string | issuer account for issuing a claim             |
| issuerDid     | string | issuer did for issuing a claim                 |
| status        | string | claim status value (0: applied, 1: approved)   |
| 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 vcdef2
data.list: searched list of vcdef2" %}

```
{
  "code": 200,
  "message": "Success",
  "data": {
    "totalCount": 1,
    "list": [
      {
        "vcProcAsset": [
          {
            "key": "issue",
            "value": "0.0000 OCR"
          },
          {
            "key": "verify",
            "value": "1.0000 OCR"
          }
        ],
        "issDistRate": [
          {
            "key": "bp",
            "value": "50"
          },
          {
            "key": "issuer",
            "value": "10"
          },
          {
            "key": "official",
            "value": "30"
          },
          {
            "key": "sp",
            "value": "0"
          },
          {
            "key": "user",
            "value": "10"
          }
        ],
        "vrfDistRate": [
          {
            "key": "bp",
            "value": "50"
          },
          {
            "key": "issuer",
            "value": "10"
          },
          {
            "key": "official",
            "value": "20"
          },
          {
            "key": "sp",
            "value": "10"
          },
          {
            "key": "user",
            "value": "10"
          }
        ],
        "allowedServiceCodes": [
          "studentsvc",
          "ndj.serviec1"
        ],
        "_id": "0",
        "vcDefCode": "studentdef",
        "vcDefName": "studentdef",
        "vcDefDesc": "",
        "vcDefPeriod": "0",
        "vcTypeCode": "studenttype",
        "vcDefImgUrl": "http://test.whitehat.co.kr:8081/omniissuer/html/card.png",
        "issueWebViewUrl": "http://test.whitehat.co.kr:8081/omniissuer/webview/reg2",
        "viewWebViewUrl": "http://test.whitehat.co.kr:8081/omniissuer/webview/view2",
        "copyWebViewUrl": "http://test.whitehat.co.kr:8081/omniissuer/webview/copy2",
        "assuaranceLevel": "0",
        "issuerAccount": "dev.iss2",
        "issuerDid": "did:omn:dev.iss2",
        "issuerName": "dev.iss2",
        "status": "1"
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

#### Request Parameter example (JSON)

```javascript
{
  "query": {
    "vcDefCode": "studentdef"
  },
  "limit": 10,
  "page": 1
}
```

## vcinfo

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

API that can search the whole list of vcinfo 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                                          |
| --------- | ------ | ---------------------------------------------------- |
| vcDefCode | string | vcDef code to search                                 |
| isRevoke  | string | authentication status (true: revoked, false: normal) |
| 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 vcinfo
data.list: searched list of vcinfo" %}

```
{
  "code": 200,
  "message": "Success",
  "data": {
    "totalCount": 2,
    "list": [
      {
       "vcisssignKeys": [
          "0",
          "1"
        ],
        "_id": "0",
        "vcId": "3a6b1e2d-c306-4383-b6fe-0c2e6f893e26",
        "vcIdHash": "80087001C5376C1F9BD290ACE1B57E793D011A562679147D272FD90DB6B2684D",
        "vcDefCode": "studentdef",
        "issuerAccountHash": "ECEE8B08BC4A6BAB1EDCA1CCE2BB1506A58676407EFF3A21A2DC0E86D27744ED",
        "usrAccountHash": "E9211BBF806CA1D49002F2A24E0867993FC15D13D680A894B835E57CE1A3C29D",
        "createTime": "2020-06-11T08:22:01.000Z",
        "expireTime": "2021-06-11T08:22:00.000Z",
        "isRevoke": "false"
      },
      {
        "vcisssignKeys": [
          "2",
          "3"
        ],
        "_id": "1",
        "vcId": "761983cc-09a3-481f-a845-4e93f34dc6f7",
        "vcIdHash": "3005DB6F3DDC97AC897D79C378F67CD30BCC66FDE847D497FFDDFB76EE7562AF",
        "vcDefCode": "studentdef",
        "issuerAccountHash": "ECEE8B08BC4A6BAB1EDCA1CCE2BB1506A58676407EFF3A21A2DC0E86D27744ED",
        "usrAccountHash": "F66529FF79B6DA77B6AADD4441D980910EB9FED43B931E79BDD6F93CDFDFEF09",
        "createTime": "2020-06-11T08:22:53.000Z",
        "expireTime": "2021-06-11T08:22:53.000Z",
        "isRevoke": "false"
      },
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

#### Request Parameter example (JSON)

```javascript
{
  "query": {
     "vcTypeCode": "studenttype"
  },
  "limit": 10,
  "page": 1
}
```
