JavaScript
import Cerca from '@cerca-dev/sdk';
const client = new Cerca({
apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});
const connection = await client.connections.delete('9f063c59-2775-4614-8a68-22e5f90f92f3', {
ownerType: 'fleet',
});
console.log(connection.success);import os
from cerca import Cerca
client = Cerca(
api_key=os.environ.get("CERCA_API_KEY"), # This is the default and can be omitted
)
connection = client.connections.delete(
connection_id="9f063c59-2775-4614-8a68-22e5f90f92f3",
owner_type="fleet",
)
print(connection.success)package main
import (
"context"
"fmt"
"github.com/matrices/cerca-go"
"github.com/matrices/cerca-go/option"
)
func main() {
client := cercago.NewClient(
option.WithAPIKey("My API Key"),
)
connection, err := client.Connections.Delete(
context.TODO(),
"9f063c59-2775-4614-8a68-22e5f90f92f3",
cercago.ConnectionDeleteParams{
OwnerType: cercago.F(cercago.ConnectionDeleteParamsOwnerTypeFleet),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", connection.Success)
}require "cerca"
cerca = Cerca::Client.new(api_key: "My API Key")
connection = cerca.connections.delete("9f063c59-2775-4614-8a68-22e5f90f92f3", owner_type: :fleet)
puts(connection)cerca connections delete \
--api-key 'My API Key' \
--connection-id 9f063c59-2775-4614-8a68-22e5f90f92f3 \
--owner-type fleetcurl --request DELETE \
--url https://api.cerca.dev/connections/{connectionId} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cerca.dev/connections/{connectionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.delete("https://api.cerca.dev/connections/{connectionId}")
.header("Authorization", "Bearer <token>")
.asString();{
"success": true
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}Connections
Delete connection
DELETE
/
connections
/
{connectionId}
JavaScript
import Cerca from '@cerca-dev/sdk';
const client = new Cerca({
apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});
const connection = await client.connections.delete('9f063c59-2775-4614-8a68-22e5f90f92f3', {
ownerType: 'fleet',
});
console.log(connection.success);import os
from cerca import Cerca
client = Cerca(
api_key=os.environ.get("CERCA_API_KEY"), # This is the default and can be omitted
)
connection = client.connections.delete(
connection_id="9f063c59-2775-4614-8a68-22e5f90f92f3",
owner_type="fleet",
)
print(connection.success)package main
import (
"context"
"fmt"
"github.com/matrices/cerca-go"
"github.com/matrices/cerca-go/option"
)
func main() {
client := cercago.NewClient(
option.WithAPIKey("My API Key"),
)
connection, err := client.Connections.Delete(
context.TODO(),
"9f063c59-2775-4614-8a68-22e5f90f92f3",
cercago.ConnectionDeleteParams{
OwnerType: cercago.F(cercago.ConnectionDeleteParamsOwnerTypeFleet),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", connection.Success)
}require "cerca"
cerca = Cerca::Client.new(api_key: "My API Key")
connection = cerca.connections.delete("9f063c59-2775-4614-8a68-22e5f90f92f3", owner_type: :fleet)
puts(connection)cerca connections delete \
--api-key 'My API Key' \
--connection-id 9f063c59-2775-4614-8a68-22e5f90f92f3 \
--owner-type fleetcurl --request DELETE \
--url https://api.cerca.dev/connections/{connectionId} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cerca.dev/connections/{connectionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.delete("https://api.cerca.dev/connections/{connectionId}")
.header("Authorization", "Bearer <token>")
.asString();{
"success": true
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Minimum string length:
1Example:
"9f063c59-2775-4614-8a68-22e5f90f92f3"
Query Parameters
Public connection owner type.
Available options:
organization, fleet Example:
"fleet"
Required when ownerType is fleet.
Example:
"fleet_abc123"
Response
Reusable connection deleted.
Available options:
true ⌘I