List a Value List by ID
GET https://api.fraudio.com/v1/value-lists/:value_list_id
Endpoint Overview
The "List Value List by ID" endpoint in the Rules Management API allows you to fetch a specific value list using its unique identifier. This provides a detailed view of the list, including its entries, status, and metadata.
tip
Reach out to our Support Team if you have questions or require further details about this endpoint. We're here to assist.
Request Parameters
Path Parameters
The endpoint requires the following path parameter:
value_list_id: The unique identifier (UUID) of the value list you wish to retrieve.
Example Request With Path Parameter
GET https://api.fraudio.com/v1/value-lists/123e4567-e89b-12d3-a456-426614174000
Response Parameters
| Status Code | Status Message | Description | Schema |
|---|---|---|---|
200 | OK | Standard response for successful HTTP requests when fetching a specific value list. | 200 OK - Value List by ID response |
404 | Not Found | Response when the specified value list ID does not exist. | Problem 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/value-lists/YOUR_VALUE_LIST_ID_HERE' \
-H 'Content-Type: application/json' \
-H "authorization: Bearer $ACCESS_TOKEN"
import os
import requests
value_list_id = "YOUR_VALUE_LIST_ID_HERE" # Replace with your specific value list ID
value_lists_endpoint = f"https://api.fraudio.com/v1/value-lists/{value_list_id}"
access_token = os.environ["ACCESS_TOKEN"]
headers = {
"authorization": f"Bearer {access_token}",
"Content-Type": "application/json",
}
r = requests.get(value_lists_endpoint, headers=headers)
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 ListValueListById {
public static void main(String[] args) throws IOException, URISyntaxException, InterruptedException {
String valueListId = "YOUR_VALUE_LIST_ID_HERE"; // Replace with your specific value list ID
String valueListEndpoint = "https://api.fraudio.com/v1/value-lists/" + valueListId;
String accessToken = System.getenv("ACCESS_TOKEN");
HttpRequest request = HttpRequest.newBuilder()
.uri(new URI(valueListEndpoint))
.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 $value_list_id = "YOUR_VALUE_LIST_ID_HERE"; # Replace with your specific value list ID
my $value_list_endpoint = 'https://api.fraudio.com/v1/value-lists/' . $value_list_id;
my $access_token = $ENV{"ACCESS_TOKEN"};
my $req = HTTP::Request->new(GET => $value_list_endpoint);
$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
$value_list_id = "YOUR_VALUE_LIST_ID_HERE"; // Replace with your specific value list ID
$value_list_endpoint = "https://api.fraudio.com/v1/value-lists/" . $value_list_id;
$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($value_list_endpoint, false, $context);
print $result;
?>