CreateAPIKeyReq
Validates an API key.
POST
/
v1
/
auth
/
api-key
/
validate
CreateAPIKeyReq
curl --request POST \
--url https://api.endorlabs.com/v1/auth/api-key/validate \
--header 'Content-Type: application/json' \
--data '
{
"key": "<string>",
"secret": "<string>"
}
'import requests
url = "https://api.endorlabs.com/v1/auth/api-key/validate"
payload = {
"key": "<string>",
"secret": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({key: '<string>', secret: '<string>'})
};
fetch('https://api.endorlabs.com/v1/auth/api-key/validate', 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/api-key/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'key' => '<string>',
'secret' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.endorlabs.com/v1/auth/api-key/validate"
payload := strings.NewReader("{\n \"key\": \"<string>\",\n \"secret\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.endorlabs.com/v1/auth/api-key/validate")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"<string>\",\n \"secret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.endorlabs.com/v1/auth/api-key/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": \"<string>\",\n \"secret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"key": "<string>",
"secret": "<string>",
"issuing_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>"
},
"namespace": "<string>",
"valid": true
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Body
application/json
Validates an API key.
Response
A successful response.
Validates an API key.
The unique identifier of the API key.
The secret associated with the provided API Key.
User represents a user in the system.
Mostly includes configuration parameters that are user wise.
Show child attributes
Show child attributes
The namespace the API key belongs to. A caller that mints a derived token binds it to this namespace, so the platform can vouch for the scope of the derived token instead of trusting a scope the caller supplies.
Valid returns if the API key and secret pair are valid.
Was this page helpful?
CreateAPIKeyReq
curl --request POST \
--url https://api.endorlabs.com/v1/auth/api-key/validate \
--header 'Content-Type: application/json' \
--data '
{
"key": "<string>",
"secret": "<string>"
}
'import requests
url = "https://api.endorlabs.com/v1/auth/api-key/validate"
payload = {
"key": "<string>",
"secret": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({key: '<string>', secret: '<string>'})
};
fetch('https://api.endorlabs.com/v1/auth/api-key/validate', 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/api-key/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'key' => '<string>',
'secret' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.endorlabs.com/v1/auth/api-key/validate"
payload := strings.NewReader("{\n \"key\": \"<string>\",\n \"secret\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.endorlabs.com/v1/auth/api-key/validate")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"<string>\",\n \"secret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.endorlabs.com/v1/auth/api-key/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": \"<string>\",\n \"secret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"key": "<string>",
"secret": "<string>",
"issuing_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>"
},
"namespace": "<string>",
"valid": true
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}