Spacex-api: Possible to query next launch

Created on 19 Sep 2020  路  3Comments  路  Source: r-spacex/SpaceX-API

Is it possible to populate fields when requesting the next launch?

Tried:

POST: https://api.spacexdata.com/v4/launches/next/query
Body:
{
"options": {
"populate": [
"rocket"
]
}
}

Question

Most helpful comment

Not possible currently, but it can be done though the general launches query endpoint like this:

POST https://api.spacexdata.com/v4/launches/query

Body:

{
  "query": {
    "upcoming": true
  },
  "options": {
    "populate": [
      "rocket"
    ],
    "sort": {
      "flight_number": "asc"
    },
    "limit": 1,
  }
}

All 3 comments

Not possible currently, but it can be done though the general launches query endpoint like this:

POST https://api.spacexdata.com/v4/launches/query

Body:

{
  "query": {
    "upcoming": true
  },
  "options": {
    "populate": [
      "rocket"
    ],
    "sort": {
      "flight_number": "asc"
    },
    "limit": 1,
  }
}

Perfect! Thanks for the quick reply.

Always appreicate your great work 馃殌

Had the same request, thanks @jakewmeyer!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haroldadmin picture haroldadmin  路  6Comments

Tearth picture Tearth  路  4Comments

andrewconnell picture andrewconnell  路  5Comments

Tearth picture Tearth  路  6Comments

MattoDeg picture MattoDeg  路  6Comments