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

# pDID

## createPrivateDid

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

API that creates the private DID&#x20;

#### Headers

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

#### Request Body

| Name           | Type   | Description                                      |
| -------------- | ------ | ------------------------------------------------ |
| id             | string | private DID to create                            |
| publicKey      | string | private DID public keys to create                |
| authentication | string | private DID authentication information to create |
| proof          | string | private DID proof information to create          |

{% tabs %}
{% tab title="200 code: response success/fail
message: response message in accordance with success/fail" %}

```
{
  "code": 200,
  "message": "Success"
}
```

{% endtab %}
{% endtabs %}

#### Request Parameter example (JSON String)

```javascript
{
    "didReq": "{\"authentication\":[{\"id\":\"did:omn:agent1:abcde#aa\",\"publicKeyBase58\":\"be1XaL2STpiLYGDSKGLqMY3eTYCkjrozFMwWR1XBTnEx\",\"type\":\"Secp256k1VerificationKey2018\"}],\"id\":\"did:omn:agent1:abcde\",\"proof\":{\"created\":\"2020-06-23T13:57:27\",\"creator\":\"did:omn:agent1:abcde#aa\",\"nonce\":\"Agui6mzGZL\",\"signatureValue\":\"3kzc67uHUVNXT4tP6Wz1z5RwotcSCRPRQZFF6n6R8Qd2Jt2s35FZGnkbXMSWj2cwZfohaZJGPAZHMezLeYwckzLMp\",\"type\":\"Secp256k1VerificationKey2018\"},\"publicKey\":[{\"id\":\"did:omn:agent1:abcde#aa\",\"publicKeyBase58\":\"be1XaL2STpiLYGDSKGLqMY3eTYCkjrozFMwWR1XBTnEx\",\"type\":\"Secp256k1VerificationKey2018\"}],\"updated\":\"2020-06-23T13:57:27\"}"
}
```

## getPrivateDid

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

API that searches Private DID

#### Headers

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

#### Request Body

| Name | Type   | Description           |
| ---- | ------ | --------------------- |
| id   | string | private DID to search |

{% tabs %}
{% tab title="200 code: response success/fail
message: response message in accordance with success/fail" %}

```
{
  "code": 200,
  "message": "Success",
  "body": {
    "didDoc": {
      "id": "did:omn:agent1:8jvk2fhk8hou00g2fr5caz1xe9",
      "publicKey": [
        {
          "id": "did:omn:agent1:8jvk2fhk8hou00g2fr5caz1xe9#aa",
          "publicKeyBase58": "se2BwptFucnUBt1YHjSuC6fB8VnyjGxLBX6oXCiaBonQ",
          "type": "Secp256k1VerificationKey2018"
        }
      ],
      "authentication": [
        {
          "id": "did:omn:agent1:8jvk2fhk8hou00g2fr5caz1xe9#aa",
          "publicKeyBase58": "se2BwptFucnUBt1YHjSuC6fB8VnyjGxLBX6oXCiaBonQ",
          "type": "Secp256k1VerificationKey2018"
        }
      ],
      "updated": "2020-04-20T16:43:43"
    }
  }
}
```

{% endtab %}
{% endtabs %}

#### Request Parameter example (JSON String)

```javascript
{
  "didReq": {
    "id": "did:omn:agent1:8jvk2fhk8hou00g2fr5caz1xe9"
  }
}
```

## updatePrivateDid

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

API that modifies private DID

#### Headers

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

#### Request Body

| Name           | Type   | Description                                      |
| -------------- | ------ | ------------------------------------------------ |
| id             | string | private DID to modify                            |
| publiccKey     | string | private DID public keys to modify                |
| authentication | string | private DID authentication information to modify |
| proof          | string | private DID proof information to modify          |

{% tabs %}
{% tab title="200 code: response success/fail
message: response message in accordance with success/fail" %}

```
{
  "code": 200,
  "message": "Success"
}
```

{% endtab %}
{% endtabs %}

#### Request Parameter example (JSON String)

```javascript
{
    "didReq": "{\"authentication\":[{\"id\":\"did:omn:agent1:abcde#aa\",\"publicKeyBase58\":\"be1XaL2STpiLYGDSKGLqMY3eTYCkjrozFMwWR1XBTnEx\",\"type\":\"Secp256k1VerificationKey2018\"}],\"id\":\"did:omn:agent1:abcde\",\"proof\":{\"created\":\"2020-06-23T14:00:53\",\"creator\":\"did:omn:agent1:abcde#aa\",\"nonce\":\"B7bmngimjv\",\"signatureValue\":\"3k63SNDtqtmtQe2BeQ2asSgYNDqnuMwdK1HEkwURjT8x6pb6tSMCEBbejrYn3cjEi3fMLu56KCsBCcYVRug2Y6DAn\",\"type\":\"Secp256k1VerificationKey2018\"},\"publicKey\":[{\"id\":\"did:omn:agent1:abcde#aa\",\"publicKeyBase58\":\"be1XaL2STpiLYGDSKGLqMY3eTYCkjrozFMwWR1XBTnEx\",\"type\":\"Secp256k1VerificationKey2018\"}],\"updated\":\"2020-06-23T14:00:53\"}"
}
```

## deletePrivateDid

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

AP that deletes Private DID

#### Headers

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

#### Request Body

| Name    | Type   | Description                             |
| ------- | ------ | --------------------------------------- |
| id      | string | private DID to delete                   |
| type    | string | private DID type to delete              |
| payload | string | private DID payload to delete           |
| proof   | string | private DID proof information to delete |

{% tabs %}
{% tab title="200 code: response success/fail
message: response message in accordance with success/fail" %}

```
{
  "code": 200,
  "message": "Success"
}
```

{% endtab %}
{% endtabs %}

#### Request Parameter example (JSON String)

```javascript
{
 "didAuth": "{\"id\":\"did:omn:agent1:abcd\",\"payload\":\"omnione\",\"proof\":{\"created\":\"2020-06-23T11:30:16\",\"creator\":\"did:omn:agent1:abcd#aa\",\"nonce\":\"wpcDQCca5U\",\"signatureValue\":\"3rxLoT3mmdVgcqGz1JJyJxSGoQrnEGaEvJCmwcKD8G71rRuidi13EQtiLbuEut7f1DxquKevSf1qiHVWDoHQb48Td\",\"type\":\"Secp256k1VerificationKey2018\"},\"type\":\"default\"}"
}
```


---

# 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://dev-en.omnione.net/how-to-check-blockchain-data/check-agent-api/untitled-3.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.
