Authority Grants
List authority grants
Lists every authority grant, active and revoked: which caller may have which capability decided, within which limits, from when until when.
GET
/
authority-grants
cURL
curl https://parmana-api-real.vercel.app/authority-grants \
-H "Authorization: Bearer $PARMANA_API_KEY"import { ParmanaClient } from "@parmana/sdk";
const client = new ParmanaClient({
endpoint: "https://parmana-api-real.vercel.app",
apiKey: process.env.PARMANA_API_KEY!,
});
for (const grant of await client.authorityGrants()) {
console.log(grant.callerId, grant.capability, grant.status, grant.validUntil);
}import os
from parmana import ParmanaClient
client = ParmanaClient(
endpoint="https://parmana-api-real.vercel.app",
api_key=os.environ["PARMANA_API_KEY"],
)
for grant in client.list_authority_grants():
print(grant.caller_id, grant.capability, grant.status, grant.valid_until)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://parmana-sandbox.vercel.app/authority-grants', 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://parmana-sandbox.vercel.app/authority-grants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://parmana-sandbox.vercel.app/authority-grants"
req, _ := http.NewRequest("GET", 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.get("https://parmana-sandbox.vercel.app/authority-grants")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://parmana-sandbox.vercel.app/authority-grants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"grants": [
{
"grantId": "9f3cf733-a8ed-487c-bb58-a53950388cdf",
"callerId": "warehouse-agent",
"capability": "erp:release-goods",
"limits": {
"parameters.amount": {
"max": 100000
},
"parameters.currency": {
"oneOf": [
"INR"
]
}
},
"validFrom": "2026-10-11T03:29:05.247Z",
"validUntil": "2026-12-30T00:00:00.000Z",
"status": "active",
"grantedAt": "2026-10-11T03:29:05.247Z"
}
]
}Authorizations
Caller API key issued by scripts/generate-api-key.ts. Sent as Authorization: Bearer . Verified against a stored SHA-256 hash in constant time by packages/api/src/auth/StaticKeyAuthenticator.ts. Required on every route not listed as exempt in this document's top-level description. See /api-reference/authentication.
Response
The grants.
Response of GET /authority-grants: every grant, active and revoked.
Show child attributes
Show child attributes
⌘I
cURL
curl https://parmana-api-real.vercel.app/authority-grants \
-H "Authorization: Bearer $PARMANA_API_KEY"import { ParmanaClient } from "@parmana/sdk";
const client = new ParmanaClient({
endpoint: "https://parmana-api-real.vercel.app",
apiKey: process.env.PARMANA_API_KEY!,
});
for (const grant of await client.authorityGrants()) {
console.log(grant.callerId, grant.capability, grant.status, grant.validUntil);
}import os
from parmana import ParmanaClient
client = ParmanaClient(
endpoint="https://parmana-api-real.vercel.app",
api_key=os.environ["PARMANA_API_KEY"],
)
for grant in client.list_authority_grants():
print(grant.caller_id, grant.capability, grant.status, grant.valid_until)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://parmana-sandbox.vercel.app/authority-grants', 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://parmana-sandbox.vercel.app/authority-grants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://parmana-sandbox.vercel.app/authority-grants"
req, _ := http.NewRequest("GET", 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.get("https://parmana-sandbox.vercel.app/authority-grants")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://parmana-sandbox.vercel.app/authority-grants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"grants": [
{
"grantId": "9f3cf733-a8ed-487c-bb58-a53950388cdf",
"callerId": "warehouse-agent",
"capability": "erp:release-goods",
"limits": {
"parameters.amount": {
"max": 100000
},
"parameters.currency": {
"oneOf": [
"INR"
]
}
},
"validFrom": "2026-10-11T03:29:05.247Z",
"validUntil": "2026-12-30T00:00:00.000Z",
"status": "active",
"grantedAt": "2026-10-11T03:29:05.247Z"
}
]
}