AirHub API
  1. Surface
AirHub API
  • Introduction
  • Authorization
    • Overview
    • Get Oauth Token
      POST
  • Advisories
    • Advisory
      POST
    • Get Advisories BBox
      GET
    • Get Advisories GeoJSON
      POST
  • Briefing
    • Overview
    • B4UFLY
      • What Is B4UFLY
      • The API Basics
      • Location vs Area
      • v1
        • B4UFLY Briefing by Area v1
        • B4UFLY Briefing by Location v1
      • v2
        • What's New in v2
        • B4UFLY Briefing by Area v2
        • B4UFLY Briefing by Location v2
  • LAANC SDSP
    • Overview
    • ASL Operations
      • List Operations
      • Create Operation
      • Get Operation
      • Delete Operation
      • Update Operation
    • LAANC Operations
      • Get Operation
      • Delete Operation
      • Create Operation
      • Update Operation
    • LAANC Authorizations
      • Rescinded and Invalid Operations
      • Submit Authorization
      • Get Authorization
      • Cancel Authorization
      • Cancel Invalid Authorization
      • Close Authorization
      • Acknowledge Rescinded Authorization
    • Operation v2
      POST
    • Create Ephemeral Operations
      POST
  • Risk
    • Get Hazard
      POST
    • Get Hazard Ground Type
      POST
    • Get Hazard Ground Risk
      POST
  • Aviation
    • Aviation
      POST
  • Surface
    • Suitability
      POST
    • Classification Surface
      POST
    • Surface v2 GeoJSON
      POST
    • Surface v2 Hexbin
      POST
  • Route
    • Route v2
  • Check
    • Check Airspace
    • Get Status
  • Elevation - NEW
    • Elevation
  • Map Vector Tiles - NEW
    • Overview
    • Styled Tiles
    • Vector Tile
  1. Surface

Surface v2 Hexbin

Sandbox
https://airhub-api-sandbox.airspacelink.com
Sandbox
https://airhub-api-sandbox.airspacelink.com
POST
/v2/surface
Last modified:2024-05-17 17:30:46
Scope: surface:create
Combine authoritative data provided by Airspace Link with your own GIS data to deliver profile services tailored to your needs. Over 65 datasets that can be used as a feature within the surface engine to aggregate and process vast amounts of data. For a GeoJSON response, use the Surface v2 (GeoJSON) endpoint.

Request

Header Params
Content-Type
enum<string> 
required
Allowed value:
application/json;charset=UTF-8
Example:
application/json;charset=UTF-8
Authorization
string 
required
Authorization bearer accessToken generated in Authorization step
Example:
{{access-token}}
Body Params application/json
geometry
object 
required
GeoJSON formatted geometry. Must be a point, line, or polygon. The resulting bounding box of the geometry can't have a side length greater than 10 nautical miles.
coordinates
array [array] 
required
type
string 
required
layers
array [object {2}] 
required
Array of layer objects. Valid length of 1-5.
code
string 
optional
where
array [oneOf] 
optional
resolution
integer 
required
Hex grid resolution.
Example
{
    "geometry": {
        "coordinates": [
            [
                [
                    -83.2428932189941,
                    42.2835320469015
                ],
                [
                    -83.2011795043945,
                    42.2835320469015
                ],
                [
                    -83.2011795043945,
                    42.3354533445451
                ],
                [
                    -83.2428932189941,
                    42.3354533445451
                ],
                [
                    -83.2428932189941,
                    42.2835320469015
                ]
            ]
        ],
        "type": "Polygon"
    },
    "layers": [
        {
            "code": "code",
            "where": [
                "AND",
                [
                    [
                        "=",
                        "some_field",
                        100
                    ],
                    [
                        "<=",
                        "another_field",
                        200
                    ]
                ]
            ]
        }
    ],
    "resolution": 10
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://airhub-api-sandbox.airspacelink.com/v2/surface' \
--header 'Authorization: ' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{
    "geometry": {
        "coordinates": [
            [
                [
                    -83.2428932189941,
                    42.2835320469015
                ],
                [
                    -83.2011795043945,
                    42.2835320469015
                ],
                [
                    -83.2011795043945,
                    42.3354533445451
                ],
                [
                    -83.2428932189941,
                    42.3354533445451
                ],
                [
                    -83.2428932189941,
                    42.2835320469015
                ]
            ]
        ],
        "type": "Polygon"
    },
    "layers": [
        {
            "code": "code",
            "where": [
                "AND",
                [
                    [
                        "=",
                        "some_field",
                        100
                    ],
                    [
                        "<=",
                        "another_field",
                        200
                    ]
                ]
            ]
        }
    ],
    "resolution": 10
}'

Responses

🟢200Successful response
application/json
Body
data
array [object {2}] 
required
hexes
array[string]
optional
props
object 
optional
message
string 
required
statusCode
integer 
required
Example
{
    "data": [
        {
            "hexes": [
                "872ab2554ffffff",
                "872ab2550ffffff"
            ],
            "props": {
                "type": "code"
            }
        }
    ],
    "message": "success",
    "statusCode": 200
}
🟠400Your request was invalid JSON or is using invalid types
🟠408Your request timed out; try reducing the size of the request
🟠422Part of your request had invalid values
🔴500Internal error reaching data
Previous
Surface v2 GeoJSON
Next
Route v2
Built with