Revoke a delegation
curl --request DELETE \
--url https://api.sandbox.nevermined.app/api/v1/delegation/{delegationId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.nevermined.app/api/v1/delegation/{delegationId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.nevermined.app/api/v1/delegation/{delegationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.nevermined.app/api/v1/delegation/{delegationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.nevermined.app/api/v1/delegation/{delegationId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.sandbox.nevermined.app/api/v1/delegation/{delegationId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.nevermined.app/api/v1/delegation/{delegationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Successfully minted",
"txHash": "0x923812b3c4d5e6f7890abcdef1234567890abcdef1234567890abcdef12345678",
"httpStatus": 200,
"data": {},
"when": "2023-11-07T05:31:56Z"
}Delegation
Revoke Delegation
Revokes a delegation owned by the authenticated user and cascade-revokes its linked permissions. For Visa delegations the linked VGS intent is cancelled best-effort. Requires a Nevermined API key.
DELETE
/
delegation
/
{delegationId}
Revoke a delegation
curl --request DELETE \
--url https://api.sandbox.nevermined.app/api/v1/delegation/{delegationId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.nevermined.app/api/v1/delegation/{delegationId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.nevermined.app/api/v1/delegation/{delegationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.nevermined.app/api/v1/delegation/{delegationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.nevermined.app/api/v1/delegation/{delegationId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.sandbox.nevermined.app/api/v1/delegation/{delegationId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.nevermined.app/api/v1/delegation/{delegationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Successfully minted",
"txHash": "0x923812b3c4d5e6f7890abcdef1234567890abcdef1234567890abcdef12345678",
"httpStatus": 200,
"data": {},
"when": "2023-11-07T05:31:56Z"
}Authorizations
Your Nevermined API Key (starts with 'nvm:'). Get one at nevermined.app under Settings > API Keys.
Path Parameters
UUID v4 of the delegation to revoke.
Response
The revoke result ({ success: true })
Indicates whether the API call was successful
Example:
true
Message describing the result of the API call
Example:
"Successfully minted"
Blockchain transaction hash associated with the API call
Example:
"0x923812b3c4d5e6f7890abcdef1234567890abcdef1234567890abcdef12345678"
HTTP status code of the API response
Example:
200
Additional parameters related to the API call
Timestamp when the API call was made
Was this page helpful?