PUT api/Zone/{zone_handle}/NsPubKey/{id}?user={user}

Update a ns public key on a zone

Request Information

URI Parameters

NameDescriptionTypeAdditional information
zone_handle

Handle of zone

string

Required

id

Id of the public key

integer

Required

user

Optional user handle - if empty logged in user will be used

string

None.

Body Parameters

New public key details

UpdateNsPubKey
NameDescriptionTypeAdditional information
PubKey

string

Required

Request Formats

application/json, text/json

Sample:
{
  "PubKey": "sample string 1"
}

application/xml, text/xml

Sample:
<UpdateNsPubKey xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Zone">
  <PubKey>sample string 1</PubKey>
</UpdateNsPubKey>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

New public key on success
Collection of errors on failure
Return codes
200 - ok
400 - bad request
401 - unauthorized
404 - not found
500 - internal server error
511 - object has expired
513 - quota exceeded
525 - object already exists
530 - invalid attribute value
712 - permission denied on domain
714 - The primary NS is not Namebay's
735 - must be a sub-domain

NsPubKey
NameDescriptionTypeAdditional information
Id

integer

None.

ZoneName

Name of the zone

string

None.

KeyTag

string

None.

PubKey

string

None.

DateInsert

date

None.

NbNs

Namebay hosted

boolean

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "ZoneName": "sample string 2",
  "KeyTag": "sample string 3",
  "PubKey": "sample string 4",
  "DateInsert": "2025-04-04T00:23:00.3178241+02:00",
  "NbNs": true
}

application/xml, text/xml

Sample:
<NsPubKey xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models.Zone">
  <DateInsert>2025-04-04T00:23:00.3178241+02:00</DateInsert>
  <Id>1</Id>
  <KeyTag>sample string 3</KeyTag>
  <NbNs>true</NbNs>
  <PubKey>sample string 4</PubKey>
  <ZoneName>sample string 2</ZoneName>
</NsPubKey>