.. _rest_api: REST API ========= The PTT REST API's support added for get entities, status, put status for EB, SBD, SBI and Project. There are also GET and PUT method for a resource identifier to retrieve and update the entities, retrospectively. There are also GET and PUT method for a resource identifier to retrieve and update the status of entities, retrospectively. Once deployed, the API should be available at ``/ptt/api//`` and the Swagger UI at ``/api//ui``. The host depends on the environment that the server is deployed to, and may include a k8s namespace - see the README for more details. Status Propagation ------------------ The PTT system implements automatic status propagation between related entities following the hierarchy: Project → SBD → SBI → EB. **Top-Down Propagation:** - Project "Ready" → SBDs become "Ready" - Project "Cancelled" → SBDs become "Suspended", SBIs become "Failed", EBs become "Failed" **Bottom-Up Propagation:** - EB "Fully Observed" → SBI becomes "Observed" → SBD becomes "Observed" → Project becomes "Observed" - EB "Failed" → SBI becomes "Failed" → SBD becomes "Suspended" → Project becomes "Cancelled" - SBI "Executing" → SBD becomes "In Progress" → Project becomes "Ready" For detailed status propagation rules, see :doc:`../status_propagation`. API Endpoints ------------- The PTT API endpoints, with the accepted requests and expected responses, are documented below: .. openapi:: ../../openapi/openapi.json