curl --request GET \
--url https://use.hoop.dev/api/attributes/{name}import requests
url = "https://use.hoop.dev/api/attributes/{name}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://use.hoop.dev/api/attributes/{name}', 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://use.hoop.dev/api/attributes/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://use.hoop.dev/api/attributes/{name}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://use.hoop.dev/api/attributes/{name}")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/attributes/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"access_control_group_names": [
"engineering",
"sre"
],
"access_request_rule_names": [
"rule1",
"rule2"
],
"connection_names": [
"pgdemo",
"mysql-prod"
],
"created_at": "2024-07-25T15:56:35.317601Z",
"datamasking_rule_names": [
"rule1",
"rule2"
],
"description": "Blocks high-risk SQL commands",
"guardrail_rule_names": [
"rule1",
"rule2"
],
"id": "15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7",
"managed_by": "hoop",
"name": "default-session-attribute",
"org_id": "37EEBC20-D8DF-416B-8AC2-01B6EB456318"
}{
"message": "the error description"
}{
"message": "the error description"
}Get Attribute
Get an attribute by name or ID.
curl --request GET \
--url https://use.hoop.dev/api/attributes/{name}import requests
url = "https://use.hoop.dev/api/attributes/{name}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://use.hoop.dev/api/attributes/{name}', 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://use.hoop.dev/api/attributes/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://use.hoop.dev/api/attributes/{name}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://use.hoop.dev/api/attributes/{name}")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/attributes/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"access_control_group_names": [
"engineering",
"sre"
],
"access_request_rule_names": [
"rule1",
"rule2"
],
"connection_names": [
"pgdemo",
"mysql-prod"
],
"created_at": "2024-07-25T15:56:35.317601Z",
"datamasking_rule_names": [
"rule1",
"rule2"
],
"description": "Blocks high-risk SQL commands",
"guardrail_rule_names": [
"rule1",
"rule2"
],
"id": "15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7",
"managed_by": "hoop",
"name": "default-session-attribute",
"org_id": "37EEBC20-D8DF-416B-8AC2-01B6EB456318"
}{
"message": "the error description"
}{
"message": "the error description"
}Path Parameters
Name of the attribute
Response
OK
Access control group names associated with this attribute
["engineering", "sre"]
Access request rule names associated with this attribute
["rule1", "rule2"]
Connection names associated with this attribute
["pgdemo", "mysql-prod"]
The time the resource was created
"2024-07-25T15:56:35.317601Z"
Datamasking rule names associated with this attribute
["rule1", "rule2"]
The description of the attribute
"Blocks high-risk SQL commands"
Guardrail rule names associated with this attribute
["rule1", "rule2"]
The resource identifier
"15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7"
Managed By is a read only field that indicates who manages this attribute. When set (e.g. "hoop" for protection profiles), the attribute cannot be modified or deleted directly.
"hoop"
The name of the attribute
"default-session-attribute"
Organization ID that owns this attribute
"37EEBC20-D8DF-416B-8AC2-01B6EB456318"
Was this page helpful?