List Rules
GET https://api.fraudio.com/v1/rules
Endpoint Overview
The "List Rules" endpoint of the Rules Management API allows you to retrieve fraud detection rules defined for your organization. Use it with optional filters to fetch a subset of the rules according to your use case criteria.
tip
If you have any inquiries or need clarifications about this endpoint, our Support Team is here to help.
Request Parameters
Query Parameters
The endpoint supports the following query parameters for more tailored rule retrieval:
ruleId
: Filter by UUIDs of the rule.version
: Filter by version numbers.externalId
: Filter by external IDs.status
: Filter by rule status (enabled
,disabled
,archived
).action
: Filter by action type (allow
,review
,deny
).serviceType
: Filter by service type (self-service
,custom
).priority
: Filter by priority levels (from1
highest to5
lowest).fullHistory
: Set totrue
to retrieve the full history of rule changes. Default isfalse
.
Example Request With Query Parameters
GET https://api.fraudio.com/v1/rules?status=enabled&action=deny
Response Parameters
Status Code | Status Message | Description | Schema |
---|---|---|---|
200 | OK | Standard response for successful HTTP requests. | 200 OK - Rules list response |
4xx , 500 , 501 , 502 , 503 , 504 | error | Various error messages for unsuccessful HTTP requests. | Problem response |
Code Samples
- Shell
- Python
- Java
- Perl
- PHP
curl -X GET 'https://api.fraudio.com/v1/rules?status=enabled&action=deny' \
-H 'Content-Type: application/json' \
-H "authorization: Bearer $ACCESS_TOKEN"
import os
import requests
rules_endpoint = "https://api.fraudio.com/v1/rules"
access_token = os.environ["ACCESS_TOKEN"]
params = {
"status": "enabled",
"action": "deny"
}
headers = {
"authorization": f"Bearer {access_token}",
"Content-Type": "application/json",
}
r = requests.get(rules_endpoint, headers=headers, params=params)
print(r.json())
package com.fraudio;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class ListRules {
public static void main(String[] args) throws IOException, URISyntaxException, InterruptedException {
String listRulesEndpoint = "https://api.fraudio.com/v1/rules";
String accessToken = System.getenv("ACCESS_TOKEN");
URI uri = new URI(listRulesEndpoint + "?status=enabled&action=deny");
HttpRequest request = HttpRequest.newBuilder()
.uri(uri)
.header("authorization", String.format("Bearer %s", accessToken))
.header("Content-Type", "application/json")
.GET()
.build();
HttpClient client = HttpClient.newHttpClient();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
String responseBody = response.body();
System.out.println("Response Code: " + response.statusCode() + "\nResponse Body: " + responseBody);
}
}
use LWP::UserAgent;
use HTTP::Request::Common;
my $list_rules_endpoint = 'https://api.fraudio.com/v1/rules';
my $access_token = $ENV{"ACCESS_TOKEN"};
my $query_parameters = "?status=enabled&action=deny";
my $req = HTTP::Request->new(GET => $list_rules_endpoint . $query_parameters);
$req->header('authorization' => "Bearer $access_token", "Content-Type" => "application/json");
my $ua = LWP::UserAgent->new;
my $resp = $ua->request($req);
my $message = $resp->decoded_content;
print "Received reply: $message";
<?php
$list_rules_endpoint = "https://api.fraudio.com/v1/rules?status=enabled&action=deny";
$access_token = $_SERVER["ACCESS_TOKEN"];
$options = [
"http" => [
"header" =>
"authorization: Bearer $access_token\r\n" .
"Content-Type: application/json\r\n",
"method" => "GET"
],
];
$context = stream_context_create($options);
$result = file_get_contents($list_rules_endpoint, false, $context);
print $result;
?>