curl --request GET \
--url https://services.pref.rio/heimdall-admin/api/v1/mappings/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.pref.rio/heimdall-admin/api/v1/mappings/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services.pref.rio/heimdall-admin/api/v1/mappings/', 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://services.pref.rio/heimdall-admin/api/v1/mappings/",
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://services.pref.rio/heimdall-admin/api/v1/mappings/"
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://services.pref.rio/heimdall-admin/api/v1/mappings/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/heimdall-admin/api/v1/mappings/")
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{
"mapping_id": 1,
"action": "user:read",
"path_pattern": "/api/v1/users/{user_id}",
"method": "GET",
"description": "Get user profile information"
}{
"detail": "No mapping found for path '/api/v1/unknown' and method 'GET'"
}{
"detail": "Validation error",
"errors": [
{
"loc": [
"query",
"path"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}Resolve endpoint to action
Resolve an API endpoint (path + method) to its corresponding action for authorization.
Authorization Middleware: This endpoint is primarily used by authorization middleware to determine which action should be checked for a given API request.
Path Matching: Supports exact matches and pattern matching with path parameters
(e.g., /api/v1/users/{user_id} matches /api/v1/users/123).
Method Matching: HTTP method must match exactly (case-sensitive).
Use Cases:
- Authorization middleware determining required permissions
- API gateway integration for access control
- Dynamic permission checking in applications
- Audit logging of permission requirements
curl --request GET \
--url https://services.pref.rio/heimdall-admin/api/v1/mappings/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.pref.rio/heimdall-admin/api/v1/mappings/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services.pref.rio/heimdall-admin/api/v1/mappings/', 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://services.pref.rio/heimdall-admin/api/v1/mappings/",
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://services.pref.rio/heimdall-admin/api/v1/mappings/"
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://services.pref.rio/heimdall-admin/api/v1/mappings/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/heimdall-admin/api/v1/mappings/")
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{
"mapping_id": 1,
"action": "user:read",
"path_pattern": "/api/v1/users/{user_id}",
"method": "GET",
"description": "Get user profile information"
}{
"detail": "No mapping found for path '/api/v1/unknown' and method 'GET'"
}{
"detail": "Validation error",
"errors": [
{
"loc": [
"query",
"path"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
The API path to resolve (e.g., '/api/v1/users/123')
The HTTP method
Response
Mapping found and resolved successfully
Response model for mapping resolution (used by authorization middleware).
Unique identifier of the mapping
1
Action name mapped to this endpoint
"user:read"
URL path pattern that matched
"/api/v1/users/{user_id}"
HTTP method
"GET"
Mapping description
"Get user profile information"
