Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

launches/query endpoint does not return launch IDs for ship and crew launches #1220

Open
zacdevil10 opened this issue Sep 16, 2022 · 0 comments

Comments

@zacdevil10
Copy link
Contributor

When making the request below, not all launches for ships and crew have an ID

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

{
    "options": {
        "populate": [
            {
                "path": "ships",
                "populate": [
                    {
                        "path": "launches",
                        "select": [
                            "id",
                            "name"
                        ]
                    }
                ],
                "select": {
                    "name": 1
                }
            },
            {
                "path": "crew",
                "populate": [
                    {
                        "path": "launches",
                        "select": [
                            "id",
                            "name"
                        ]
                    }
                ],
                "select": {
                    "name": 1
                }
            }
        ],
        "select": [
            "id"
        ],
        "limit": 1000
    }
}

returns

{
    "docs": [
        {
            "crew": [],
            "ships": [
                {
                    "name": "Elsbeth III",
                    "launches": [
                        {
                            "name": "CRS-5"
                        }
                    ]
                }
            ],
            "id": "5eb87ce8ffd86e000604b33c"
        },
        {
            "crew": [],
            "ships": [
                {
                    "name": "NRC Quest",
                    "launches": [
                        {
                            "name": "CRS-5",
                            "id": "5eb87ce8ffd86e000604b33c"
                        }
                    ]
                }
            ],
            "id": "5eb87cf0ffd86e000604b343"
        }
    ],
    "totalDocs": 193,
    "offset": 0,
    "limit": 1000,
    "totalPages": 1,
    "page": 1,
    "pagingCounter": 1,
    "hasPrevPage": false,
    "hasNextPage": false,
    "prevPage": null,
    "nextPage": null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant