Delete Project
import requests
url = "https://api.diga.io/v1/project/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.diga.io/v1/project/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://api.diga.io/v1/project/{id} \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.diga.io/v1/project/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "error",
"error_code": "LAST_PROJECT",
"message": "Cannot delete the last project"
}{
"status": "error",
"error_code": "UNATHORIZED_ROLE",
"message": "You are not authorized to delete this project"
}{
"status": "error",
"error_code": "PROJECT_NOT_FOUND",
"message": "Project 550e8400-e29b-41d4-a716-446655440000 not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"status": "error",
"error_code": "INTERNAL_SERVER_ERROR",
"message": "Error: Internal Server Error"
}Projects
Delete Project
Permanently delete a project and all associated data.
DELETE
/
v1
/
project
/
{id}
Delete Project
import requests
url = "https://api.diga.io/v1/project/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.diga.io/v1/project/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://api.diga.io/v1/project/{id} \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.diga.io/v1/project/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "error",
"error_code": "LAST_PROJECT",
"message": "Cannot delete the last project"
}{
"status": "error",
"error_code": "UNATHORIZED_ROLE",
"message": "You are not authorized to delete this project"
}{
"status": "error",
"error_code": "PROJECT_NOT_FOUND",
"message": "Project 550e8400-e29b-41d4-a716-446655440000 not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"status": "error",
"error_code": "INTERNAL_SERVER_ERROR",
"message": "Error: Internal Server Error"
}⌘I

