Cache Management
Delete Allocations
할당 삭제
캐시에서 할당 정보를 제거합니다. 대상은 요청 본문에 있는 (cid, pid) 쌍 목록으로 식별됩니다.
DELETE
/
api
/
cache
/
allocations
Delete Allocations
curl --request DELETE \
--url https://your_a2_service/api/cache/allocations \
--header 'Content-Type: application/json' \
--data '
[
[
"<unknown>"
]
]
'import requests
url = "https://your_a2_service/api/cache/allocations"
payload = [["<unknown>"]]
headers = {"Content-Type": "application/json"}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([['<unknown>']])
};
fetch('https://your_a2_service/api/cache/allocations', 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://your_a2_service/api/cache/allocations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
[
'<unknown>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your_a2_service/api/cache/allocations"
payload := strings.NewReader("[\n [\n \"<unknown>\"\n ]\n]")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://your_a2_service/api/cache/allocations")
.header("Content-Type", "application/json")
.body("[\n [\n \"<unknown>\"\n ]\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/api/cache/allocations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n [\n \"<unknown>\"\n ]\n]"
response = http.request(request)
puts response.read_body본문
application/json
Required array length:
2 elements응답
성공
이 페이지가 도움이 되었나요?
⌘I
Delete Allocations
curl --request DELETE \
--url https://your_a2_service/api/cache/allocations \
--header 'Content-Type: application/json' \
--data '
[
[
"<unknown>"
]
]
'import requests
url = "https://your_a2_service/api/cache/allocations"
payload = [["<unknown>"]]
headers = {"Content-Type": "application/json"}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([['<unknown>']])
};
fetch('https://your_a2_service/api/cache/allocations', 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://your_a2_service/api/cache/allocations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
[
'<unknown>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your_a2_service/api/cache/allocations"
payload := strings.NewReader("[\n [\n \"<unknown>\"\n ]\n]")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://your_a2_service/api/cache/allocations")
.header("Content-Type", "application/json")
.body("[\n [\n \"<unknown>\"\n ]\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/api/cache/allocations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n [\n \"<unknown>\"\n ]\n]"
response = http.request(request)
puts response.read_body