cURL
curl --request PATCH \
--url https://api.nekt.ai/api/v1/permissions/{id}/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{}'import requests
url = "https://api.nekt.ai/api/v1/permissions/{id}/"
payload = {}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.nekt.ai/api/v1/permissions/{id}/', 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.nekt.ai/api/v1/permissions/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nekt.ai/api/v1/permissions/{id}/"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.nekt.ai/api/v1/permissions/{id}/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nekt.ai/api/v1/permissions/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"permission_level": "manager",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"user": "<string>",
"group": "<string>",
"layer": "<string>",
"folder": "<string>",
"table": "<string>",
"volume": "<string>",
"granted_by": "<string>"
}Catalog
Update Permission
Change the level of a single existing grant.
PATCH
/
api
/
v1
/
permissions
/
{id}
/
cURL
curl --request PATCH \
--url https://api.nekt.ai/api/v1/permissions/{id}/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{}'import requests
url = "https://api.nekt.ai/api/v1/permissions/{id}/"
payload = {}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.nekt.ai/api/v1/permissions/{id}/', 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.nekt.ai/api/v1/permissions/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nekt.ai/api/v1/permissions/{id}/"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.nekt.ai/api/v1/permissions/{id}/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nekt.ai/api/v1/permissions/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"permission_level": "manager",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"user": "<string>",
"group": "<string>",
"layer": "<string>",
"folder": "<string>",
"table": "<string>",
"volume": "<string>",
"granted_by": "<string>"
}permission_level is the only writable field. Everything else on the object — the recipient, the resource, granted_by — is fixed at assignment time. To move a grant to a different resource or recipient, revoke it and assign a new one.
curl --request PATCH \
--url https://api.nekt.ai/api/v1/permissions/6f2a9c4b-2a10-4e7f-9c54-d2a9b1d28b0e/ \
--header "x-api-key: YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{"permission_level": "editor"}'
Assign Permissions can do the same thing in bulk and without knowing the grant id — it matches on recipient and resource. Use this endpoint when you already hold the id, for example from List Permissions.
Who can call it
An API key created by an Owner or Admin can change any grant. A key created by a Member can only move a grant betweenviewer and editor, and only on a resource where that Member holds manager. Anything else returns 403.
Related
- Revoke Permission — remove the grant instead of changing it.
- Permissions flow — the ceiling rules in full.
Authorizations
API Key authentication. Format: 'x-api-key: api_key'
Path Parameters
A UUID string identifying this Lakehouse permission.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
manager- Managereditor- Editorviewer- Viewer
Available options:
manager, editor, viewer Response
200 - application/json
manager- Managereditor- Editorviewer- Viewer
Available options:
manager, editor, viewer User (Expandable)
Group (Expandable)
Layer (Expandable)
Folder (Expandable)
Table (Expandable)
Volume (Expandable)
Granted by (Expandable)
Was this page helpful?