Self-describing environment (sandbox vs production)
curl --request GET \
--url https://api.pid.peridotvault.com/v1/envconst options = {method: 'GET'};
fetch('https://api.pid.peridotvault.com/v1/env', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pid.peridotvault.com/v1/env"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pid.peridotvault.com/v1/env"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"env": "sandbox",
"dokuMode": "sandbox",
"docs": "https://docs.peridot.id"
}meta
Self-describing environment (sandbox vs production)
Public, unauthenticated. Every value is server-derived — any
client-supplied ?env= / body value is ignored (never read). SDKs and
the dashboard call this at startup to verify they reached the intended
deployment (sandbox = sandbox-api.peridot.id, DOKU test mode, no real
money moves). Cacheable for 60s.
GET
/
env
Self-describing environment (sandbox vs production)
curl --request GET \
--url https://api.pid.peridotvault.com/v1/envconst options = {method: 'GET'};
fetch('https://api.pid.peridotvault.com/v1/env', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pid.peridotvault.com/v1/env"
response = requests.get(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pid.peridotvault.com/v1/env"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"env": "sandbox",
"dokuMode": "sandbox",
"docs": "https://docs.peridot.id"
}Response
200 - application/json
Server environment