# rDNS

{% hint style="info" %}
Stacket Group complies with the RIPE NCC IPv4 PTR record guidelines, therefore our systems automatically does a DNS record check to make sure its a 1:1 mapping otherwise the request will be denied.&#x20;

If our system cannot find an A record matching the rDNS requested domain, the request will be denied with following error message "A record does not match %ipv4 address%"
{% endhint %}

## Retrieve rDNS records

<mark style="color:blue;">`GET`</mark> `https://api.suble.io/projects/:projectId/vm/:vmId/rdns`

This endpoint will respond with a list of all IPv4 addresses connected to the virtual machine along with their PTR record.

#### Path Parameters

| Name      | Type   | Description                       |
| --------- | ------ | --------------------------------- |
| projectId | string | Unique Id for the project         |
| vmId      | string | Unique Id for the virtual machine |

#### Headers

| Name          | Type   | Description               |
| ------------- | ------ | ------------------------- |
| Authorization | string | User token or project key |

{% tabs %}
{% tab title="200 " %}

```
[
    {
        "ipv4": String,
        "record": String
    }
]
```

{% endtab %}
{% endtabs %}

## Modify rDNS record

<mark style="color:green;">`POST`</mark> `https://api.suble.io/projects/:projectId/vm/:vmId/rdns`

This endpoint is used to modify a PTR record of an virtual machine ipv4 address

#### Path Parameters

| Name      | Type   | Description                       |
| --------- | ------ | --------------------------------- |
| projectId | string | Unique Id for the project         |
| vmId      | string | Unique Id for the virtual machine |

#### Request Body

| Name   | Type   | Description                                   |
| ------ | ------ | --------------------------------------------- |
| Ipv4   | string | IPv4 address of the record you want to modify |
| record | string | The domain you want the record changed to     |

{% tabs %}
{% tab title="200 " %}

```
{
    "message": String
}
```

{% endtab %}

{% tab title="400 This response will occur if you provide invalid body data or for example the domain doesn't have a matching record." %}

```
{
    "error": String
}
```

{% endtab %}
{% endtabs %}


---

# 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.suble.io/virtual-machine/rdns.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.
