Clears the user session and cookies.
GET
/
v1
/
auth
/
{authentication_source}
/
logout
Logout
curl --request GET \
--url https://api.endorlabs.com/v1/auth/{authentication_source}/logoutimport requests
url = "https://api.endorlabs.com/v1/auth/{authentication_source}/logout"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.endorlabs.com/v1/auth/{authentication_source}/logout', 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.endorlabs.com/v1/auth/{authentication_source}/logout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.endorlabs.com/v1/auth/{authentication_source}/logout"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.endorlabs.com/v1/auth/{authentication_source}/logout")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.endorlabs.com/v1/auth/{authentication_source}/logout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"authentication_source": "<string>",
"expiration_time": "2023-11-07T05:31:56Z",
"token": "<string>",
"user": {
"meta": {
"name": "<string>",
"annotations": {},
"create_time": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"description": "<string>",
"index_data": {
"data": [
"<string>"
],
"search_score": 123,
"tenant": "<string>",
"will_be_deleted_at": "2023-11-07T05:31:56Z"
},
"kind": "<string>",
"parent_kind": "<string>",
"parent_uuid": "<string>",
"references": {},
"tags": [
"<string>"
],
"update_time": "2023-11-07T05:31:56Z",
"updated_by": "<string>",
"upsert_time": "2023-11-07T05:31:56Z",
"version": "<string>"
},
"spec": {
"email": "<string>",
"event_tracking": {},
"first_name": "<string>",
"groups": [
"<string>"
],
"last_login_time": "2023-11-07T05:31:56Z",
"last_name": "<string>",
"token_hash": "<string>",
"user_name": "<string>"
},
"uuid": "<string>"
}
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Path Parameters
Specifies a user's authentication method, such as "GitHub".
Query Parameters
The API key used for system authentication.
Key is required only if the authentication source is "api-key".
The API secret used for system authentication.
Secret is required only if the authentication source is "api-key".
Response
A successful response.
Response to the request includes a token and the token expiration time for an authenticated user.
Was this page helpful?
⌘I
Logout
curl --request GET \
--url https://api.endorlabs.com/v1/auth/{authentication_source}/logoutimport requests
url = "https://api.endorlabs.com/v1/auth/{authentication_source}/logout"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.endorlabs.com/v1/auth/{authentication_source}/logout', 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.endorlabs.com/v1/auth/{authentication_source}/logout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.endorlabs.com/v1/auth/{authentication_source}/logout"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.endorlabs.com/v1/auth/{authentication_source}/logout")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.endorlabs.com/v1/auth/{authentication_source}/logout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"authentication_source": "<string>",
"expiration_time": "2023-11-07T05:31:56Z",
"token": "<string>",
"user": {
"meta": {
"name": "<string>",
"annotations": {},
"create_time": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"description": "<string>",
"index_data": {
"data": [
"<string>"
],
"search_score": 123,
"tenant": "<string>",
"will_be_deleted_at": "2023-11-07T05:31:56Z"
},
"kind": "<string>",
"parent_kind": "<string>",
"parent_uuid": "<string>",
"references": {},
"tags": [
"<string>"
],
"update_time": "2023-11-07T05:31:56Z",
"updated_by": "<string>",
"upsert_time": "2023-11-07T05:31:56Z",
"version": "<string>"
},
"spec": {
"email": "<string>",
"event_tracking": {},
"first_name": "<string>",
"groups": [
"<string>"
],
"last_login_time": "2023-11-07T05:31:56Z",
"last_name": "<string>",
"token_hash": "<string>",
"user_name": "<string>"
},
"uuid": "<string>"
}
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}