Archive a Value List
DELETE https://api.fraudio.com/v1/value-lists/{value_list_id}
Endpoint Overview
The "Archive Value List" endpoint allows you to archive, rather than delete, a value list. This removes the list from active use in rules while preserving its historical data. Archiving fails if non-archived rules still reference the list.
tip
Archiving a value list ensures it's no longer available for active rule references but keeps the list's historical data intact. If you're unsure about this action or need further insights into this endpoint, our Support Team is available 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 archive.
Example Request With Path Parameter
DELETE https://api.fraudio.com/v1/value-lists/123e4567-e89b-12d3-a456-426614174000
Response Parameters
| Status Code | Status Message | Description | Schema |
|---|---|---|---|
204 | No Content | Standard response for successful HTTP requests when archiving a value list. The server has successfully processed the request and there is no additional content to send in the response payload body. | 204 No Content - No Response Body |
400 | Bad Request | Response when the value list cannot be archived, for example because non-archived rules still reference it. | Problem response |
404 | Not Found | Response when the specified value list ID does not exist. | Problem response |
500, 501, 502, 503, 504 | error | Various error messages for unsuccessful HTTP requests. | Problem response |
Code Samples
- Shell
- Python
- Java
- Perl
- PHP
curl -X DELETE '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"
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.delete(value_lists_endpoint, headers=headers)
if r.status_code == 204:
print("Value list successfully archived!")
else:
print(r.text)
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 ArchiveValueList {
public static void main(String[] args) throws IOException, URISyntaxException, InterruptedException {
String valueListId = "YOUR_VALUE_LIST_ID_HERE";
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")
.DELETE()
.build();
HttpClient client = HttpClient.newHttpClient();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.discarding());
if (response.statusCode() == 204) {
System.out.println("Value list successfully archived!");
} else {
System.out.println("Error archiving value list: " + response.body());
}
}
}
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(DELETE => $value_list_endpoint);
$req->header('authorization' => "Bearer $access_token", "Content-Type" => "application/json");
my $ua = LWP::UserAgent->new;
my $resp = $ua->request($req);
if ($resp->code == 204) {
print "Value list successfully archived!";
} else {
print "Error archiving value list: " . $resp->decoded_content;
}
<?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" => "DELETE"
],
];
$context = stream_context_create($options);
$result = @file_get_contents($value_list_endpoint, false, $context);
if ($http_response_header[0] == "HTTP/1.1 204 No Content") {
print "Value list successfully archived!";
} else {
print "Error archiving value list: " . $result;
}
?>