Skip to main content
DELETE
/
v1
/
models
/
{modelId}
/
view
/
{viewName}
Delete view
curl --request DELETE \
  --url https://{instance}.omniapp.co/api/v1/models/{modelId}/view/{viewName} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://{instance}.omniapp.co/api/v1/models/{modelId}/view/{viewName}"

headers = {"Authorization": "Bearer <token>"}

response = requests.delete(url, headers=headers)

print(response.text)
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};

fetch('https://{instance}.omniapp.co/api/v1/models/{modelId}/view/{viewName}', 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://{instance}.omniapp.co/api/v1/models/{modelId}/view/{viewName}",
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;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://{instance}.omniapp.co/api/v1/models/{modelId}/view/{viewName}"

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))

}
HttpResponse<String> response = Unirest.delete("https://{instance}.omniapp.co/api/v1/models/{modelId}/view/{viewName}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{instance}.omniapp.co/api/v1/models/{modelId}/view/{viewName}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "success": true
}
{
"error": "<response_code>",
"message": "<error_reason>"
}
{
"error": "<response_code>",
"message": "<error_reason>"
}
{
"error": "<response_code>",
"message": "<error_reason>"
}
{
"error": "<response_code>",
"message": "<error_reason>"
}
{
"error": "<response_code>",
"message": "<error_reason>"
}

Authorizations

Authorization
string
header
required

Can be either an Organization API Key or Personal Access Token (PAT).

Include in the Authorization header as: Bearer YOUR_TOKEN

Path Parameters

modelId
string<uuid>
required

The unique identifier of the model.

viewName
string
required

The name of the view to delete or ignore.

Query Parameters

branchId
string<uuid>

Optional branch ID

mode
enum<string>
default:EXTENSION

Controls how the view is deleted or hidden:

  • COMBINEDDefault. Marks the view as ignored (ignored: true) if it exists in the parent model, otherwise hard-deletes
  • EXTENSION — Hard-deletes the view from the extension layer
  • MERGED — Marks the view as shallowIgnored: true, hiding it only from the immediate parent layer
Available options:
COMBINED,
MERGED,
EXTENSION

Response

View deleted or ignored successfully

success
boolean
Example:

true