Remove an org API key's project role grant
curl --request DELETE \
--url https://api.omnara.com/v1/orgs/{orgID}/api-keys/{keyID}/projects/{projectID} \
--header 'X-Omnara-Csrf: <api-key>' \
--cookie __Host-omnara_session=import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}"
headers = {
"cookie": "__Host-omnara_session=",
"X-Omnara-Csrf": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {cookie: '__Host-omnara_session=', 'X-Omnara-Csrf': '<api-key>'}
};
fetch('https://api.omnara.com/v1/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}', 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://api.omnara.com/v1/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_COOKIE => "__Host-omnara_session=",
CURLOPT_HTTPHEADER => [
"X-Omnara-Csrf: <api-key>"
],
]);
$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://api.omnara.com/v1/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("cookie", "__Host-omnara_session=")
req.Header.Add("X-Omnara-Csrf", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.omnara.com/v1/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}")
.header("cookie", "__Host-omnara_session=")
.header("X-Omnara-Csrf", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["cookie"] = '__Host-omnara_session='
request["X-Omnara-Csrf"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "internal_error"
}Users and API Keys
Remove an org API key's project role grant
DELETE
/
orgs
/
{orgID}
/
api-keys
/
{keyID}
/
projects
/
{projectID}
Remove an org API key's project role grant
curl --request DELETE \
--url https://api.omnara.com/v1/orgs/{orgID}/api-keys/{keyID}/projects/{projectID} \
--header 'X-Omnara-Csrf: <api-key>' \
--cookie __Host-omnara_session=import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}"
headers = {
"cookie": "__Host-omnara_session=",
"X-Omnara-Csrf": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {cookie: '__Host-omnara_session=', 'X-Omnara-Csrf': '<api-key>'}
};
fetch('https://api.omnara.com/v1/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}', 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://api.omnara.com/v1/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_COOKIE => "__Host-omnara_session=",
CURLOPT_HTTPHEADER => [
"X-Omnara-Csrf: <api-key>"
],
]);
$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://api.omnara.com/v1/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("cookie", "__Host-omnara_session=")
req.Header.Add("X-Omnara-Csrf", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.omnara.com/v1/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}")
.header("cookie", "__Host-omnara_session=")
.header("X-Omnara-Csrf", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["cookie"] = '__Host-omnara_session='
request["X-Omnara-Csrf"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "internal_error"
}Authorizations
Browser session cookie. HTTPS deployments use __Host-omnara_session; local HTTP development uses omnara_session.
CSRF token header required for browser-session mutations. The value must match the session's CSRF cookie.
Path Parameters
Pattern:
^org_[a-z2-7]{26}$Pattern:
^oak_[a-z2-7]{26}$Pattern:
^proj_[a-z2-7]{26}$Response
Project role grant removed.
⌘I