---
title: "Retrieve geomagnetic coordinate grid"
method: GET
path: "/api/v1/utils/magnetic_grid"
tags: ["Utilities"]
---

# Retrieve geomagnetic coordinate grid

`GET /api/v1/utils/magnetic_grid`

## Request

- Base URL: `https://api.phys.ucalgary.ca` (the document declares no server; this is the origin it was published from)
- URL: `https://api.phys.ucalgary.ca/api/v1/utils/magnetic_grid`
- Auth: none declared
- TypeScript: <https://skmtc.dev/ucalgary/apis/ucalgary-space-remote-sensing-api/docs/api/v1/utils/magnetic_grid/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve a geomagnetic coordinate grid for a given timestamp.

The timestamp parameter should be supplied in the format "YYYY-MM-DDTHH:mm:ss". 
UTC is the expected timezone.

The grid consists of meridian lines (constant magnetic longitude, "vertical") and parallel lines
(constant magnetic latitude, "horizontal") for both northern and southern hemispheres.

Notes
  - The resolution_lon and resolution_lat parameters control the spacing (in degrees) between
magnetic longitude and latitude lines, respectively. Lower values produce a denser grid.
  - By default requests are cached. Use the 'no_cache' parameter to disable this functionality.

## Query parameters

- `timestamp` string, date-time, required
- `resolution_lon` number
- `resolution_lat` number
- `min_latitude` number
- `altitude_km` number
- `no_cache` boolean

## Response `200`

Geomagnetic grid in geographic coordinates

- MagneticGrid
  - `timestamp` string, date-time, required
  - `north` MagneticGridHemisphere, required
    - `vertical` array[], required
      - array[]
        - number[]
    - `horizontal` array[], required
      - array[]
        - number[]
  - `south` MagneticGridHemisphere, required
    - `vertical` array[], required
      - array[]
        - number[]
    - `horizontal` array[], required
      - array[]
        - number[]

## Other responses

- `400`: Problematic request made
- `422`: Validation Error

---

[API](https://skmtc.dev/ucalgary/apis/ucalgary-space-remote-sensing-api.md) - [All operations](https://skmtc.dev/ucalgary/apis/ucalgary-space-remote-sensing-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ucalgary/apis/ucalgary-space-remote-sensing-api/revisions/e451a425b5eb?raw)
