diff --git a/src/main/java/org/opentripplanner/middleware/OtpMiddlewareMain.java b/src/main/java/org/opentripplanner/middleware/OtpMiddlewareMain.java
index 3b34d3bc..b6f9093f 100644
--- a/src/main/java/org/opentripplanner/middleware/OtpMiddlewareMain.java
+++ b/src/main/java/org/opentripplanner/middleware/OtpMiddlewareMain.java
@@ -121,19 +121,18 @@ private static void initializeHttpEndpoints() throws IOException {
.endpoints(() -> List.of(
new AdminUserController(API_PREFIX),
new ApiUserController(API_PREFIX),
+ new CDPFilesController(API_PREFIX),
new CDPUserController(API_PREFIX),
+ new ErrorEventsController(API_PREFIX),
+ new LogController(API_PREFIX),
+ new MonitoredComponentController(API_PREFIX),
new MonitoredTripController(API_PREFIX),
+ new OtpRequestProcessor("/otp", OtpVersion.OTP2),
+ new OtpRequestProcessor("/otp2", OtpVersion.OTP2),
+ new OtpUserController(API_PREFIX),
new TrackedTripController(API_PREFIX),
new TripHistoryController(API_PREFIX),
- new MonitoredComponentController(API_PREFIX),
- new OtpUserController(API_PREFIX),
- new LogController(API_PREFIX),
- new ErrorEventsController(API_PREFIX),
- new CDPFilesController(API_PREFIX),
- new TripSurveyController(API_PREFIX),
- new OtpRequestProcessor("/otp", OtpVersion.OTP2),
- new OtpRequestProcessor("/otp2", OtpVersion.OTP2)
- // Add other endpoints as needed.
+ new TripSurveyController(API_PREFIX)
))
// Spark-swagger auto-generates a swagger document at localhost:4567/doc.yaml.
// (That path is not configurable.)
diff --git a/src/main/resources/latest-spark-swagger-output.yaml b/src/main/resources/latest-spark-swagger-output.yaml
index a211bd6a..3e8f05d5 100644
--- a/src/main/resources/latest-spark-swagger-output.yaml
+++ b/src/main/resources/latest-spark-swagger-output.yaml
@@ -18,31 +18,31 @@ tags:
description: "Interface for querying and managing 'AdminUser' entities."
- name: "api/secure/application"
description: "Interface for querying and managing 'ApiUser' entities."
+- name: "api/secure/connected-data"
+ description: "Interface for listing and downloading CDP files from S3."
- name: "api/secure/cdp"
description: "Interface for querying and managing 'CDPUser' entities."
-- name: "api/secure/monitoredtrip"
- description: "Interface for querying and managing 'MonitoredTrip' entities."
-- name: "api/secure/triprequests"
- description: "Interface for retrieving trip requests."
-- name: "api/secure/monitoredcomponent"
- description: "Interface for querying and managing 'MonitoredComponent' entities."
-- name: "api/secure/user"
- description: "Interface for querying and managing 'OtpUser' entities."
-- name: "api/secure/logs"
- description: "Interface for retrieving API logs from AWS."
- name: "api/admin/bugsnag/eventsummary"
description: "Interface for reporting and retrieving application errors using Bugsnag."
-- name: "api/secure/connected-data"
- description: "Interface for listing and downloading CDP files from S3."
-- name: "api/trip-survey"
- description: "Interface for tracking opened trip surveys following a trip survey\
- \ notification."
+- name: "api/secure/logs"
+ description: "Interface for retrieving API logs from AWS."
+- name: "api/secure/monitoredcomponent"
+ description: "Interface for querying and managing 'MonitoredComponent' entities."
+- name: "api/secure/monitoredtrip"
+ description: "Interface for querying and managing 'MonitoredTrip' entities."
- name: "otp"
description: "Proxy interface for OTP 2 endpoints. Refer to OTP's\
\ API documentation for OTP's supported API resources."
- name: "otp2"
description: "Proxy interface for OTP 2 endpoints. Refer to OTP's\
\ API documentation for OTP's supported API resources."
+- name: "api/secure/user"
+ description: "Interface for querying and managing 'OtpUser' entities."
+- name: "api/secure/triprequests"
+ description: "Interface for retrieving trip requests."
+- name: "api/trip-survey"
+ description: "Interface for tracking opened trip surveys following a trip survey\
+ \ notification."
schemes:
- "https"
paths:
@@ -744,6 +744,62 @@ paths:
description: "An error occurred while performing the request. Contact an\
\ API administrator for more information."
examples: {}
+ /api/secure/connected-data:
+ get:
+ tags:
+ - "api/secure/connected-data"
+ description: "Gets a paginated list of CDP zip files in the configured S3 bucket."
+ produces:
+ - "application/json"
+ parameters:
+ - name: "limit"
+ in: "query"
+ description: "If specified, the maximum number of items to return."
+ required: false
+ type: "string"
+ default: "10"
+ - name: "offset"
+ in: "query"
+ description: "If specified, the number of records to skip/offset."
+ required: false
+ type: "string"
+ default: "0"
+ responses:
+ "200":
+ description: "successful operation"
+ responseSchema:
+ type: "array"
+ items:
+ $ref: "#/definitions/CDPFile"
+ schema:
+ type: "array"
+ items:
+ $ref: "#/definitions/CDPFile"
+ /api/secure/connected-data/download:
+ get:
+ tags:
+ - "api/secure/connected-data"
+ description: "Generates a download link for a specified object within the CDP\
+ \ bucket."
+ produces:
+ - "application/json"
+ parameters:
+ - name: "/download"
+ in: "query"
+ description: "The key of the object to generate a link for."
+ required: true
+ type: "string"
+ responses:
+ "200":
+ description: "successful operation"
+ responseSchema:
+ type: "array"
+ items:
+ $ref: "#/definitions/URL"
+ schema:
+ type: "array"
+ items:
+ $ref: "#/definitions/URL"
/api/secure/cdp/fromtoken:
get:
tags:
@@ -1034,54 +1090,83 @@ paths:
description: "An error occurred while performing the request. Contact an\
\ API administrator for more information."
examples: {}
- /api/secure/monitoredtrip/checkitinerary:
- post:
+ /api/admin/bugsnag/eventsummary:
+ get:
tags:
- - "api/secure/monitoredtrip"
- description: "Returns the itinerary existence check results for a monitored\
- \ trip."
+ - "api/admin/bugsnag/eventsummary"
+ description: "Gets a paginated list of the latest Bugsnag event summaries."
produces:
- "application/json"
parameters:
- - in: "body"
- name: "body"
- description: "Body object description"
- required: true
- schema:
- $ref: "#/definitions/MonitoredTrip"
+ - name: "limit"
+ in: "query"
+ description: "If specified, the maximum number of items to return."
+ required: false
+ type: "string"
+ default: "10"
+ - name: "offset"
+ in: "query"
+ description: "If specified, the number of records to skip/offset."
+ required: false
+ type: "string"
+ default: "0"
responses:
"200":
- description: "Successful operation"
- examples: {}
+ description: "successful operation"
responseSchema:
- $ref: "#/definitions/ItineraryExistence"
+ type: "array"
+ items:
+ $ref: "#/definitions/BugsnagEvent"
schema:
- $ref: "#/definitions/ItineraryExistence"
- "400":
- description: "The request was not formed properly (e.g., some required parameters\
- \ may be missing). See the details of the returned response to determine\
- \ the exact issue."
- examples: {}
- "401":
- description: "The server was not able to authenticate the request. This\
- \ can happen if authentication headers are missing or malformed, or the\
- \ authentication server cannot be reached."
- examples: {}
- "403":
- description: "The requesting user is not allowed to perform the request."
- examples: {}
- "404":
- description: "The requested item was not found."
- examples: {}
- "500":
- description: "An error occurred while performing the request. Contact an\
- \ API administrator for more information."
- examples: {}
- /api/secure/monitoredtrip:
+ type: "array"
+ items:
+ $ref: "#/definitions/BugsnagEvent"
+ /api/secure/logs:
get:
tags:
- - "api/secure/monitoredtrip"
- description: "Gets a paginated list of all 'MonitoredTrip' entities."
+ - "api/secure/logs"
+ description: "Gets a list of all API usage logs."
+ produces:
+ - "application/json"
+ parameters:
+ - name: "keyId"
+ in: "query"
+ description: "If specified, restricts the search to the specified AWS API\
+ \ key ID."
+ required: false
+ type: "string"
+ - name: "startDate"
+ in: "query"
+ description: "If specified, the earliest date (format yyyy-MM-dd) for which\
+ \ usage logs are retrieved."
+ required: false
+ type: "string"
+ default: "30 days prior to the current date"
+ pattern: "yyyy-MM-dd"
+ - name: "endDate"
+ in: "query"
+ description: "If specified, the latest date (format yyyy-MM-dd) for which\
+ \ usage logs are retrieved."
+ required: false
+ type: "string"
+ default: "The current date"
+ pattern: "yyyy-MM-dd"
+ responses:
+ "200":
+ description: "successful operation"
+ responseSchema:
+ type: "array"
+ items:
+ $ref: "#/definitions/ApiUsageResult"
+ schema:
+ type: "array"
+ items:
+ $ref: "#/definitions/ApiUsageResult"
+ /api/secure/monitoredcomponent:
+ get:
+ tags:
+ - "api/secure/monitoredcomponent"
+ description: "Gets a paginated list of all 'MonitoredComponent' entities."
produces:
- "application/json"
parameters:
@@ -1111,8 +1196,8 @@ paths:
$ref: "#/definitions/ResponseList"
post:
tags:
- - "api/secure/monitoredtrip"
- description: "Creates a 'MonitoredTrip' entity."
+ - "api/secure/monitoredcomponent"
+ description: "Creates a 'MonitoredComponent' entity."
consumes:
- "application/json"
produces:
@@ -1123,15 +1208,15 @@ paths:
description: "Body object description"
required: true
schema:
- $ref: "#/definitions/MonitoredTrip"
+ $ref: "#/definitions/MonitoredComponent"
responses:
"200":
description: "Successful operation"
examples: {}
responseSchema:
- $ref: "#/definitions/MonitoredTrip"
+ $ref: "#/definitions/MonitoredComponent"
schema:
- $ref: "#/definitions/MonitoredTrip"
+ $ref: "#/definitions/MonitoredComponent"
"400":
description: "The request was not formed properly (e.g., some required parameters\
\ may be missing). See the details of the returned response to determine\
@@ -1152,12 +1237,12 @@ paths:
description: "An error occurred while performing the request. Contact an\
\ API administrator for more information."
examples: {}
- /api/secure/monitoredtrip/{id}:
+ /api/secure/monitoredcomponent/{id}:
get:
tags:
- - "api/secure/monitoredtrip"
- description: "Returns the 'MonitoredTrip' entity with the specified id, or 404\
- \ if not found."
+ - "api/secure/monitoredcomponent"
+ description: "Returns the 'MonitoredComponent' entity with the specified id,\
+ \ or 404 if not found."
produces:
- "application/json"
parameters:
@@ -1171,9 +1256,9 @@ paths:
description: "Successful operation"
examples: {}
responseSchema:
- $ref: "#/definitions/MonitoredTrip"
+ $ref: "#/definitions/MonitoredComponent"
schema:
- $ref: "#/definitions/MonitoredTrip"
+ $ref: "#/definitions/MonitoredComponent"
"400":
description: "The request was not formed properly (e.g., some required parameters\
\ may be missing). See the details of the returned response to determine\
@@ -1196,8 +1281,8 @@ paths:
examples: {}
put:
tags:
- - "api/secure/monitoredtrip"
- description: "Updates and returns the 'MonitoredTrip' entity with the specified\
+ - "api/secure/monitoredcomponent"
+ description: "Updates and returns the 'MonitoredComponent' entity with the specified\
\ id, or 404 if not found."
consumes:
- "application/json"
@@ -1214,15 +1299,15 @@ paths:
description: "Body object description"
required: true
schema:
- $ref: "#/definitions/MonitoredTrip"
+ $ref: "#/definitions/MonitoredComponent"
responses:
"200":
description: "Successful operation"
examples: {}
responseSchema:
- $ref: "#/definitions/MonitoredTrip"
+ $ref: "#/definitions/MonitoredComponent"
schema:
- $ref: "#/definitions/MonitoredTrip"
+ $ref: "#/definitions/MonitoredComponent"
"400":
description: "The request was not formed properly (e.g., some required parameters\
\ may be missing). See the details of the returned response to determine\
@@ -1245,9 +1330,9 @@ paths:
examples: {}
delete:
tags:
- - "api/secure/monitoredtrip"
- description: "Deletes the 'MonitoredTrip' entity with the specified id if it\
- \ exists."
+ - "api/secure/monitoredcomponent"
+ description: "Deletes the 'MonitoredComponent' entity with the specified id\
+ \ if it exists."
produces:
- "application/json"
parameters:
@@ -1261,9 +1346,9 @@ paths:
description: "Successful operation"
examples: {}
responseSchema:
- $ref: "#/definitions/MonitoredTrip"
+ $ref: "#/definitions/MonitoredComponent"
schema:
- $ref: "#/definitions/MonitoredTrip"
+ $ref: "#/definitions/MonitoredComponent"
"400":
description: "The request was not formed properly (e.g., some required parameters\
\ may be missing). See the details of the returned response to determine\
@@ -1284,11 +1369,12 @@ paths:
description: "An error occurred while performing the request. Contact an\
\ API administrator for more information."
examples: {}
- /api/secure/monitoredtrip/starttracking:
+ /api/secure/monitoredtrip/checkitinerary:
post:
tags:
- "api/secure/monitoredtrip"
- description: "Initiates the tracking of a monitored trip."
+ description: "Returns the itinerary existence check results for a monitored\
+ \ trip."
produces:
- "application/json"
parameters:
@@ -1297,151 +1383,40 @@ paths:
description: "Body object description"
required: true
schema:
- $ref: "#/definitions/StartTrackingPayload"
+ $ref: "#/definitions/MonitoredTrip"
responses:
"200":
- description: "successful operation"
+ description: "Successful operation"
+ examples: {}
responseSchema:
- $ref: "#/definitions/TrackingResponse"
+ $ref: "#/definitions/ItineraryExistence"
schema:
- $ref: "#/definitions/TrackingResponse"
- /api/secure/monitoredtrip/updatetracking:
- post:
- tags:
- - "api/secure/monitoredtrip"
- description: "Provides tracking updates on a monitored trip."
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "Body object description"
- required: true
- schema:
- $ref: "#/definitions/UpdatedTrackingPayload"
- responses:
- "200":
- description: "successful operation"
- responseSchema:
- $ref: "#/definitions/TrackingResponse"
- schema:
- $ref: "#/definitions/TrackingResponse"
- /api/secure/monitoredtrip/track:
- post:
- tags:
- - "api/secure/monitoredtrip"
- description: "Starts or updates tracking on a monitored trip."
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "Body object description"
- required: true
- schema:
- $ref: "#/definitions/TrackPayload"
- responses:
- "200":
- description: "successful operation"
- responseSchema:
- $ref: "#/definitions/TrackingResponse"
- schema:
- $ref: "#/definitions/TrackingResponse"
- /api/secure/monitoredtrip/endtracking:
- post:
- tags:
- - "api/secure/monitoredtrip"
- description: "Terminates the tracking of a monitored trip by the user."
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "Body object description"
- required: true
- schema:
- $ref: "#/definitions/EndTrackingPayload"
- responses:
- "200":
- description: "successful operation"
- responseSchema:
- $ref: "#/definitions/EndTrackingResponse"
- schema:
- $ref: "#/definitions/EndTrackingResponse"
- /api/secure/monitoredtrip/forciblyendtracking:
- post:
- tags:
- - "api/secure/monitoredtrip"
- description: "Forcibly terminates tracking of a monitored trip by trip ID."
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "Body object description"
- required: true
- schema:
- $ref: "#/definitions/ForceEndTrackingPayload"
- responses:
- "200":
- description: "successful operation"
- responseSchema:
- $ref: "#/definitions/EndTrackingResponse"
- schema:
- $ref: "#/definitions/EndTrackingResponse"
- /api/secure/triprequests:
- get:
- tags:
- - "api/secure/triprequests"
- description: "Gets a paginated list of the most recent trip requests for a user."
- produces:
- - "application/json"
- parameters:
- - name: "userId"
- in: "query"
- description: "The OTP user for which to retrieve trip requests."
- required: true
- type: "string"
- - name: "limit"
- in: "query"
- description: "If specified, the maximum number of items to return."
- required: false
- type: "string"
- default: "10"
- - name: "offset"
- in: "query"
- description: "If specified, the number of records to skip/offset."
- required: false
- type: "string"
- default: "0"
- - name: "fromDate"
- in: "query"
- description: "If specified, the earliest date (format yyyy-MM-dd) for which\
- \ trip requests are retrieved."
- required: false
- type: "string"
- default: "The current date"
- pattern: "yyyy-MM-dd"
- - name: "toDate"
- in: "query"
- description: "If specified, the latest date (format yyyy-MM-dd) for which\
- \ trip requests are retrieved."
- required: false
- type: "string"
- default: "The current date"
- pattern: "yyyy-MM-dd"
- responses:
- "200":
- description: "successful operation"
- responseSchema:
- $ref: "#/definitions/TripRequest"
- schema:
- $ref: "#/definitions/TripRequest"
- /api/secure/monitoredcomponent:
+ $ref: "#/definitions/ItineraryExistence"
+ "400":
+ description: "The request was not formed properly (e.g., some required parameters\
+ \ may be missing). See the details of the returned response to determine\
+ \ the exact issue."
+ examples: {}
+ "401":
+ description: "The server was not able to authenticate the request. This\
+ \ can happen if authentication headers are missing or malformed, or the\
+ \ authentication server cannot be reached."
+ examples: {}
+ "403":
+ description: "The requesting user is not allowed to perform the request."
+ examples: {}
+ "404":
+ description: "The requested item was not found."
+ examples: {}
+ "500":
+ description: "An error occurred while performing the request. Contact an\
+ \ API administrator for more information."
+ examples: {}
+ /api/secure/monitoredtrip:
get:
tags:
- - "api/secure/monitoredcomponent"
- description: "Gets a paginated list of all 'MonitoredComponent' entities."
+ - "api/secure/monitoredtrip"
+ description: "Gets a paginated list of all 'MonitoredTrip' entities."
produces:
- "application/json"
parameters:
@@ -1471,8 +1446,8 @@ paths:
$ref: "#/definitions/ResponseList"
post:
tags:
- - "api/secure/monitoredcomponent"
- description: "Creates a 'MonitoredComponent' entity."
+ - "api/secure/monitoredtrip"
+ description: "Creates a 'MonitoredTrip' entity."
consumes:
- "application/json"
produces:
@@ -1483,15 +1458,15 @@ paths:
description: "Body object description"
required: true
schema:
- $ref: "#/definitions/MonitoredComponent"
+ $ref: "#/definitions/MonitoredTrip"
responses:
"200":
description: "Successful operation"
examples: {}
responseSchema:
- $ref: "#/definitions/MonitoredComponent"
+ $ref: "#/definitions/MonitoredTrip"
schema:
- $ref: "#/definitions/MonitoredComponent"
+ $ref: "#/definitions/MonitoredTrip"
"400":
description: "The request was not formed properly (e.g., some required parameters\
\ may be missing). See the details of the returned response to determine\
@@ -1512,12 +1487,12 @@ paths:
description: "An error occurred while performing the request. Contact an\
\ API administrator for more information."
examples: {}
- /api/secure/monitoredcomponent/{id}:
+ /api/secure/monitoredtrip/{id}:
get:
tags:
- - "api/secure/monitoredcomponent"
- description: "Returns the 'MonitoredComponent' entity with the specified id,\
- \ or 404 if not found."
+ - "api/secure/monitoredtrip"
+ description: "Returns the 'MonitoredTrip' entity with the specified id, or 404\
+ \ if not found."
produces:
- "application/json"
parameters:
@@ -1531,9 +1506,9 @@ paths:
description: "Successful operation"
examples: {}
responseSchema:
- $ref: "#/definitions/MonitoredComponent"
+ $ref: "#/definitions/MonitoredTrip"
schema:
- $ref: "#/definitions/MonitoredComponent"
+ $ref: "#/definitions/MonitoredTrip"
"400":
description: "The request was not formed properly (e.g., some required parameters\
\ may be missing). See the details of the returned response to determine\
@@ -1556,8 +1531,8 @@ paths:
examples: {}
put:
tags:
- - "api/secure/monitoredcomponent"
- description: "Updates and returns the 'MonitoredComponent' entity with the specified\
+ - "api/secure/monitoredtrip"
+ description: "Updates and returns the 'MonitoredTrip' entity with the specified\
\ id, or 404 if not found."
consumes:
- "application/json"
@@ -1574,15 +1549,15 @@ paths:
description: "Body object description"
required: true
schema:
- $ref: "#/definitions/MonitoredComponent"
+ $ref: "#/definitions/MonitoredTrip"
responses:
"200":
description: "Successful operation"
examples: {}
responseSchema:
- $ref: "#/definitions/MonitoredComponent"
+ $ref: "#/definitions/MonitoredTrip"
schema:
- $ref: "#/definitions/MonitoredComponent"
+ $ref: "#/definitions/MonitoredTrip"
"400":
description: "The request was not formed properly (e.g., some required parameters\
\ may be missing). See the details of the returned response to determine\
@@ -1605,9 +1580,9 @@ paths:
examples: {}
delete:
tags:
- - "api/secure/monitoredcomponent"
- description: "Deletes the 'MonitoredComponent' entity with the specified id\
- \ if it exists."
+ - "api/secure/monitoredtrip"
+ description: "Deletes the 'MonitoredTrip' entity with the specified id if it\
+ \ exists."
produces:
- "application/json"
parameters:
@@ -1621,9 +1596,9 @@ paths:
description: "Successful operation"
examples: {}
responseSchema:
- $ref: "#/definitions/MonitoredComponent"
+ $ref: "#/definitions/MonitoredTrip"
schema:
- $ref: "#/definitions/MonitoredComponent"
+ $ref: "#/definitions/MonitoredTrip"
"400":
description: "The request was not formed properly (e.g., some required parameters\
\ may be missing). See the details of the returned response to determine\
@@ -1644,50 +1619,122 @@ paths:
description: "An error occurred while performing the request. Contact an\
\ API administrator for more information."
examples: {}
- /api/secure/user/acceptdependent:
+ /otp/*:
get:
tags:
- - "api/secure/user"
- description: "Accept a dependent request."
- parameters: []
+ - "otp"
+ description: "Forwards any GET request to OTP 2. Refer to OTP's\
+ \ API documentation for OTP's supported API resources."
+ produces:
+ - "application/json"
+ - "application/xml"
+ parameters:
+ - name: "userId"
+ in: "query"
+ description: "If a third-party application is making a trip plan request on\
+ \ behalf of an end user (OtpUser), the user id must be specified."
+ required: false
+ type: "string"
responses:
"200":
- description: "Successful operation"
- examples: {}
- responseSchema:
- $ref: "#/definitions/OtpUser"
- schema:
- $ref: "#/definitions/OtpUser"
- "400":
- description: "The request was not formed properly (e.g., some required parameters\
- \ may be missing). See the details of the returned response to determine\
- \ the exact issue."
- examples: {}
- "401":
- description: "The server was not able to authenticate the request. This\
- \ can happen if authentication headers are missing or malformed, or the\
- \ authentication server cannot be reached."
- examples: {}
- "403":
- description: "The requesting user is not allowed to perform the request."
- examples: {}
- "404":
- description: "The requested item was not found."
- examples: {}
- "500":
- description: "An error occurred while performing the request. Contact an\
- \ API administrator for more information."
- examples: {}
- /api/secure/user/getdependentmobilityprofile:
- get:
+ description: "successful operation"
+ post:
tags:
- - "api/secure/user"
- description: "Retrieve the mobility profile for each valid dependent user id\
- \ provided."
- parameters: []
+ - "otp"
+ description: "Forwards any POST request to OTP 2. Refer to OTP's\
+ \ API documentation for OTP's supported API resources."
+ produces:
+ - "application/json"
+ parameters:
+ - name: "userId"
+ in: "query"
+ description: "If a third-party application is making a trip plan request on\
+ \ behalf of an end user (OtpUser), the user id must be specified."
+ required: false
+ type: "string"
responses:
"200":
- description: "Successful operation"
+ description: "successful operation"
+ /otp2/*:
+ get:
+ tags:
+ - "otp2"
+ description: "Forwards any GET request to OTP 2. Refer to OTP's\
+ \ API documentation for OTP's supported API resources."
+ produces:
+ - "application/json"
+ - "application/xml"
+ parameters:
+ - name: "userId"
+ in: "query"
+ description: "If a third-party application is making a trip plan request on\
+ \ behalf of an end user (OtpUser), the user id must be specified."
+ required: false
+ type: "string"
+ responses:
+ "200":
+ description: "successful operation"
+ post:
+ tags:
+ - "otp2"
+ description: "Forwards any POST request to OTP 2. Refer to OTP's\
+ \ API documentation for OTP's supported API resources."
+ produces:
+ - "application/json"
+ parameters:
+ - name: "userId"
+ in: "query"
+ description: "If a third-party application is making a trip plan request on\
+ \ behalf of an end user (OtpUser), the user id must be specified."
+ required: false
+ type: "string"
+ responses:
+ "200":
+ description: "successful operation"
+ /api/secure/user/acceptdependent:
+ get:
+ tags:
+ - "api/secure/user"
+ description: "Accept a dependent request."
+ parameters: []
+ responses:
+ "200":
+ description: "Successful operation"
+ examples: {}
+ responseSchema:
+ $ref: "#/definitions/OtpUser"
+ schema:
+ $ref: "#/definitions/OtpUser"
+ "400":
+ description: "The request was not formed properly (e.g., some required parameters\
+ \ may be missing). See the details of the returned response to determine\
+ \ the exact issue."
+ examples: {}
+ "401":
+ description: "The server was not able to authenticate the request. This\
+ \ can happen if authentication headers are missing or malformed, or the\
+ \ authentication server cannot be reached."
+ examples: {}
+ "403":
+ description: "The requesting user is not allowed to perform the request."
+ examples: {}
+ "404":
+ description: "The requested item was not found."
+ examples: {}
+ "500":
+ description: "An error occurred while performing the request. Contact an\
+ \ API administrator for more information."
+ examples: {}
+ /api/secure/user/getdependentmobilityprofile:
+ get:
+ tags:
+ - "api/secure/user"
+ description: "Retrieve the mobility profile for each valid dependent user id\
+ \ provided."
+ parameters: []
+ responses:
+ "200":
+ description: "Successful operation"
examples: {}
responseSchema:
$ref: "#/definitions/MobilityProfileLite"
@@ -2049,227 +2096,180 @@ paths:
description: "An error occurred while performing the request. Contact an\
\ API administrator for more information."
examples: {}
- /api/secure/logs:
- get:
+ /api/secure/monitoredtrip/starttracking:
+ post:
tags:
- - "api/secure/logs"
- description: "Gets a list of all API usage logs."
+ - "api/secure/monitoredtrip"
+ description: "Initiates the tracking of a monitored trip."
produces:
- "application/json"
parameters:
- - name: "keyId"
- in: "query"
- description: "If specified, restricts the search to the specified AWS API\
- \ key ID."
- required: false
- type: "string"
- - name: "startDate"
- in: "query"
- description: "If specified, the earliest date (format yyyy-MM-dd) for which\
- \ usage logs are retrieved."
- required: false
- type: "string"
- default: "30 days prior to the current date"
- pattern: "yyyy-MM-dd"
- - name: "endDate"
- in: "query"
- description: "If specified, the latest date (format yyyy-MM-dd) for which\
- \ usage logs are retrieved."
- required: false
- type: "string"
- default: "The current date"
- pattern: "yyyy-MM-dd"
+ - in: "body"
+ name: "body"
+ description: "Body object description"
+ required: true
+ schema:
+ $ref: "#/definitions/StartTrackingPayload"
responses:
"200":
description: "successful operation"
responseSchema:
- type: "array"
- items:
- $ref: "#/definitions/ApiUsageResult"
+ $ref: "#/definitions/TrackingResponse"
schema:
- type: "array"
- items:
- $ref: "#/definitions/ApiUsageResult"
- /api/admin/bugsnag/eventsummary:
- get:
+ $ref: "#/definitions/TrackingResponse"
+ /api/secure/monitoredtrip/updatetracking:
+ post:
tags:
- - "api/admin/bugsnag/eventsummary"
- description: "Gets a paginated list of the latest Bugsnag event summaries."
+ - "api/secure/monitoredtrip"
+ description: "Provides tracking updates on a monitored trip."
produces:
- "application/json"
parameters:
- - name: "limit"
- in: "query"
- description: "If specified, the maximum number of items to return."
- required: false
- type: "string"
- default: "10"
- - name: "offset"
- in: "query"
- description: "If specified, the number of records to skip/offset."
- required: false
- type: "string"
- default: "0"
+ - in: "body"
+ name: "body"
+ description: "Body object description"
+ required: true
+ schema:
+ $ref: "#/definitions/UpdatedTrackingPayload"
responses:
"200":
description: "successful operation"
responseSchema:
- type: "array"
- items:
- $ref: "#/definitions/BugsnagEvent"
+ $ref: "#/definitions/TrackingResponse"
schema:
- type: "array"
- items:
- $ref: "#/definitions/BugsnagEvent"
- /api/secure/connected-data:
- get:
+ $ref: "#/definitions/TrackingResponse"
+ /api/secure/monitoredtrip/track:
+ post:
tags:
- - "api/secure/connected-data"
- description: "Gets a paginated list of CDP zip files in the configured S3 bucket."
+ - "api/secure/monitoredtrip"
+ description: "Starts or updates tracking on a monitored trip."
produces:
- "application/json"
parameters:
- - name: "limit"
- in: "query"
- description: "If specified, the maximum number of items to return."
- required: false
- type: "string"
- default: "10"
- - name: "offset"
- in: "query"
- description: "If specified, the number of records to skip/offset."
- required: false
- type: "string"
- default: "0"
+ - in: "body"
+ name: "body"
+ description: "Body object description"
+ required: true
+ schema:
+ $ref: "#/definitions/TrackPayload"
responses:
"200":
description: "successful operation"
responseSchema:
- type: "array"
- items:
- $ref: "#/definitions/CDPFile"
+ $ref: "#/definitions/TrackingResponse"
schema:
- type: "array"
- items:
- $ref: "#/definitions/CDPFile"
- /api/secure/connected-data/download:
- get:
+ $ref: "#/definitions/TrackingResponse"
+ /api/secure/monitoredtrip/endtracking:
+ post:
tags:
- - "api/secure/connected-data"
- description: "Generates a download link for a specified object within the CDP\
- \ bucket."
+ - "api/secure/monitoredtrip"
+ description: "Terminates the tracking of a monitored trip by the user."
produces:
- "application/json"
parameters:
- - name: "/download"
- in: "query"
- description: "The key of the object to generate a link for."
+ - in: "body"
+ name: "body"
+ description: "Body object description"
required: true
- type: "string"
+ schema:
+ $ref: "#/definitions/EndTrackingPayload"
responses:
"200":
description: "successful operation"
responseSchema:
- type: "array"
- items:
- $ref: "#/definitions/URL"
+ $ref: "#/definitions/EndTrackingResponse"
schema:
- type: "array"
- items:
- $ref: "#/definitions/URL"
- /api/trip-survey/open:
- get:
+ $ref: "#/definitions/EndTrackingResponse"
+ /api/secure/monitoredtrip/forciblyendtracking:
+ post:
tags:
- - "api/trip-survey"
- description: "Generates a tracking survey link for a specified user, trip, notification\
- \ ids."
+ - "api/secure/monitoredtrip"
+ description: "Forcibly terminates tracking of a monitored trip by trip ID."
+ produces:
+ - "application/json"
parameters:
- - name: "user_id"
- in: "query"
- description: "The id of the OtpUser that this notification applies to."
- required: true
- type: "string"
- - name: "trip_id"
- in: "query"
- description: "The id of the MonitoredTrip that this notification applies to."
- required: true
- type: "string"
- - name: "notification_id"
- in: "query"
- description: "The id of the notification that this notification applies to."
+ - in: "body"
+ name: "body"
+ description: "Body object description"
required: true
- type: "string"
+ schema:
+ $ref: "#/definitions/ForceEndTrackingPayload"
responses:
"200":
description: "successful operation"
- /otp/*:
+ responseSchema:
+ $ref: "#/definitions/EndTrackingResponse"
+ schema:
+ $ref: "#/definitions/EndTrackingResponse"
+ /api/secure/triprequests:
get:
tags:
- - "otp"
- description: "Forwards any GET request to OTP 2. Refer to OTP's\
- \ API documentation for OTP's supported API resources."
+ - "api/secure/triprequests"
+ description: "Gets a paginated list of the most recent trip requests for a user."
produces:
- "application/json"
- - "application/xml"
parameters:
- name: "userId"
in: "query"
- description: "If a third-party application is making a trip plan request on\
- \ behalf of an end user (OtpUser), the user id must be specified."
+ description: "The OTP user for which to retrieve trip requests."
+ required: true
+ type: "string"
+ - name: "limit"
+ in: "query"
+ description: "If specified, the maximum number of items to return."
required: false
type: "string"
- responses:
- "200":
- description: "successful operation"
- post:
- tags:
- - "otp"
- description: "Forwards any POST request to OTP 2. Refer to OTP's\
- \ API documentation for OTP's supported API resources."
- produces:
- - "application/json"
- parameters:
- - name: "userId"
+ default: "10"
+ - name: "offset"
in: "query"
- description: "If a third-party application is making a trip plan request on\
- \ behalf of an end user (OtpUser), the user id must be specified."
+ description: "If specified, the number of records to skip/offset."
required: false
type: "string"
- responses:
- "200":
- description: "successful operation"
- /otp2/*:
- get:
- tags:
- - "otp2"
- description: "Forwards any GET request to OTP 2. Refer to OTP's\
- \ API documentation for OTP's supported API resources."
- produces:
- - "application/json"
- - "application/xml"
- parameters:
- - name: "userId"
+ default: "0"
+ - name: "fromDate"
in: "query"
- description: "If a third-party application is making a trip plan request on\
- \ behalf of an end user (OtpUser), the user id must be specified."
+ description: "If specified, the earliest date (format yyyy-MM-dd) for which\
+ \ trip requests are retrieved."
+ required: false
+ type: "string"
+ default: "The current date"
+ pattern: "yyyy-MM-dd"
+ - name: "toDate"
+ in: "query"
+ description: "If specified, the latest date (format yyyy-MM-dd) for which\
+ \ trip requests are retrieved."
required: false
type: "string"
+ default: "The current date"
+ pattern: "yyyy-MM-dd"
responses:
"200":
description: "successful operation"
- post:
+ responseSchema:
+ $ref: "#/definitions/TripRequest"
+ schema:
+ $ref: "#/definitions/TripRequest"
+ /api/trip-survey/open:
+ get:
tags:
- - "otp2"
- description: "Forwards any POST request to OTP 2. Refer to OTP's\
- \ API documentation for OTP's supported API resources."
- produces:
- - "application/json"
+ - "api/trip-survey"
+ description: "Generates a tracking survey link for a specified user, trip, notification\
+ \ ids."
parameters:
- - name: "userId"
+ - name: "user_id"
in: "query"
- description: "If a third-party application is making a trip plan request on\
- \ behalf of an end user (OtpUser), the user id must be specified."
- required: false
+ description: "The id of the OtpUser that this notification applies to."
+ required: true
+ type: "string"
+ - name: "trip_id"
+ in: "query"
+ description: "The id of the MonitoredTrip that this notification applies to."
+ required: true
+ type: "string"
+ - name: "notification_id"
+ in: "query"
+ description: "The id of the notification that this notification applies to."
+ required: true
type: "string"
responses:
"200":
@@ -2359,6 +2359,47 @@ definitions:
type: "boolean"
name:
type: "string"
+ CDPFile:
+ type: "object"
+ properties:
+ key:
+ type: "string"
+ name:
+ type: "string"
+ size:
+ type: "integer"
+ format: "int64"
+ URL:
+ type: "object"
+ properties:
+ protocol:
+ type: "string"
+ host:
+ type: "string"
+ port:
+ type: "integer"
+ format: "int32"
+ file:
+ type: "string"
+ query:
+ type: "string"
+ authority:
+ type: "string"
+ path:
+ type: "string"
+ userInfo:
+ type: "string"
+ ref:
+ type: "string"
+ hostAddress:
+ $ref: "#/definitions/InetAddress"
+ handler:
+ $ref: "#/definitions/URLStreamHandler"
+ hashCode:
+ type: "integer"
+ format: "int32"
+ tempState:
+ $ref: "#/definitions/UrlDeserializedState"
CDPUser:
type: "object"
properties:
@@ -2366,6 +2407,69 @@ definitions:
type: "string"
S3DownloadTimes:
$ref: "#/definitions/Map"
+ App:
+ type: "object"
+ properties:
+ releaseStage:
+ type: "string"
+ BugsnagEvent:
+ type: "object"
+ properties:
+ eventDataId:
+ type: "string"
+ projectId:
+ type: "string"
+ errorId:
+ type: "string"
+ receivedAt:
+ type: "string"
+ format: "date"
+ exceptions:
+ type: "array"
+ items:
+ $ref: "#/definitions/EventException"
+ severity:
+ type: "string"
+ context:
+ type: "string"
+ unhandled:
+ type: "boolean"
+ app:
+ $ref: "#/definitions/App"
+ EventException:
+ type: "object"
+ properties:
+ errorClass:
+ type: "string"
+ message:
+ type: "string"
+ GetUsageResult:
+ type: "object"
+ properties:
+ usagePlanId:
+ type: "string"
+ startDate:
+ type: "string"
+ endDate:
+ type: "string"
+ position:
+ type: "string"
+ items:
+ $ref: "#/definitions/Map"
+ ApiUsageResult:
+ type: "object"
+ properties:
+ result:
+ $ref: "#/definitions/GetUsageResult"
+ apiUsers:
+ $ref: "#/definitions/Map"
+ MonitoredComponent:
+ type: "object"
+ properties:
+ bugsnagProjectId:
+ type: "string"
+ name:
+ type: "string"
TripStop:
type: "object"
properties:
@@ -3019,200 +3123,33 @@ definitions:
type: "string"
address:
type: "string"
- StartTrackingPayload:
+ VerificationResult:
type: "object"
properties:
- location:
- $ref: "#/definitions/TrackingLocation"
- tripId:
+ sid:
type: "string"
- TrackingLocation:
+ status:
+ type: "string"
+ valid:
+ type: "boolean"
+ UserLocation:
type: "object"
properties:
- bearing:
- type: "integer"
- format: "int32"
- lat:
- type: "number"
- format: "double"
- lon:
- type: "number"
- format: "double"
- speed:
- type: "integer"
- format: "int32"
- timestamp:
+ address:
type: "string"
- format: "date"
- tripStatus:
+ icon:
type: "string"
- enum:
- - "ON_SCHEDULE"
- - "BEHIND_SCHEDULE"
- - "AHEAD_OF_SCHEDULE"
- - "ENDED"
- - "DEVIATED"
- - "COMPLETED"
- locationAccuracy:
+ lat:
type: "number"
format: "double"
- deviationMeters:
+ lon:
type: "number"
format: "double"
- TrackingResponse:
- type: "object"
- properties:
- frequencySeconds:
- type: "integer"
- format: "int32"
- instruction:
- type: "string"
- journeyId:
- type: "string"
- tripStatus:
+ name:
type: "string"
- message:
+ type:
type: "string"
- UpdatedTrackingPayload:
- type: "object"
- properties:
- journeyId:
- type: "string"
- locations:
- type: "array"
- items:
- $ref: "#/definitions/TrackingLocation"
- TrackPayload:
- type: "object"
- properties:
- locations:
- type: "array"
- items:
- $ref: "#/definitions/TrackingLocation"
- tripId:
- type: "string"
- EndTrackingPayload:
- type: "object"
- properties:
- journeyId:
- type: "string"
- EndTrackingResponse:
- type: "object"
- properties:
- instruction:
- type: "string"
- tripStatus:
- type: "string"
- message:
- type: "string"
- ForceEndTrackingPayload:
- type: "object"
- properties:
- tripId:
- type: "string"
- TripRequest:
- type: "object"
- properties:
- userId:
- type: "string"
- batchId:
- type: "string"
- fromPlace:
- type: "string"
- toPlace:
- type: "string"
- otp2QueryParams:
- $ref: "#/definitions/QueryVariables"
- QueryVariables:
- type: "object"
- properties:
- arriveBy:
- type: "boolean"
- banned:
- $ref: "#/definitions/RoutesAndTrips"
- bikeReluctance:
- type: "number"
- format: "float"
- carReluctance:
- type: "number"
- format: "float"
- date:
- type: "string"
- fromPlace:
- type: "string"
- mobilityProfile:
- type: "string"
- modes:
- type: "array"
- items:
- $ref: "#/definitions/TransportMode"
- numItineraries:
- type: "integer"
- format: "int32"
- preferred:
- $ref: "#/definitions/RoutesAndTrips"
- time:
- type: "string"
- toPlace:
- type: "string"
- unpreferred:
- $ref: "#/definitions/RoutesAndTrips"
- walkReluctance:
- type: "number"
- format: "float"
- walkSpeed:
- type: "number"
- format: "float"
- wheelchair:
- type: "boolean"
- RoutesAndTrips:
- type: "object"
- properties:
- routes:
- type: "string"
- trips:
- type: "string"
- TransportMode:
- type: "object"
- properties:
- mode:
- type: "string"
- qualifier:
- type: "string"
- MonitoredComponent:
- type: "object"
- properties:
- bugsnagProjectId:
- type: "string"
- name:
- type: "string"
- VerificationResult:
- type: "object"
- properties:
- sid:
- type: "string"
- status:
- type: "string"
- valid:
- type: "boolean"
- UserLocation:
- type: "object"
- properties:
- address:
- type: "string"
- icon:
- type: "string"
- lat:
- type: "number"
- format: "double"
- lon:
- type: "number"
- format: "double"
- name:
- type: "string"
- type:
- type: "string"
- OtpUser:
+ OtpUser:
type: "object"
properties:
accessibilityRoutingByDefault:
@@ -3293,103 +3230,166 @@ definitions:
format: "date"
journeyId:
type: "string"
- GetUsageResult:
+ StartTrackingPayload:
type: "object"
properties:
- usagePlanId:
- type: "string"
- startDate:
- type: "string"
- endDate:
- type: "string"
- position:
+ location:
+ $ref: "#/definitions/TrackingLocation"
+ tripId:
type: "string"
- items:
- $ref: "#/definitions/Map"
- ApiUsageResult:
- type: "object"
- properties:
- result:
- $ref: "#/definitions/GetUsageResult"
- apiUsers:
- $ref: "#/definitions/Map"
- App:
+ TrackingLocation:
type: "object"
properties:
- releaseStage:
+ bearing:
+ type: "integer"
+ format: "int32"
+ lat:
+ type: "number"
+ format: "double"
+ lon:
+ type: "number"
+ format: "double"
+ speed:
+ type: "integer"
+ format: "int32"
+ timestamp:
type: "string"
- BugsnagEvent:
+ format: "date"
+ tripStatus:
+ type: "string"
+ enum:
+ - "ON_SCHEDULE"
+ - "BEHIND_SCHEDULE"
+ - "AHEAD_OF_SCHEDULE"
+ - "ENDED"
+ - "DEVIATED"
+ - "COMPLETED"
+ locationAccuracy:
+ type: "number"
+ format: "double"
+ deviationMeters:
+ type: "number"
+ format: "double"
+ TrackingResponse:
type: "object"
properties:
- eventDataId:
+ frequencySeconds:
+ type: "integer"
+ format: "int32"
+ instruction:
type: "string"
- projectId:
+ journeyId:
type: "string"
- errorId:
+ tripStatus:
type: "string"
- receivedAt:
+ message:
type: "string"
- format: "date"
- exceptions:
+ UpdatedTrackingPayload:
+ type: "object"
+ properties:
+ journeyId:
+ type: "string"
+ locations:
type: "array"
items:
- $ref: "#/definitions/EventException"
- severity:
+ $ref: "#/definitions/TrackingLocation"
+ TrackPayload:
+ type: "object"
+ properties:
+ locations:
+ type: "array"
+ items:
+ $ref: "#/definitions/TrackingLocation"
+ tripId:
type: "string"
- context:
+ EndTrackingPayload:
+ type: "object"
+ properties:
+ journeyId:
type: "string"
- unhandled:
- type: "boolean"
- app:
- $ref: "#/definitions/App"
- EventException:
+ EndTrackingResponse:
type: "object"
properties:
- errorClass:
+ instruction:
+ type: "string"
+ tripStatus:
type: "string"
message:
type: "string"
- CDPFile:
+ ForceEndTrackingPayload:
type: "object"
properties:
- key:
+ tripId:
type: "string"
- name:
+ TripRequest:
+ type: "object"
+ properties:
+ userId:
type: "string"
- size:
- type: "integer"
- format: "int64"
- URL:
+ batchId:
+ type: "string"
+ fromPlace:
+ type: "string"
+ toPlace:
+ type: "string"
+ otp2QueryParams:
+ $ref: "#/definitions/QueryVariables"
+ QueryVariables:
type: "object"
properties:
- protocol:
+ arriveBy:
+ type: "boolean"
+ banned:
+ $ref: "#/definitions/RoutesAndTrips"
+ bikeReluctance:
+ type: "number"
+ format: "float"
+ carReluctance:
+ type: "number"
+ format: "float"
+ date:
type: "string"
- host:
+ fromPlace:
type: "string"
- port:
+ mobilityProfile:
+ type: "string"
+ modes:
+ type: "array"
+ items:
+ $ref: "#/definitions/TransportMode"
+ numItineraries:
type: "integer"
format: "int32"
- file:
+ preferred:
+ $ref: "#/definitions/RoutesAndTrips"
+ time:
type: "string"
- query:
+ toPlace:
type: "string"
- authority:
+ unpreferred:
+ $ref: "#/definitions/RoutesAndTrips"
+ walkReluctance:
+ type: "number"
+ format: "float"
+ walkSpeed:
+ type: "number"
+ format: "float"
+ wheelchair:
+ type: "boolean"
+ RoutesAndTrips:
+ type: "object"
+ properties:
+ routes:
type: "string"
- path:
+ trips:
type: "string"
- userInfo:
+ TransportMode:
+ type: "object"
+ properties:
+ mode:
type: "string"
- ref:
+ qualifier:
type: "string"
- hostAddress:
- $ref: "#/definitions/InetAddress"
- handler:
- $ref: "#/definitions/URLStreamHandler"
- hashCode:
- type: "integer"
- format: "int32"
- tempState:
- $ref: "#/definitions/UrlDeserializedState"
externalDocs:
description: ""
url: ""