Protocols
Get protocol document
Returns the full protocol specification document.
GET
/
api
/
admin
/
protocols
/
{id}
Get protocol document
curl --request GET \
--url https://{instance}.{env}.on-hellgate.cloud/api/admin/protocols/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{instance}.{env}.on-hellgate.cloud/api/admin/protocols/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{instance}.{env}.on-hellgate.cloud/api/admin/protocols/{id}', 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://{instance}.{env}.on-hellgate.cloud/api/admin/protocols/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://{instance}.{env}.on-hellgate.cloud/api/admin/protocols/{id}"
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://{instance}.{env}.on-hellgate.cloud/api/admin/protocols/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.{env}.on-hellgate.cloud/api/admin/protocols/{id}")
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_body{
"$id": "https://developer.hellgate.io/protocols/specter/v1",
"$schema": "https://developer.hellgate.io/schemas/link-protocol/v1",
"actions": {
"assess": {
"method": "POST",
"description": "Score a transaction for fraud risk.",
"request": {
"discriminator": "$.credential.type",
"variants": {
"pan": {
"type": "object",
"properties": {
"credential": {
"$ref": "#/components/schemas/PanCredential"
}
},
"required": [
"credential"
]
}
},
"required_variants": [
"pan"
]
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"value": {
"type": "string",
"enum": [
"ALLOW",
"REVIEW",
"BLOCK"
]
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"PanCredential": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"scheme": {
"type": "string"
}
},
"required": [
"value"
]
}
}
},
"name": "Specter v1",
"version": "1.0.0"
}{
"classifier": "UNAUTHORIZED",
"code": 401,
"message": "No valid means of authentication was provided"
}{
"classifier": "FORBIDDEN",
"code": 403,
"message": "Not allowed to access this resource or feature"
}{
"classifier": "NOT_FOUND",
"code": 404,
"message": "The requested resource does not exist"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Protocol local ID
Response
Protocol document
Full protocol specification document.
Example:
"https://developer.hellgate.io/protocols/specter/v1"
Example:
"https://developer.hellgate.io/schemas/link-protocol/v1"
The operations the protocol defines, keyed by action name. Each action declares its method, request schema (optionally discriminated into variants), and per-status response schemas.
Example:
{
"assess": {
"method": "POST",
"description": "Score a transaction for fraud risk.",
"request": {
"discriminator": "$.credential.type",
"variants": {
"pan": {
"type": "object",
"properties": {
"credential": {
"$ref": "#/components/schemas/PanCredential"
}
},
"required": ["credential"]
}
},
"required_variants": ["pan"]
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"value": {
"type": "string",
"enum": ["ALLOW", "REVIEW", "BLOCK"]
}
}
}
}
}
}
}
}
}
Reusable schema definitions referenced by actions via $ref.
Example:
{
"schemas": {
"PanCredential": {
"type": "object",
"properties": {
"value": { "type": "string" },
"scheme": { "type": "string" }
},
"required": ["value"]
}
}
}
Example:
"Specter v1"
Example:
"1.0.0"
⌘I
Get protocol document
curl --request GET \
--url https://{instance}.{env}.on-hellgate.cloud/api/admin/protocols/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{instance}.{env}.on-hellgate.cloud/api/admin/protocols/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{instance}.{env}.on-hellgate.cloud/api/admin/protocols/{id}', 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://{instance}.{env}.on-hellgate.cloud/api/admin/protocols/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://{instance}.{env}.on-hellgate.cloud/api/admin/protocols/{id}"
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://{instance}.{env}.on-hellgate.cloud/api/admin/protocols/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.{env}.on-hellgate.cloud/api/admin/protocols/{id}")
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_body{
"$id": "https://developer.hellgate.io/protocols/specter/v1",
"$schema": "https://developer.hellgate.io/schemas/link-protocol/v1",
"actions": {
"assess": {
"method": "POST",
"description": "Score a transaction for fraud risk.",
"request": {
"discriminator": "$.credential.type",
"variants": {
"pan": {
"type": "object",
"properties": {
"credential": {
"$ref": "#/components/schemas/PanCredential"
}
},
"required": [
"credential"
]
}
},
"required_variants": [
"pan"
]
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"value": {
"type": "string",
"enum": [
"ALLOW",
"REVIEW",
"BLOCK"
]
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"PanCredential": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"scheme": {
"type": "string"
}
},
"required": [
"value"
]
}
}
},
"name": "Specter v1",
"version": "1.0.0"
}{
"classifier": "UNAUTHORIZED",
"code": 401,
"message": "No valid means of authentication was provided"
}{
"classifier": "FORBIDDEN",
"code": 403,
"message": "Not allowed to access this resource or feature"
}{
"classifier": "NOT_FOUND",
"code": 404,
"message": "The requested resource does not exist"
}