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

Feed Search endpoint is returning DB id instead of feed.stable_id for feed_references field #389

Closed
davidgamez opened this issue Apr 17, 2024 · 0 comments · Fixed by #392
Assignees
Labels
bug Something isn't working

Comments

@davidgamez
Copy link
Member

davidgamez commented Apr 17, 2024

Describe the bug

The Feed Search endpoint returns the internal DB ID instead of the feed.stable_id in the GTFS-rt feed reference. All public endpoints are based on stable_id, so the internal ID is useless for consumers.

Steps/Code to Reproduce

Replace the token value for QA environment in the following curl command:

curl --location 'https://api-qa.mobilitydatabase.org//v1/search?search_query=New%20York&offset=10&limit=5&status=active' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <<TOKEN_HERE>>'

Expected Results

Feed references are populated with feed stable Id instead of DB internal Ids.

Actual Results

{
    "results": [
        {
            "id": "mdb-1633",
            "data_type": "gtfs_rt",
            "status": "active",
            "external_ids": [
                {
                    "external_id": "1633",
                    "source": "mdb"
                }
            ],
            "provider": "MTA New York City Transit",
            "feed_name": "NYC Subway JZ Lines",
            "note": "This source includes Vehicle Position and Trip Updates entities under the same feed.",
            "feed_contact_email": null,
            "source_info": {
                "producer_url": "https://api-endpoint.mta.info/Dataservice/mtagtfsfeeds/nyct%2Fgtfs-jz",
                "authentication_type": 2,
                "authentication_info_url": "https://api.mta.info/#/signup",
                "api_key_parameter_name": "x-api-key",
                "license_url": "https://api.mta.info/#/DataFeedAgreement"
            },
            "redirects": null,
            "locations": [
                {
                    "country_code": "US",
                    "subdivision_name": "New York",
                    "municipality": "New York City"
                }
            ],
            "latest_dataset": null,
            "entity_types": [
                "tu",
                "vp"
            ],
            "feed_references": [
                "5236ae89-9768-4f96-9571-cfe6c18926a6" // THIS VALUE SHOULD POINT TO THE STABLE ID
            ]
        },
..........

Screenshots

No response

Files used

No response

Additional notes

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant