AstronomyAPI
  • 🚀Getting Started
  • API v2 Reference
    • 🪐Bodies
      • 🌐Positions
      • 🗓️Events
    • 📸Studio
      • ✨Star Chart
      • 🌒Moon Phase
    • 🔎Search
  • 🤝Requests and Responses
    • 🪐Body Properties
    • 🕚Event Properties
    • 🔎Search Result Properties
    • 🔭Observer Parameters
    • 🗓️Tabular Responses
    • 🔢Rows Responses
    • 🚩Error Responses
    • 🔢Constellation Enums
    • 🔢DSO Enums
  • Page
  • 🧩Widgets
  • ⚠️Known Issues
  • 📕Changelog
  • Links
    • demo.astronomyapi.com
    • Sample code on Github
    • Back to Dashboard
Powered by GitBook
On this page

Was this helpful?

  1. Requests and Responses

Rows Responses

Some endpoints return data as rows for easy rendering data as a list.

Certain API endpoints might return data as rows, so it's easier for you to render them in your template files.

You can get the rows array from the response object using data.rows.

{
    "data": {
        "dates": {
            "from": "2016-12-20T00:00:00",
            "to": "2016-12-22T23:59:59"
        },
        "observer": {
            "location": {
                "longitude": -84.39733,
                "latitude": 33.775867,
                "elevation": 1000
            }
        },
        "rows": [
            .... rows
        ]
    }
}

Each object in the rows array can be accessed by iterating the array.

PreviousTabular ResponsesNextError Responses

Last updated 2 years ago

Was this helpful?

For more information on how to render this type of data refer to the

🤝
🔢
samples repository