Revoke external sharing
curl --request DELETE \
--url https://devx.{environment}.oleria.io/v1/resource-instances/{id}/external-shares \
--header 'Authorization: Bearer <token>'import requests
url = "https://devx.{environment}.oleria.io/v1/resource-instances/{id}/external-shares"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://devx.{environment}.oleria.io/v1/resource-instances/{id}/external-shares', 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://devx.{environment}.oleria.io/v1/resource-instances/{id}/external-shares",
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://devx.{environment}.oleria.io/v1/resource-instances/{id}/external-shares"
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://devx.{environment}.oleria.io/v1/resource-instances/{id}/external-shares")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://devx.{environment}.oleria.io/v1/resource-instances/{id}/external-shares")
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{
"jobId": "9f2b1c7e-5a84-4d6b-9c31-0e7f8a2d4b16",
"self": "/v1/action-jobs/9f2b1c7e-5a84-4d6b-9c31-0e7f8a2d4b16"
}{
"code": "BAD_REQUEST",
"message": "The request was malformed."
}{
"code": "UNAUTHORIZED",
"message": "Missing or invalid authentication token."
}{
"code": "FORBIDDEN",
"message": "The token lacks the required scope."
}{
"code": "NOT_FOUND",
"message": "No resource with the given id."
}{
"code": "TOO_MANY_REQUESTS",
"message": "Rate limit exceeded. Retry after the specified interval."
}{
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred."
}Resource instances
Revoke external sharing
Revokes access held by people outside your organization to this resource. Every external share found on it is removed, so one request can produce many results. The change is applied in the source system asynchronously: this returns a job, and the job reports the outcome, including whether the target could be changed at all. Requires the https://devx.{environment}.oleria.io/write scope.
DELETE
/
v1
/
resource-instances
/
{id}
/
external-shares
Revoke external sharing
curl --request DELETE \
--url https://devx.{environment}.oleria.io/v1/resource-instances/{id}/external-shares \
--header 'Authorization: Bearer <token>'import requests
url = "https://devx.{environment}.oleria.io/v1/resource-instances/{id}/external-shares"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://devx.{environment}.oleria.io/v1/resource-instances/{id}/external-shares', 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://devx.{environment}.oleria.io/v1/resource-instances/{id}/external-shares",
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://devx.{environment}.oleria.io/v1/resource-instances/{id}/external-shares"
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://devx.{environment}.oleria.io/v1/resource-instances/{id}/external-shares")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://devx.{environment}.oleria.io/v1/resource-instances/{id}/external-shares")
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{
"jobId": "9f2b1c7e-5a84-4d6b-9c31-0e7f8a2d4b16",
"self": "/v1/action-jobs/9f2b1c7e-5a84-4d6b-9c31-0e7f8a2d4b16"
}{
"code": "BAD_REQUEST",
"message": "The request was malformed."
}{
"code": "UNAUTHORIZED",
"message": "Missing or invalid authentication token."
}{
"code": "FORBIDDEN",
"message": "The token lacks the required scope."
}{
"code": "NOT_FOUND",
"message": "No resource with the given id."
}{
"code": "TOO_MANY_REQUESTS",
"message": "Rate limit exceeded. Retry after the specified interval."
}{
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred."
}Authorizations
OAuth 2.0 client-credentials flow. Request an access token from the token endpoint and send it as Authorization: Bearer <token>.
Path Parameters
Global id of the resource instance.
Response
The change was accepted and is being applied. Poll the returned job for its outcome.

