summaryrefslogtreecommitdiff
path: root/data/skyfi-api.rest
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-02-18 23:20:28 -0600
committerCraig Jennings <c@cjennings.net>2026-02-18 23:20:28 -0600
commitb19ad7899fecfb6835e19e23a7069233654c9fc7 (patch)
treea8f1747db2a1254d029234a29a45578088305ffc /data/skyfi-api.rest
parent6bf2688d0b3e4fef82671fb70e1aa883b0c90018 (diff)
feat(restclient): add REST API client for interactive API exploration
restclient.el + restclient-jq integration with SkyFi API templates, tutorial file, auto key injection from authinfo, 17 ERT tests.
Diffstat (limited to 'data/skyfi-api.rest')
-rw-r--r--data/skyfi-api.rest85
1 files changed, 85 insertions, 0 deletions
diff --git a/data/skyfi-api.rest b/data/skyfi-api.rest
new file mode 100644
index 00000000..9a5a4267
--- /dev/null
+++ b/data/skyfi-api.rest
@@ -0,0 +1,85 @@
+# -*- restclient -*-
+#
+# SkyFi Satellite Imagery API
+# https://app.skyfi.com/platform-api/redoc
+#
+# KEY INJECTION:
+# The :skyfi-key variable below is auto-populated from authinfo.gpg
+# when you open this file via C-; R s. The key is NEVER stored on disk.
+# If you see PLACEHOLDER, run C-; R s again or check your authinfo.gpg.
+#
+# authinfo.gpg entry format:
+# machine app.skyfi.com login apikey password YOUR_API_KEY_HERE
+
+:skyfi-key = PLACEHOLDER
+:skyfi-base = https://app.skyfi.com/platform-api
+
+#
+# ============================================================
+# Archive Search — find available satellite imagery
+# ============================================================
+#
+
+# Search for imagery over an area of interest (AOI)
+# Adjust the GeoJSON polygon, date range, and cloud cover as needed
+POST :skyfi-base/archive/search
+Content-Type: application/json
+APIKey: :skyfi-key
+
+{
+ "aoi": {
+ "type": "Polygon",
+ "coordinates": [[
+ [-90.10, 29.95],
+ [-90.05, 29.95],
+ [-90.05, 29.98],
+ [-90.10, 29.98],
+ [-90.10, 29.95]
+ ]]
+ },
+ "dateFrom": "2025-01-01T00:00:00Z",
+ "dateTo": "2025-12-31T23:59:59Z",
+ "cloudCover": 20
+}
+
+#
+# ============================================================
+# Pricing — get cost estimate for an archive item
+# ============================================================
+#
+
+# Replace ARCHIVE_ID with an ID from the search results above
+# TIP: Use jq to extract IDs: -> jq-set-var :archive-id .[0].id
+POST :skyfi-base/pricing
+Content-Type: application/json
+APIKey: :skyfi-key
+
+{
+ "archiveId": "ARCHIVE_ID_HERE",
+ "aoi": {
+ "type": "Polygon",
+ "coordinates": [[
+ [-90.10, 29.95],
+ [-90.05, 29.95],
+ [-90.05, 29.98],
+ [-90.10, 29.98],
+ [-90.10, 29.95]
+ ]]
+ }
+}
+
+#
+# ============================================================
+# Orders — place and check orders
+# ============================================================
+#
+
+# Check order status (replace ORDER_ID)
+GET :skyfi-base/orders/ORDER_ID_HERE
+APIKey: :skyfi-key
+
+#
+
+# List recent orders
+GET :skyfi-base/orders
+APIKey: :skyfi-key