# Data Services API This document outlines instructions for retrieving various datasets from the eModal lakehouse for various ports and terminals. The data is made available via REST API calls for the following datasets: - Information about the available terminals for the port. - Appointment availability information in a specific terminal. - Aggregated container dwell statistics in a specific terminal. - Appointment performance metrics for a specific terminal. Version: v1 ## Servers Server ``` /api ``` ## Security ### apikey Type: apiKey In: header Name: X-API-KEY ## Download OpenAPI description [Data Services API](https://developer.cargosprint.com/_bundle/dataservices/swagger.yaml) ## TerminalMetrics ### Retrieve Information About Terminals - [GET /terminalmetrics/v{version}/terminals](https://developer.cargosprint.com/dataservices/swagger/terminalmetrics/terminals.md): This endpoint returns information about individual terminals including terminal name/code/ID, supported move types(pickup, drop off, etc.), and appointment type(slot vs pre-advice). This information is required to query specific terminal appointment availability or dwell statistics. ### Retrieve Metrics About Appointment Availability - [GET /terminalmetrics/v{version}/terminals/{terminal_id}/apptavailability](https://developer.cargosprint.com/dataservices/swagger/terminalmetrics/terminals/%7Bterminal_id%7D/apptavailability.md): This API endpoint returns appointment availability statistics for time slotted appointments. This API returns data only for the time slotted appointment move types and does not include pre-advice information as it is not applicable as an appointment availability statistic. The response will contain appointment availability data starting with the current date and 7 days into the future and contain a listing of available and booked appointments by move type and time slot for a specific terminal. ### Retrieve Information About Terminal Dwell Statistics - [GET /terminalmetrics/v{version}/terminals/{terminal_id}/containerdwelltime](https://developer.cargosprint.com/dataservices/swagger/terminalmetrics/containerdwelltime.md): This API endpoint provides information about container dwell time in a specific terminal. The dwelling time is calculated as an average dwell within the specified date range. Dwell time is average time spent in hours on the terminal between containers discharge date and gate out date or from discharge to current dwell time on terminal. ### Retrieves appointment performance metrics for a specific terminal within a given date range. - [GET /terminalmetrics/v{version}/terminals/{terminal_id}/apptperformance](https://developer.cargosprint.com/dataservices/swagger/terminalmetrics/apptperformance.md): This endpoint returns aggregated appointment performance data for the specified terminal and date range. The response includes appointment counts and related statistics.