Send a DELETE request to an environment
curl --request DELETE \
--url https://api.archal.ai/v1/sessions/{sessionId}/environments/{environmentId}/api/{providerPath} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data trueimport requests
url = "https://api.archal.ai/v1/sessions/{sessionId}/environments/{environmentId}/api/{providerPath}"
payload = True
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify(true)
};
fetch('https://api.archal.ai/v1/sessions/{sessionId}/environments/{environmentId}/api/{providerPath}', 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://api.archal.ai/v1/sessions/{sessionId}/environments/{environmentId}/api/{providerPath}",
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(true),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.archal.ai/v1/sessions/{sessionId}/environments/{environmentId}/api/{providerPath}"
payload := strings.NewReader("true")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://api.archal.ai/v1/sessions/{sessionId}/environments/{environmentId}/api/{providerPath}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("true")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.archal.ai/v1/sessions/{sessionId}/environments/{environmentId}/api/{providerPath}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "true"
response = http.request(request)
puts response.read_bodytrue{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}API Reference
Send a DELETE request to an environment
Authenticate only with the provider-shaped headers returned in environments.*.credentials.headers. Archal validates that scoped credential for this session and environment, replaces it with a private worker credential, and preserves the provider path, query, body, status, and safe response headers. Workspace control-plane credentials are rejected.
DELETE
/
v1
/
sessions
/
{sessionId}
/
environments
/
{environmentId}
/
api
/
{providerPath}
Send a DELETE request to an environment
curl --request DELETE \
--url https://api.archal.ai/v1/sessions/{sessionId}/environments/{environmentId}/api/{providerPath} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data trueimport requests
url = "https://api.archal.ai/v1/sessions/{sessionId}/environments/{environmentId}/api/{providerPath}"
payload = True
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify(true)
};
fetch('https://api.archal.ai/v1/sessions/{sessionId}/environments/{environmentId}/api/{providerPath}', 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://api.archal.ai/v1/sessions/{sessionId}/environments/{environmentId}/api/{providerPath}",
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(true),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.archal.ai/v1/sessions/{sessionId}/environments/{environmentId}/api/{providerPath}"
payload := strings.NewReader("true")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://api.archal.ai/v1/sessions/{sessionId}/environments/{environmentId}/api/{providerPath}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("true")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.archal.ai/v1/sessions/{sessionId}/environments/{environmentId}/api/{providerPath}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "true"
response = http.request(request)
puts response.read_bodytrue{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"ok": true,
"error": "<string>",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}Authorizations
Representative OpenAPI security field. The exact provider-shaped header names and values are returned in environments.*.credentials.headers and are authoritative.
Headers
Pattern:
^[A-Za-z0-9._:-]{1,128}$Path Parameters
Minimum string length:
1Required string length:
1 - 80Provider-shaped path below the environment API root
Body
application/jsonapplication/x-www-form-urlencodedtext/plainapplication/octet-stream
Response
Provider-compatible response
Was this page helpful?
⌘I
