Vanity names

Vanity names are called vanity sets inside the API.

Fields

  • default_set - When true, this vanity set is pre-selected when creating new zones in the UI.
  • external_ref - Arbitrary identifier used to cross reference this vanity set with a record in your app.
  • id - DNScaster’s ID for the vanity set, eg: vst_sample123456. (Read-only)
  • in_use - When true, ineligible to be deleted (likely in use by a zone). (Read-only)
  • name - First FQDN of this vanity set. (Read-only)
  • nameserver_set_id - Nameserver set to which this vanity set belongs.
  • object - Always vanity_set. (Read-only)
  • pattern - The pattern to be used to build the vanity names in this set. One of ns1, ns0, a, a.ns.
  • vanity_domain - Domain from the corresponding vanity zone. (Read-only)
  • vanity_zone_id - The domain onto which this set of vanity names will be built.

List vanity sets

Query params
  • external_ref - Filter by external_ref.
  • nameserver_set_id - Filter by nameserver_set_id.
  • Plus standard paging params.
    • sort - Fields: id (default).
Request
GET /v1/vanity sets
Response

On success, 200 with 0 or more vanity sets.

{
  "collection": [
    {
      "default_set": false,
      "external_ref": null,
      "id": "vst_sample123456",
      "name": "ns1.example.com",
      "nameserver_set_id": "nst_sample123456",
      "object": "vanity_set",
      "pattern": "ns1",
      "vanity_domain": "example.com",
      "vanity_zone_id": "zon_sample123456"
    }
  ],
  "more_results": false
}

Retrieve a vanity set

Request
GET /v1/vanity sets/vst_sample123456
Response

On success, 200 with the vanity set.

{
  "default_set": false,
  "external_ref": null,
  "id": "vst_sample123456",
  "in_use": false,
  "name": "ns1.example.com",
  "nameserver_set_id": "nst_sample123456",
  "object": "vanity_set",
  "pattern": "ns1",
  "vanity_domain": "example.com",
  "vanity_zone_id": "zon_sample123456"
}

Create a vanity set

Request
POST /v1/vanity sets
{
  "vanity_set": {
    "nameserver_set_id": "nst_sample123456",
    "vanity_zone_id": "zon_sample123456"
  }
}
Response

On success, 201 with the new vanity set.
On error, 422 with standard error response.

{
  "default_set": false,
  "external_ref": null,
  "id": "vst_sample123456",
  "in_use": false,
  "name": "ns1.example.com",
  "nameserver_set_id": "nst_sample123456",
  "object": "vanity_set",
  "pattern": "ns1",
  "vanity_domain": "example.com",
  "vanity_zone_id": "zon_sample123456"
}

Update a vanity set

Request
PUT /v1/vanity sets/vst_sample123456
{
  "vanity_set": {
    "pattern": "ns1"
  }
}
Response

On success, 200 with the updated vanity set.
On error, 422 with standard error response.

{
  "default_set": false,
  "external_ref": null,
  "id": "vst_sample123456",
  "in_use": false,
  "name": "ns1.example.com",
  "nameserver_set_id": "nst_sample123456",
  "object": "vanity_set",
  "pattern": "ns1",
  "vanity_domain": "example.com",
  "vanity_zone_id": "zon_sample123456"
}

Delete a vanity set

Request
DELETE /v1/vanity sets/vst_sample123456
Response

On success, 202 with an empty response.
On error, 422 with standard error response.