JavaScript
import { TrophyApiClient } from '@trophyso/node';
const trophy = new TrophyApiClient({
apiKey: 'YOUR_API_KEY'
});
const response = await trophy.admin.tenants.delete({
ids: [
'550e8400-e29b-41d4-a716-446655440000',
'550e8400-e29b-41d4-a716-446655440001'
]
});from trophy import TrophyApi
client = TrophyApi(api_key='YOUR_API_KEY')
response = client.admin.tenants.delete(
ids=[
'550e8400-e29b-41d4-a716-446655440000',
'550e8400-e29b-41d4-a716-446655440001'
]
)import (
"context"
api "github.com/trophyso/trophy-go"
trophyclient "github.com/trophyso/trophy-go/client"
"github.com/trophyso/trophy-go/option"
)
client := trophyclient.NewClient(
option.WithApiKey("YOUR_API_KEY"),
)
response, err := client.Admin.Tenants.Delete(context.TODO(), nil)curl --request DELETE \
--url https://admin.trophy.so/v1/tenants \
--header 'X-API-KEY: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://admin.trophy.so/v1/tenants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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://admin.trophy.so/v1/tenants")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin.trophy.so/v1/tenants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"deleted": [
{
"id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"issues": []
}{
"error": "<string>"
}{
"error": "<string>"
}Admin
Delete tenants
Delete tenants by ID.
DELETE
/
tenants
JavaScript
import { TrophyApiClient } from '@trophyso/node';
const trophy = new TrophyApiClient({
apiKey: 'YOUR_API_KEY'
});
const response = await trophy.admin.tenants.delete({
ids: [
'550e8400-e29b-41d4-a716-446655440000',
'550e8400-e29b-41d4-a716-446655440001'
]
});from trophy import TrophyApi
client = TrophyApi(api_key='YOUR_API_KEY')
response = client.admin.tenants.delete(
ids=[
'550e8400-e29b-41d4-a716-446655440000',
'550e8400-e29b-41d4-a716-446655440001'
]
)import (
"context"
api "github.com/trophyso/trophy-go"
trophyclient "github.com/trophyso/trophy-go/client"
"github.com/trophyso/trophy-go/option"
)
client := trophyclient.NewClient(
option.WithApiKey("YOUR_API_KEY"),
)
response, err := client.Admin.Tenants.Delete(context.TODO(), nil)curl --request DELETE \
--url https://admin.trophy.so/v1/tenants \
--header 'X-API-KEY: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://admin.trophy.so/v1/tenants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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://admin.trophy.so/v1/tenants")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin.trophy.so/v1/tenants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"deleted": [
{
"id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"issues": []
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Query Parameters
Tenant IDs to delete. Repeat the query param or provide a comma-separated list.
Required array length:
1 - 100 elementsWas this page helpful?
⌘I