Contract probe
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.api.enfinitos.com/v1', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox.api.enfinitos.com/v1"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.enfinitos.com/v1"
req, _ := http.NewRequest("GET", 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.get("https://sandbox.api.enfinitos.com/v1")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.enfinitos.com/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyfalsecurl --request GET \
--url https://sandbox.api.enfinitos.com/v1 \
--header 'Authorization: Bearer <token>'{
"ok": true,
"data": {
"contract": "v1",
"auth": {
"kind": "bearer-token",
"header": "Authorization: Bearer <api-key>",
"hint": "<string>"
},
"routes": [
{
"method": "GET",
"path": "<string>",
"description": "<string>",
"scopes": [
"<string>"
]
}
]
},
"contractVersion": "v1.0"
}Discovery
Contract probe
Service-discovery / contract probe. Returns the contract version, the auth model, and a machine-readable list of every path with its required scopes. Public — no API key required.
GET
/
v1
Contract probe
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.api.enfinitos.com/v1', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox.api.enfinitos.com/v1"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.enfinitos.com/v1"
req, _ := http.NewRequest("GET", 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.get("https://sandbox.api.enfinitos.com/v1")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.enfinitos.com/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyfalsecurl --request GET \
--url https://sandbox.api.enfinitos.com/v1 \
--header 'Authorization: Bearer <token>'{
"ok": true,
"data": {
"contract": "v1",
"auth": {
"kind": "bearer-token",
"header": "Authorization: Bearer <api-key>",
"hint": "<string>"
},
"routes": [
{
"method": "GET",
"path": "<string>",
"description": "<string>",
"scopes": [
"<string>"
]
}
]
},
"contractVersion": "v1.0"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.