File Diddelete webhook event
curl --request GET \
--url https://apix.us.amity.co/webhook/file.didDeleteimport requests
url = "https://apix.us.amity.co/webhook/file.didDelete"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://apix.us.amity.co/webhook/file.didDelete', 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://apix.us.amity.co/webhook/file.didDelete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apix.us.amity.co/webhook/file.didDelete"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apix.us.amity.co/webhook/file.didDelete")
.asString();require 'uri'
require 'net/http'
url = URI("https://apix.us.amity.co/webhook/file.didDelete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"networkId": "6848030d11c7e8b56c3570b5",
"event": "file.didDelete",
"data": {
"fileId": "fileId",
"fileUrl": "https://localhost/api/v3/files/fileId/download",
"type": "file",
"accessType": "public",
"altText": null,
"createdAt": "1900-01-01T00:00:00.000Z",
"updatedAt": "1900-01-01T00:00:00.000Z",
"attributes": {
"name": "foobar.png",
"extension": "png",
"size": 8658,
"mimeType": "image/png"
}
}
}Webhook event
File Diddelete webhook event
Send deleted file information whenever a file got deleted
GET
/
webhook
/
file.didDelete
File Diddelete webhook event
curl --request GET \
--url https://apix.us.amity.co/webhook/file.didDeleteimport requests
url = "https://apix.us.amity.co/webhook/file.didDelete"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://apix.us.amity.co/webhook/file.didDelete', 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://apix.us.amity.co/webhook/file.didDelete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apix.us.amity.co/webhook/file.didDelete"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apix.us.amity.co/webhook/file.didDelete")
.asString();require 'uri'
require 'net/http'
url = URI("https://apix.us.amity.co/webhook/file.didDelete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"networkId": "6848030d11c7e8b56c3570b5",
"event": "file.didDelete",
"data": {
"fileId": "fileId",
"fileUrl": "https://localhost/api/v3/files/fileId/download",
"type": "file",
"accessType": "public",
"altText": null,
"createdAt": "1900-01-01T00:00:00.000Z",
"updatedAt": "1900-01-01T00:00:00.000Z",
"attributes": {
"name": "foobar.png",
"extension": "png",
"size": 8658,
"mimeType": "image/png"
}
}
}⌘I