Submit route registry snapshot
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
host: '<string>',
method: '<string>',
routePattern: '<string>',
headers: [{}],
queryParams: [{}],
bodyParams: [{}],
bodyContentType: '<string>',
amount: '<string>',
protocol: '<string>',
paymentLogId: '<string>'
})
};
fetch('https://api.prudra.dev/registry/snapshots', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.prudra.dev/registry/snapshots"
payload = {
"host": "<string>",
"method": "<string>",
"routePattern": "<string>",
"headers": [{}],
"queryParams": [{}],
"bodyParams": [{}],
"bodyContentType": "<string>",
"amount": "<string>",
"protocol": "<string>",
"paymentLogId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.prudra.dev/registry/snapshots \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"host": "<string>",
"method": "<string>",
"routePattern": "<string>",
"headers": [
{}
],
"queryParams": [
{}
],
"bodyParams": [
{}
],
"bodyContentType": "<string>",
"amount": "<string>",
"protocol": "<string>",
"paymentLogId": "<string>"
}
'Registry
Submit route registry snapshot
Internal endpoint used by the SDK to register observed pay-walled routes and metadata for the authenticated organisation.
POST
/
registry
/
snapshots
Submit route registry snapshot
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
host: '<string>',
method: '<string>',
routePattern: '<string>',
headers: [{}],
queryParams: [{}],
bodyParams: [{}],
bodyContentType: '<string>',
amount: '<string>',
protocol: '<string>',
paymentLogId: '<string>'
})
};
fetch('https://api.prudra.dev/registry/snapshots', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.prudra.dev/registry/snapshots"
payload = {
"host": "<string>",
"method": "<string>",
"routePattern": "<string>",
"headers": [{}],
"queryParams": [{}],
"bodyParams": [{}],
"bodyContentType": "<string>",
"amount": "<string>",
"protocol": "<string>",
"paymentLogId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.prudra.dev/registry/snapshots \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"host": "<string>",
"method": "<string>",
"routePattern": "<string>",
"headers": [
{}
],
"queryParams": [
{}
],
"bodyParams": [
{}
],
"bodyContentType": "<string>",
"amount": "<string>",
"protocol": "<string>",
"paymentLogId": "<string>"
}
'Authorizations
Your Prudra API key. Get one at dashboard.prudra.com/settings/api-keys
Body
application/json
Response
202
Snapshot accepted

