Subscribe to live trip updates

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://bump.sh/bump-examples/doc/train-travel-api/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Train Travel API MCP server": {
    "url": "https://bump.sh/bump-examples/doc/train-travel-api/mcp"
  }
}

Close
/trips/{id}

Open a stream of live updates for a trip, such as delays, platform changes, and departure or arrival events.

Choose JSON Lines (application/jsonl) or Server-Sent Events (text/event-stream) with the Accept header. The connection stays open until the trip arrives, is cancelled, or the client disconnects.

Path parameters

  • id string(uuid) Required

    The ID of the trip to subscribe to.

Responses

  • A stream of live trip status updates

    Hide headers attributes Show headers attributes
    • Cache-Control

      A comma-separated list of directives as defined in RFC 9111.

    • RateLimit

      The RateLimit header communicates quota policies. It contains a limit to convey the expiring limit, remaining to convey the remaining quota units, and reset to convey the time window reset time.

    Hide response attributes Show response attributes object
    • type string Required

      The kind of update.

      Values are delay, platform, departed, arrived, or cancelled.

    • trip_id string(uuid) Required

      Identifier of the trip this update belongs to.

    • occurred_at string(date-time) Required

      When the update occurred.

    • minutes integer

      Delay in minutes. Present when type is delay.

    • reason string

      Human-readable reason for the update.

    • platform string

      Assigned platform. Present when type is platform.

    Hide response attributes Show response attributes object
    • event string Required
    • data string Required
  • Bad Request

    Hide headers attribute Show headers attribute
    • RateLimit

      The RateLimit header communicates quota policies. It contains a limit to convey the expiring limit, remaining to convey the remaining quota units, and reset to convey the time window reset time.

    Hide response attributes Show response attributes object
    • type string

      A URI reference that identifies the problem type

    • title string

      A short, human-readable summary of the problem type

    • detail string

      A human-readable explanation specific to this occurrence of the problem

    • instance string

      A URI reference that identifies the specific occurrence of the problem

    • status integer

      The HTTP status code

    Hide response attributes Show response attributes object
    • type string

      A URI reference that identifies the problem type

    • title string

      A short, human-readable summary of the problem type

    • detail string

      A human-readable explanation specific to this occurrence of the problem

    • instance string

      A URI reference that identifies the specific occurrence of the problem

    • status integer

      The HTTP status code

  • Unauthorized

    Hide headers attribute Show headers attribute
    • RateLimit

      The RateLimit header communicates quota policies. It contains a limit to convey the expiring limit, remaining to convey the remaining quota units, and reset to convey the time window reset time.

    Hide response attributes Show response attributes object
    • type string

      A URI reference that identifies the problem type

    • title string

      A short, human-readable summary of the problem type

    • detail string

      A human-readable explanation specific to this occurrence of the problem

    • instance string

      A URI reference that identifies the specific occurrence of the problem

    • status integer

      The HTTP status code

    Hide response attributes Show response attributes object
    • type string

      A URI reference that identifies the problem type

    • title string

      A short, human-readable summary of the problem type

    • detail string

      A human-readable explanation specific to this occurrence of the problem

    • instance string

      A URI reference that identifies the specific occurrence of the problem

    • status integer

      The HTTP status code

  • Forbidden

    Hide headers attribute Show headers attribute
    • RateLimit

      The RateLimit header communicates quota policies. It contains a limit to convey the expiring limit, remaining to convey the remaining quota units, and reset to convey the time window reset time.

    Hide response attributes Show response attributes object
    • type string

      A URI reference that identifies the problem type

    • title string

      A short, human-readable summary of the problem type

    • detail string

      A human-readable explanation specific to this occurrence of the problem

    • instance string

      A URI reference that identifies the specific occurrence of the problem

    • status integer

      The HTTP status code

    Hide response attributes Show response attributes object
    • type string

      A URI reference that identifies the problem type

    • title string

      A short, human-readable summary of the problem type

    • detail string

      A human-readable explanation specific to this occurrence of the problem

    • instance string

      A URI reference that identifies the specific occurrence of the problem

    • status integer

      The HTTP status code

  • Not Found

    Hide headers attribute Show headers attribute
    • RateLimit

      The RateLimit header communicates quota policies. It contains a limit to convey the expiring limit, remaining to convey the remaining quota units, and reset to convey the time window reset time.

    Hide response attributes Show response attributes object
    • type string

      A URI reference that identifies the problem type

    • title string

      A short, human-readable summary of the problem type

    • detail string

      A human-readable explanation specific to this occurrence of the problem

    • instance string

      A URI reference that identifies the specific occurrence of the problem

    • status integer

      The HTTP status code

    Hide response attributes Show response attributes object
    • type string

      A URI reference that identifies the problem type

    • title string

      A short, human-readable summary of the problem type

    • detail string

      A human-readable explanation specific to this occurrence of the problem

    • instance string

      A URI reference that identifies the specific occurrence of the problem

    • status integer

      The HTTP status code

  • Too Many Requests

    Hide headers attributes Show headers attributes
    • RateLimit

      The RateLimit header communicates quota policies. It contains a limit to convey the expiring limit, remaining to convey the remaining quota units, and reset to convey the time window reset time.

    • Retry-After

      The Retry-After header indicates how long the user agent should wait before making a follow-up request. The value is in seconds and can be an integer or a date in the future. If the value is an integer, it indicates the number of seconds to wait. If the value is a date, it indicates the time at which the user agent should make a follow-up request.

    Hide response attributes Show response attributes object
    • type string

      A URI reference that identifies the problem type

    • title string

      A short, human-readable summary of the problem type

    • detail string

      A human-readable explanation specific to this occurrence of the problem

    • instance string

      A URI reference that identifies the specific occurrence of the problem

    • status integer

      The HTTP status code

    Hide response attributes Show response attributes object
    • type string

      A URI reference that identifies the problem type

    • title string

      A short, human-readable summary of the problem type

    • detail string

      A human-readable explanation specific to this occurrence of the problem

    • instance string

      A URI reference that identifies the specific occurrence of the problem

    • status integer

      The HTTP status code

  • Internal Server Error

    Hide headers attribute Show headers attribute
    • RateLimit

      The RateLimit header communicates quota policies. It contains a limit to convey the expiring limit, remaining to convey the remaining quota units, and reset to convey the time window reset time.

    Hide response attributes Show response attributes object
    • type string

      A URI reference that identifies the problem type

    • title string

      A short, human-readable summary of the problem type

    • detail string

      A human-readable explanation specific to this occurrence of the problem

    • instance string

      A URI reference that identifies the specific occurrence of the problem

    • status integer

      The HTTP status code

    Hide response attributes Show response attributes object
    • type string

      A URI reference that identifies the problem type

    • title string

      A short, human-readable summary of the problem type

    • detail string

      A human-readable explanation specific to this occurrence of the problem

    • instance string

      A URI reference that identifies the specific occurrence of the problem

    • status integer

      The HTTP status code

SUBSCRIBE /trips/{id}
curl \
 --request SUBSCRIBE 'https://try.microcks.io/rest/Train+Travel+API/1.0.0/trips/ea399ba1-6d95-433f-92d1-83f67b775594' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
Each line is a complete TripUpdate object.
{"type":"delay","trip_id":"ea399ba1-6d95-433f-92d1-83f67b775594","occurred_at":"2024-02-01T09:12:00Z","minutes":12,"reason":"Signal failure near Hannover"}
{"type":"platform","trip_id":"ea399ba1-6d95-433f-92d1-83f67b775594","occurred_at":"2024-02-01T09:18:00Z","platform":"7"}
{"type":"departed","trip_id":"ea399ba1-6d95-433f-92d1-83f67b775594","occurred_at":"2024-02-01T10:12:00Z"}
Response examples (200)
event: delay
data: {"type":"delay","trip_id":"ea399ba1-6d95-433f-92d1-83f67b775594","occurred_at":"2024-02-01T09:12:00Z","minutes":12,"reason":"Signal failure near Hannover"}

event: platform
data: {"type":"platform","trip_id":"ea399ba1-6d95-433f-92d1-83f67b775594","occurred_at":"2024-02-01T09:18:00Z","platform":"7"}

event: departed
data: {"type":"departed","trip_id":"ea399ba1-6d95-433f-92d1-83f67b775594","occurred_at":"2024-02-01T10:12:00Z"}
Response examples (400)
{
  "type": "https://example.com/errors/bad-request",
  "title": "Bad Request",
  "status": 400,
  "detail": "The request is invalid or missing required parameters."
}
Response examples (400)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <type>https://example.com/errors/bad-request</type>
  <title>Bad Request</title>
  <status type="integer">400</status>
  <detail>The request is invalid or missing required parameters.</detail>
</root>
Response examples (401)
{
  "type": "https://example.com/errors/unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "You do not have the necessary permissions."
}
Response examples (401)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <type>https://example.com/errors/unauthorized</type>
  <title>Unauthorized</title>
  <status type="integer">401</status>
  <detail>You do not have the necessary permissions.</detail>
</root>
Response examples (403)
{
  "type": "https://example.com/errors/forbidden",
  "title": "Forbidden",
  "status": 403,
  "detail": "Access is forbidden with the provided credentials."
}
Response examples (403)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <type>https://example.com/errors/forbidden</type>
  <title>Forbidden</title>
  <status type="integer">403</status>
  <detail>Access is forbidden with the provided credentials.</detail>
</root>
Response examples (404)
{
  "type": "https://example.com/errors/not-found",
  "title": "Not Found",
  "status": 404,
  "detail": "The requested resource was not found."
}
Response examples (404)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <type>https://example.com/errors/not-found</type>
  <title>Not Found</title>
  <status type="integer">404</status>
  <detail>The requested resource was not found.</detail>
</root>
Response examples (429)
{
  "type": "https://example.com/errors/too-many-requests",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "You have exceeded the rate limit."
}
Response examples (429)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <type>https://example.com/errors/too-many-requests</type>
  <title>Too Many Requests</title>
  <status type="integer">429</status>
  <detail>You have exceeded the rate limit.</detail>
</root>
Response examples (500)
{
  "type": "https://example.com/errors/internal-server-error",
  "title": "Internal Server Error",
  "status": 500,
  "detail": "An unexpected error occurred."
}
Response examples (500)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <type>https://example.com/errors/internal-server-error</type>
  <title>Internal Server Error</title>
  <status type="integer">500</status>
  <detail>An unexpected error occurred.</detail>
</root>