summaryrefslogtreecommitdiff
path: root/data/skyfi-api.rest
blob: 9a5a42678b685a50d65c4caae3d49b426cf7db44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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