Revoke the calling node (node side, `opdns-node unenrol`).
DELETE
/v1/nodes/self
const url = 'https://api.opdns.io/v1/nodes/self';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.opdns.io/v1/nodes/self \ --header 'Authorization: Bearer <token>'The node token stops working at once, the node’s live link session is closed
as revoked, and the revocation is audited (node.revoke_self). The node’s log
queue is kept for its retention like any revoked node’s. A revoked token is 401
node_revoked.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Revoked.
Missing or unknown node token (unauthenticated) or revoked node (node_revoked).
Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
code
required
Stable machine code.
string
detail
string
errors
Array<object>
object
field
required
string
message
required
string
request_id
string
retry_after
Seconds, repeating the Retry-After header (rate limits, offline nodes).
integer
Example
{ "type": "https://opdns.io/problems/node_revoked", "title": "Unauthorized", "status": 401, "code": "node_revoked", "detail": "the node was revoked", "request_id": "5f2c9a0e7b1d4c38"}Rate limited (rate_limited).
Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
code
required
Stable machine code.
string
detail
string
errors
Array<object>
object
field
required
string
message
required
string
request_id
string
retry_after
Seconds, repeating the Retry-After header (rate limits, offline nodes).
integer
Example
{ "type": "https://opdns.io/problems/rate_limited", "title": "Too Many Requests", "status": 429, "code": "rate_limited", "detail": "too many requests", "request_id": "5f2c9a0e7b1d4c38", "retry_after": 6}Headers
Section titled “Headers”Retry-After
integer