Connections
Outside APIs, sheets and feeds the site reads from.
- GET
/sites/{siteId}/connectionsList connections - POST
/sites/{siteId}/connectionsCreate a connection - GET
/sites/{siteId}/connections/{connectionId}Get a connection - PATCH
/sites/{siteId}/connections/{connectionId}Change a connection - DEL
/sites/{siteId}/connections/{connectionId}Delete a connection - POST
/sites/{siteId}/connections/{connectionId}/testTest a connection - POST
/sites/{siteId}/connections/{connectionId}/requestCall a connection
List connections
/sites/{siteId}/connectionsConnections to outside APIs, Google Sheets, Airtable and feeds, with how many collections use each and the last test. Secret values are never returned; secretsSet names the ones that are set.
Path parameters
siteIdstringrequiredThe site’s id.
Response 200
itemsarray of objectsrequired6 child fields
idstringrequirednamestringrequiredkindstringrequiredOne of
restgoogle-sheetairtablerssbaseUrlstringrequiredheadersmap of stringrequiredsecretsSetarray of stringsrequiredThe names of secrets that have a value. Secret values are never returned.
cursorstringnullablePass as ?cursor= to get the next page. Null when there are no more.
totalintegerHow many there are in all, when the list knows.
Errors
- 401No key, or the key isn’t valid.
- 403The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).
- 404Not found, or not reachable with this key.
- 429Too many requests; wait for RateLimit-Reset seconds.
Try itRead-only. Sends a real request with your key.
curl https://api.unvop.com/v1/sites/site_123/connections \
-H "Authorization: Bearer $UNVOP_KEY"const res = await fetch('https://api.unvop.com/v1/sites/site_123/connections', {
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.unvop.com/v1/sites/site_123/connections",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
)
data = res.json(){
"items": [
{
"id": "conn_123",
"name": "Ana",
"kind": "rest",
"baseUrl": "https://harbour-bakery.unvop.dev",
"headers": {},
"secretsSet": []
}
],
"cursor": null,
"total": 1
}Create a connection
/sites/{siteId}/connectionsConnect an outside API, sheet or feed. Secrets are stored encrypted and are write-only. Owners and admins only.
Path parameters
siteIdstringrequiredThe site’s id.
Headers
Idempotency-KeystringSend the same key to repeat this request safely; the first answer is replayed for 24 hours.
up to 200 characters
Request body JSON
namestringrequiredup to 80 characters
kindstringrequiredOne of
restgoogle-sheetairtablerssbaseUrlstringrequiredup to 2,000 characters
headersmap of stringPlain headers sent with every request.
secretsmap of stringSecret headers (or apiKey), encrypted at rest and never returned. Send an empty string to remove one; leave one out to keep it.
Response 201
idstringrequirednamestringrequiredkindstringrequiredOne of
restgoogle-sheetairtablerssbaseUrlstringrequiredheadersmap of stringrequiredsecretsSetarray of stringsrequiredThe names of secrets that have a value. Secret values are never returned.
Errors
- 401No key, or the key isn’t valid.
- 403The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).
- 404Not found, or not reachable with this key.
- 422The body is invalid; details say which values.
- 429Too many requests; wait for RateLimit-Reset seconds.
Try itSends a real request. Asks before it changes anything.
curl https://api.unvop.com/v1/sites/site_123/connections \
-H "Authorization: Bearer $UNVOP_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"name": "Bookings API",
"kind": "rest",
"baseUrl": "https://api.example.com/v2",
"secrets": {
"Authorization": "Bearer sk_live_…"
}
}'const res = await fetch('https://api.unvop.com/v1/sites/site_123/connections', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
name: "Bookings API",
kind: "rest",
baseUrl: "https://api.example.com/v2",
secrets: {
Authorization: "Bearer sk_live_…"
}
}),
});
const data = await res.json();import os, requests, uuid
res = requests.post(
"https://api.unvop.com/v1/sites/site_123/connections",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
json={
"name": "Bookings API",
"kind": "rest",
"baseUrl": "https://api.example.com/v2",
"secrets": {
"Authorization": "Bearer sk_live_…",
},
},
)
data = res.json(){
"id": "conn_123",
"name": "Ana",
"kind": "rest",
"baseUrl": "https://harbour-bakery.unvop.dev",
"headers": {},
"secretsSet": []
}Get a connection
/sites/{siteId}/connections/{connectionId}One connection, with the collections that use it and its last test. Secret values are never returned.
Path parameters
siteIdstringrequiredThe site’s id.
connectionIdstringrequired
Response 200
idstringrequirednamestringrequiredkindstringrequiredOne of
restgoogle-sheetairtablerssbaseUrlstringrequiredheadersmap of stringrequiredsecretsSetarray of stringsrequiredThe names of secrets that have a value. Secret values are never returned.
Errors
- 401No key, or the key isn’t valid.
- 403The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).
- 404Not found, or not reachable with this key.
- 429Too many requests; wait for RateLimit-Reset seconds.
Try itRead-only. Sends a real request with your key.
curl https://api.unvop.com/v1/sites/site_123/connections/conn_123 \
-H "Authorization: Bearer $UNVOP_KEY"const res = await fetch('https://api.unvop.com/v1/sites/site_123/connections/conn_123', {
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.unvop.com/v1/sites/site_123/connections/conn_123",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
)
data = res.json(){
"id": "conn_123",
"name": "Ana",
"kind": "rest",
"baseUrl": "https://harbour-bakery.unvop.dev",
"headers": {},
"secretsSet": []
}Change a connection
/sites/{siteId}/connections/{connectionId}Change a connection. Secrets you send replace those names; secrets you leave out are kept. Owners and admins only.
Path parameters
siteIdstringrequiredThe site’s id.
connectionIdstringrequired
Request body JSON
namestringup to 80 characters
kindstringOne of
restgoogle-sheetairtablerssbaseUrlstringup to 2,000 characters
headersmap of stringPlain headers sent with every request.
secretsmap of stringSecret headers (or apiKey), encrypted at rest and never returned. Send an empty string to remove one; leave one out to keep it.
Response 200
idstringrequirednamestringrequiredkindstringrequiredOne of
restgoogle-sheetairtablerssbaseUrlstringrequiredheadersmap of stringrequiredsecretsSetarray of stringsrequiredThe names of secrets that have a value. Secret values are never returned.
Errors
- 401No key, or the key isn’t valid.
- 403The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).
- 404Not found, or not reachable with this key.
- 422The body is invalid; details say which values.
- 429Too many requests; wait for RateLimit-Reset seconds.
Try itSends a real request. Asks before it changes anything.
curl -X PATCH https://api.unvop.com/v1/sites/site_123/connections/conn_123 \
-H "Authorization: Bearer $UNVOP_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Ana",
"kind": "rest"
}'const res = await fetch('https://api.unvop.com/v1/sites/site_123/connections/conn_123', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: "Ana",
kind: "rest"
}),
});
const data = await res.json();import os, requests
res = requests.patch(
"https://api.unvop.com/v1/sites/site_123/connections/conn_123",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
json={
"name": "Ana",
"kind": "rest",
},
)
data = res.json(){
"id": "conn_123",
"name": "Ana",
"kind": "rest",
"baseUrl": "https://harbour-bakery.unvop.dev",
"headers": {},
"secretsSet": []
}Delete a connection
/sites/{siteId}/connections/{connectionId}Delete a connection. Collections that synced from it keep their entries and become manual. Owners and admins only.
Path parameters
siteIdstringrequiredThe site’s id.
connectionIdstringrequired
Response 200
oktruerequired
Errors
- 401No key, or the key isn’t valid.
- 403The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).
- 404Not found, or not reachable with this key.
- 429Too many requests; wait for RateLimit-Reset seconds.
Try itSends a real request. Asks before it changes anything.
curl -X DELETE https://api.unvop.com/v1/sites/site_123/connections/conn_123 \
-H "Authorization: Bearer $UNVOP_KEY"const res = await fetch('https://api.unvop.com/v1/sites/site_123/connections/conn_123', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.delete(
"https://api.unvop.com/v1/sites/site_123/connections/conn_123",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
)
data = res.json(){
"ok": true
}Test a connection
/sites/{siteId}/connections/{connectionId}/testCall the connection’s base URL and report what came back. The result is kept as its last test.
Path parameters
siteIdstringrequiredThe site’s id.
connectionIdstringrequired
Response 200
okbooleanrequiredstatusnumbersampleanyerrorstring
Errors
- 401No key, or the key isn’t valid.
- 403The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).
- 404Not found, or not reachable with this key.
- 429Too many requests; wait for RateLimit-Reset seconds.
Try itSends a real request. Asks before it changes anything.
curl -X POST https://api.unvop.com/v1/sites/site_123/connections/conn_123/test \
-H "Authorization: Bearer $UNVOP_KEY"const res = await fetch('https://api.unvop.com/v1/sites/site_123/connections/conn_123/test', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.post(
"https://api.unvop.com/v1/sites/site_123/connections/conn_123/test",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
)
data = res.json(){
"ok": true,
"status": 200,
"sample": {},
"error": null
}Call a connection
/sites/{siteId}/connections/{connectionId}/requestSend one request through a connection (its base URL plus path, with its headers and secrets) and see a sample of the answer. Private and local addresses are refused.
Path parameters
siteIdstringrequiredThe site’s id.
connectionIdstringrequired
Request body JSON
pathstringup to 1,000 characters
methodstringOne of
GETPOSTPUTPATCHDELETEHEADbodyany
Response 200
okbooleanrequiredstatusnumbersampleanyerrorstring
Errors
- 401No key, or the key isn’t valid.
- 403The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).
- 404Not found, or not reachable with this key.
- 422The body is invalid; details say which values.
- 429Too many requests; wait for RateLimit-Reset seconds.
Try itSends a real request. Asks before it changes anything.
curl https://api.unvop.com/v1/sites/site_123/connections/conn_123/request \
-H "Authorization: Bearer $UNVOP_KEY" \
-H "Content-Type: application/json" \
-d '{
"path": "/menu",
"method": "GET"
}'const res = await fetch('https://api.unvop.com/v1/sites/site_123/connections/conn_123/request', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
path: "/menu",
method: "GET"
}),
});
const data = await res.json();import os, requests
res = requests.post(
"https://api.unvop.com/v1/sites/site_123/connections/conn_123/request",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
json={
"path": "/menu",
"method": "GET",
},
)
data = res.json(){
"ok": true,
"status": 200,
"sample": {},
"error": null
}