⏺️Records

  1. Create New Records

Creates records using the provided zone and list of record DTOs.

  • POST /api/v1/white-label-logic/records?zone={zone_uuid}

This API endpoint enables the creation of new records within a specific zone identified by its UUID. Users can send a POST request with the desired zone UUID in the URL parameter and provide the details of the new records in the request body. The request body should consist of an array of objects, each representing a record with parameters like type, name, and value.

Upon successful creation, the response will include a timestamp indicating the time of the response, the number of records created (size), and an array of data objects representing the newly created records. Each data object contains details such as the UUID of the record, its type, name, value, and the UUID of the associated zone.

Parameters

Name

Type

Description

authorizationToken

Header

The authorization token.

zone

Query

The zone identifier.

Request Body

[
    {
    "type": "LINK",
    "name": "Test",
    "value": "www.freename.io",
    "ttl": 300
    },
    {
    "type": "SOA",
    "name": "Test2",
    "value": "www.freename.io",
    "ttl": 300
    }
]

Response Body

201 Created

{
    "timestamp": "2024-05-29T11:54:16.229586",
    "size": 2,
    "data": [
        {
            "uuid": "1cea6347-ea43-43a6-b307-64cae8ab2a45",
            "type": "LINK",
            "name": "Test",
            "value": "www.freename.io",
            "ttl": 300,
            "zoneUuid": "001b380b-c544-4159-ac03-60e8dbf83f2e"
        },
        {
            "uuid": "fe8ed7ec-e281-46b9-a87d-028b063a7681",
            "type": "SOA",
            "name": "Test2",
            "value": "www.freename.io",
            "ttl": 300,
            "zoneUuid": "001b380b-c544-4159-ac03-60e8dbf83f2e"
        }
    ]
}
  1. Fetch Record by UUID

Fetches a specific record based on the provided record UUID.

  • GET /api/v1/white-label-logic/records/{record_uuid}

Parameters

Name

Type

Description

authorizationToken

Header

The authorization token.

uuid

Path

The UUID of the record to fetch.

This API endpoint allows users to fetch a record by its unique identifier (UUID). By sending a GET request with the record UUID in the URL parameter, the response will provide details of the requested record.

In the example response provided, the timestamp indicates the time of the response, and the data field contains information about the record, including its UUID, type, name, value, zone UUID (identifying the zone to which the record belongs), time to live (TTL), serial number, refresh interval, retry interval, expire time, version, master name (mname), and responsible person's name (rname).

Response Body

200 OK

{
    "timestamp": "2024-05-29T11:56:22.049784",
    "data": {
        "uuid": "1cea6347-ea43-43a6-b307-64cae8ab2a45",
        "type": "LINK",
        "name": "Testt",
        "value": "www.freename.io",
        "ttl": 300,
        "zoneUuid": "001b380b-c544-4159-ac03-60e8dbf83f2e"
    }
}
  1. Update Records

Updates record details for a given zone.

  • PUT /api/v1/white-label-logic/records?record={record_uuid}

This endpoint allows users to update a single existing record given its uuid. Users need to provide a record along with updated details such as type, name, value, TTL, serial, refresh, retry, expire, version, mname, and rname.

Request Body

{
    "name": "Test Update",
    "value": "Test Update",
    "ttl": 0,
    "priority": 0,
    "serial": 0,
    "refresh": 0,
    "retry": 0,
    "expire": 0,
    "version": "",
    "mname": "MName",
    "rname": "RName"
}

Response Body

200 OK

{
    "timestamp": "2024-05-29T11:59:14.616422",
    "data": {
        "uuid": "1cea6347-ea43-43a6-b307-64cae8ab2a45",
        "type": "LINK",
        "name": "Test Update",
        "value": "Test Update",
        "ttl": 0,
        "priority": 0,
        "serial": 0,
        "refresh": 0,
        "retry": 0,
        "expire": 0,
        "version": "",
        "mname": "MName",
        "rname": "RName",
        "zoneUuid": "001b380b-c544-4159-ac03-60e8dbf83f2e"
    }
}

Last updated