coolify/app/Http/Controllers/Api
Poul fe855cf8d0 feat(api): add REST endpoints for destinations
The Destinations section is exposed in the Coolify UI but not via the
REST API. The destination_uuid field is required when creating
applications via create-public-application, but no way to enumerate or
create destinations programmatically existed — this blocks IaC tools
(e.g. an Aspire publisher targeting Coolify).

Adds, scoped to the existing v1 auth:sanctum + ApiAllowed + api.sensitive
group:

  GET    /api/v1/destinations
  GET    /api/v1/destinations/{uuid}
  DELETE /api/v1/destinations/{uuid}
  GET    /api/v1/servers/{server_uuid}/destinations
  POST   /api/v1/servers/{server_uuid}/destinations

The controller uses the existing inline-Validator convention (no Form
Request classes per the API surface's house style), reuses
StandaloneDocker::ownedByCurrentTeamAPI / SwarmDocker::ownedByCurrentTeamAPI
for team scoping (matching ScheduledTasksController etc.), and respects
the `attachedTo()` guard on delete.

No migrations needed — both standalone_dockers and swarm_dockers tables
already carry uuid/name/network/server_id/timestamps.

OpenAPI @OA\ annotations omitted in this commit to keep the diff
minimal; a follow-up can add them in the style of ServersController.
2026-05-25 11:15:08 +00:00
..
ApplicationsController.php fix(applications): store custom nginx config from API correctly 2026-05-11 22:22:01 +02:00
CloudProviderTokensController.php feat(observability): add structured audit log channel for API and webhook events 2026-04-28 14:50:37 +02:00
DatabasesController.php feat(observability): add structured audit log channel for API and webhook events 2026-04-28 14:50:37 +02:00
DeployController.php feat(observability): add structured audit log channel for API and webhook events 2026-04-28 14:50:37 +02:00
DestinationsController.php feat(api): add REST endpoints for destinations 2026-05-25 11:15:08 +00:00
GithubController.php feat(observability): add structured audit log channel for API and webhook events 2026-04-28 14:50:37 +02:00
HetznerController.php feat(observability): add structured audit log channel for API and webhook events 2026-04-28 14:50:37 +02:00
OpenApi.php feat(api): Improve OpenAPI spec and add rate limit handling for Hetzner 2025-12-11 12:12:43 +01:00
OtherController.php fix(mcp): change enable/disable endpoints from GET to POST and fix service/app listing 2026-05-05 22:07:58 +02:00
ProjectController.php feat(observability): add structured audit log channel for API and webhook events 2026-04-28 14:50:37 +02:00
ResourcesController.php feat(auth): implement comprehensive authorization checks across API controllers 2025-08-23 18:51:10 +02:00
ScheduledTasksController.php feat(observability): add structured audit log channel for API and webhook events 2026-04-28 14:50:37 +02:00
SecurityController.php feat(observability): add structured audit log channel for API and webhook events 2026-04-28 14:50:37 +02:00
ServersController.php feat(api): expose connection_timeout in servers API 2026-04-28 15:43:58 +02:00
ServicesController.php feat(observability): add structured audit log channel for API and webhook events 2026-04-28 14:50:37 +02:00
TeamController.php fix(security): harden model assignment and sensitive data handling 2026-03-29 20:56:04 +02:00