Revoke active sessions
curl --request POST \
--url https://devx.{environment}.oleria.io/v1/accounts/{id}/revoke-sessions \
--header 'Authorization: Bearer <token>'import requests
url = "https://devx.{environment}.oleria.io/v1/accounts/{id}/revoke-sessions"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://devx.{environment}.oleria.io/v1/accounts/{id}/revoke-sessions', 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/accounts/{id}/revoke-sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/accounts/{id}/revoke-sessions"
req, _ := http.NewRequest("POST", 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.post("https://devx.{environment}.oleria.io/v1/accounts/{id}/revoke-sessions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://devx.{environment}.oleria.io/v1/accounts/{id}/revoke-sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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."
}Accounts
Revoke active sessions
Invalidates the account’s session tokens, signing it out everywhere. Disabling an account does not by itself end sessions already in progress, so this is the change that takes effect immediately. 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.
POST
/
v1
/
accounts
/
{id}
/
revoke-sessions
Revoke active sessions
curl --request POST \
--url https://devx.{environment}.oleria.io/v1/accounts/{id}/revoke-sessions \
--header 'Authorization: Bearer <token>'import requests
url = "https://devx.{environment}.oleria.io/v1/accounts/{id}/revoke-sessions"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://devx.{environment}.oleria.io/v1/accounts/{id}/revoke-sessions', 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/accounts/{id}/revoke-sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/accounts/{id}/revoke-sessions"
req, _ := http.NewRequest("POST", 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.post("https://devx.{environment}.oleria.io/v1/accounts/{id}/revoke-sessions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://devx.{environment}.oleria.io/v1/accounts/{id}/revoke-sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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 account.
Response
The change was accepted and is being applied. Poll the returned job for its outcome.

